语音服务支持的区域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
考虑区域时,请注意以下几点:Keep in mind the following points when considering regions:
- 如果应用程序使用语音 SDK,请在创建语音配置时提供区域标识符,例如
chinaeast2
。If your application uses a Speech SDK, you provide the region identifier, such aschinaeast2
, when creating a speech configuration. - 如果应用程序使用某个语音服务的 REST API,则区域是你在发出请求时使用的终结点 URI 的一部分。If your application uses one of the Speech service's REST APIs, the region is part of the endpoint URI you use when making requests.
- 为某个区域创建的密钥仅在该区域有效。Keys created for a region are valid only in that region. 尝试在其他区域使用此类密钥会导致身份验证错误。Attempting to use them with other regions will result in authentication errors.
语音 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.
意向识别Intent recognition
通过语音 SDK 实现 意向识别 的可用区域如下:Available regions for intent recognition via the Speech SDK are the following:
全球区域Global region | 区域Region | 区域标识符Region identifier |
---|---|---|
中国东部China East | 中国东部 2China East 2 | chinaeast2 |
这是语言理解服务 (LUIS) 支持的发布区域的子集。This is a subset of the publishing regions supported by the Language Understanding service (LUIS).
REST APIREST APIs
语音服务还为语音转文本和文本转语音请求公开 REST 终结点。The Speech service also exposes REST endpoints for speech-to-text and text-to-speech requests.
语音转文本Speech-to-text
有关语音转文本的参考文档,请参阅语音转文本 REST API。For 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-US
。For 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 API。For 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 |
自定义语音Custom voices
如果已经创建了自定义语音字体,请使用已创建的终结点。If you've created a custom voice font, use the endpoint that you've created. 还可以使用下面列出的终结点,并将 {deploymentId}
替换为语音模型的部署 ID。You can also use the endpoints listed below, replacing the {deploymentId}
with the deployment ID for your voice model.
区域Region | 终结点Endpoint |
---|---|
中国东部 2China East 2 | https://chinaeast2.voice.speech.azure.cn/cognitiveservices/v1?deploymentId={deploymentId} |