连接到 Azure 语音翻译服务

Connecting to the Azure speech translation service

在此处使用麦克风示例进行语音翻译

https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/how-to-translate-speech-csharp

有这段代码

var config = SpeechTranslationConfig.FromSubscription("YourSubscriptionKey", "YourServiceRegion");

但是服务没有区域。它被列为 "non-region",资源在 Azure 仪表板中显示为 "global"。那么示例中应该输入哪个服务区域呢?

我尝试过不同的地区,但连接总是失败。我知道密钥是正确的,因为我已经使用密钥和端点 https://api.cognitive.microsoft.com/sts/v1.0.

成功获得了令牌

我已经尝试了 FromEndpoint 版本的构造函数提供端点和密钥(避免需要提供区域),但这也失败了。

有人成功了吗?

https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/how-to-translate-speech-csharp is the documentation of the new Speech Service, which has just become generally available in Sept 2018. Here is a blog post regarding that: https://azure.microsoft.com/en-us/blog/global-scale-ai-with-azure-cognitive-services/.

您可以从 https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/regions. If your subscription doesn't show a region, that's probably because you are currently using the Bing Speech API, which is going to be retired on 10/15/2019. Please see the retirement notice on https://docs.microsoft.com/en-us/azure/cognitive-services/speech/home. Please migrate to the new Speech Service before 10/15/2019. Here is the migration guide: https://docs.microsoft.com/azure/cognitive-services/speech-service/how-to-migrate-from-bing-speech 中找到新语音服务的区域信息。

如果您仍有疑问,请访问语音服务支持页面:https://docs.microsoft.com/azure/cognitive-services/speech-service/support

希望对您有所帮助。