语音服务支持的区域Speech service supported regions

通过语音服务,应用程序可将音频转换为文本、执行语音翻译以及将文本转换为语音。The Speech service allows your application to convert audio to text, perform speech translation, and covert text to speech. 多个区域中均提供该服务,这些区域为语音 SDK 和 REST API 使用唯一终结点。The service is available in multiple regions with unique endpoints for the Speech SDK and REST APIs.

此处提供了对所有区域的语音体验执行自定义配置的语音门户: https://speech.azure.cnThe Speech portal to perform custom configurations to your speech experience for all the regions is available here: https://speech.azure.cn

对于语音服务的调用,请确保调用与订阅的区域匹配。For invocations of your Speech service, make sure the call matches the region for your subscription.

语音 SDKSpeech SDK

语音 SDK 中,区域指定为字符串(例如,在 C# 语音 SDK 中用作 SpeechConfig.FromSubscription 的参数)。In the Speech SDK, regions are specified as a string (for example, as a parameter to SpeechConfig.FromSubscription in the Speech SDK for C#).

语音转文本、文本转语音和翻译Speech-to-text, text-to-speech, and translation

语音自定义门户在此处提供: https://speech.azure.cnThe speech customization portal is available here: https://speech.azure.cn

可以在以下区域使用语音服务,以进行语音识别文本转语音翻译The Speech service is available in these regions for speech recognition, text-to-speech, and translation:

地理位置Geography 区域Region 区域标识符Region identifier
中国China 中国东部 2China East 2 chinaeast2

如果使用语音 SDK,则区域由区域标识符指定(例如,作为 SpeechConfig.FromSubscription 的参数)。If you use the Speech SDK, regions are specified by the Region identifier (for example, as a parameter to SpeechConfig.FromSubscription). 请确保该区域与订阅的区域匹配。Make sure the region is matching the region of your subscription.

REST APIREST APIs

语音服务还为语音转文本和文本转语音请求公开 REST 终结点。The Speech service also exposes REST endpoints for speech-to-text and text-to-speech requests.

语音转文本Speech-to-text

有关语音转文本的参考文档,请参阅语音转文本 REST APIFor speech-to-text reference documentation, see Speech-to-text REST API.

REST API 的终结点具有以下格式:The endpoint for the REST API has this format:

https://<REGION_IDENTIFIER>.stt.speech.azure.cn/speech/recognition/conversation/cognitiveservices/v1

<REGION_IDENTIFIER> 替换为与下表中的订阅区域匹配的标识符:Replace <REGION_IDENTIFIER> with the identifier matching the region of your subscription from this table:

地理位置Geography 区域Region 区域标识符Region identifier
中国China 中国东部 2China East 2 chinaeast2

备注

必须将语言参数追加到 URL 以避免收到 4xx HTTP 错误。The language parameter must be appended to the URL to avoid receiving an 4xx HTTP error. 例如,使用“中国东部 2”终结点设置为美国英语的语言为:https://chinaeast2.stt.speech.azure.cn/speech/recognition/conversation/cognitiveservices/v1?language=en-USFor example, the language set to US English using the China East 2 endpoint is: https://chinaeast2.stt.speech.azure.cn/speech/recognition/conversation/cognitiveservices/v1?language=en-US.

文本转语音Text-to-speech

有关文本转语音的参考文档,请参阅文本转语音 REST APIFor text-to-speech reference documentation, see Text-to-speech REST API.

标准语音和神经语音Standard and neural voices

使用下表按区域/终结点确定标准语音和神经语音的可用性:Use this table to determine availability of standard and neural voices by region/endpoint:

区域Region 端点Endpoint 标准语音Standard Voices 神经语音Neural Voices
中国东部 2China East 2 https://chinaeast2.tts.speech.azure.cn/cognitiveservices/v1 Yes Yes