Azure认知服务TTS-示例应用程序中其他语言的错误 [英] Azure Cognitive Services TTS - an error for other language in sample app

查看:63
本文介绍了Azure认知服务TTS-示例应用程序中其他语言的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想为Azure认知服务TTS实现api调用.并通过@Md Farid Uddin Kiron stackoverflow用户以及我们在此链接上讨论的问题的礼貌因此,我提取了一个示例代码,该示例代码是与Azure进行通信的.netcore Web应用程序.示例链接在此处

I wanted to implement an api call for Azure Cognitive Services TTS. And by courtesy of @Md Farid Uddin Kiron stackoverflow user and the question that we discussed on this link So, I pulled down an sample code that is an .netcore web app which communicates with Azure. Sample link is here

我有以下问题:该应用程序可与模型中的预定义语言完美配合,例如:

I have a following problem: The app works perfectly with predefined languages in a model such as:

    public List<SelectListItem> LanguagePreference { get; set; } = new List<SelectListItem>
    {
       new SelectListItem { Value = "NA", Text = "-Select-" },
       new SelectListItem { Value = "en-US", Text = "English (United States)"  },
       new SelectListItem { Value = "en-IN", Text = "English (India)"  },
       new SelectListItem { Value = "ta-IN", Text = "Tamil (India)"  },
       new SelectListItem { Value = "hi-IN", Text = "Hindi (India)"  },
       new SelectListItem { Value = "te-IN", Text = "Telugu (India)"  }
    };

但是,当我添加例如意大利语(it-IT,hr-HR-这些是字段Value的语言代码)时,该代码在HomeController的方法Translate上中断.

but when I add for example an italian language (it-IT, hr-HR - those are language codes for fields Value), the code breaks in HomeController on method Translate.

推荐答案

我已成功重现了您的问题.

I have reproduce your problem successfully.

根据我的发现,语言支持有一些关键点,例如:

As per my findings there are some key points to language supports like:

  1. Subscription Free subscription doesn't allow all language

注意: 不支持女性的语言也可能是问题所在.

Note: language that doesn't support Female also can be the issue.

您的案例:

Your Case:

在您的代码中,您可以尝试在 LanguagePreference 列表

In your code you could try with below code at LanguagePreference list

 new SelectListItem { Value = "es-ES", Text = "es-ES,(Spanish)"  }

还更改了下面的 ServiceName 下的代码,我测试了西班牙语,效果很好.

Also Change on below code under ServiceName I have tested with Spanish which works fine.

 values.Add("es-ES", "Microsoft Server Speech Text to Speech Voice (es-ES, Laura, Apollo)");

要记住的重点:

Point To Remember:

我们的代码库还可以.问题与代码无关.请确保您的订阅和地区支持您正在尝试的翻译.也可以在azure门户上获得支持票.

Our code base is alright. problem is not related to code. Please be sure your subscriptions and region support translation you are trying. can also rise your support ticket on azure portal.

这篇关于Azure认知服务TTS-示例应用程序中其他语言的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆