Уреди

Делите путем


Speech service in sovereign clouds

Azure Government (United States)

Available to US government entities and their partners only. See more information about Azure Government here and here.

  • Azure portal:
  • Regions:
    • US Gov Arizona
    • US Gov Virginia
  • Available pricing tiers:
    • Free (F0) and Standard (S0). See more details here
  • Supported features:
    • Speech to text
      • Custom speech (Acoustic Model (AM) and Language Model (LM) adaptation)
    • Text to speech
      • Standard voice
      • Neural voice
    • Speech translation
  • Unsupported features:
    • Custom commands
    • Custom neural voice
    • Personal voice
    • Text to speech avatar
  • Supported languages:
    • See the list of supported languages here

Endpoint information

This section contains Speech service endpoint information for the usage with Speech SDK, Speech to text REST API, and Text to speech REST API.

Speech service REST API

Speech service REST API endpoints in Azure Government have the following format:

REST API type / operation Endpoint format
Access token https://<REGION_IDENTIFIER>.api.cognitive.microsoft.us/sts/v1.0/issueToken
Speech to text REST API https://<REGION_IDENTIFIER>.api.cognitive.microsoft.us/<URL_PATH>
Speech to text REST API for short audio https://<REGION_IDENTIFIER>.stt.speech.azure.us/<URL_PATH>
Text to speech REST API https://<REGION_IDENTIFIER>.tts.speech.azure.us/<URL_PATH>

Replace <REGION_IDENTIFIER> with the identifier matching the region of your subscription from this table:

Region identifier
US Gov Arizona usgovarizona
US Gov Virginia usgovvirginia

Speech SDK

For Speech SDK in sovereign clouds, you need to use "from host / with host" instantiation of SpeechConfig class or --host option of Speech CLI. (You can also use "from endpoint / with endpoint" instantiation and --endpoint Speech CLI option).

SpeechConfig class should be instantiated like this:

var config = SpeechConfig.FromHost(usGovHost, subscriptionKey);

Speech CLI should be used like this (note the --host option):

spx recognize --host "usGovHost" --file myaudio.wav

Replace subscriptionKey with your Speech resource key. Replace usGovHost with the expression matching the required service offering and the region of your subscription from this table:

Region / Service offering Host expression
US Gov Arizona
Speech to text wss://usgovarizona.stt.speech.azure.us
Text to speech https://usgovarizona.tts.speech.azure.us
US Gov Virginia
Speech to text wss://usgovvirginia.stt.speech.azure.us
Text to speech https://usgovvirginia.tts.speech.azure.us

Microsoft Azure operated by 21Vianet

Available to organizations with a business presence in China. See more information about Microsoft Azure operated by 21Vianet here.

  • Azure portal:
  • Regions:
    • China East 2
    • China North 2
    • China North 3
  • Available pricing tiers:
    • Free (F0) and Standard (S0). See more details here
  • Supported features:
    • Speech to text
    • Text to speech
      • Standard voice
      • Neural voice
    • Speech translator
  • Unsupported features:
    • Custom commands
    • Custom neural voice
    • Personal voice
    • Text to speech avatar
  • Supported languages:
    • See the list of supported languages here

Endpoint information

This section contains Speech service endpoint information for the usage with Speech SDK, Speech to text REST API, and Text to speech REST API.

Speech service REST API

Speech service REST API endpoints in Azure operated by 21Vianet have the following format:

REST API type / operation Endpoint format
Access token https://<REGION_IDENTIFIER>.api.cognitive.azure.cn/sts/v1.0/issueToken
Speech to text REST API https://<REGION_IDENTIFIER>.api.cognitive.azure.cn/<URL_PATH>
Speech to text REST API for short audio https://<REGION_IDENTIFIER>.stt.speech.azure.cn/<URL_PATH>
Text to speech REST API https://<REGION_IDENTIFIER>.tts.speech.azure.cn/<URL_PATH>

Replace <REGION_IDENTIFIER> with the identifier matching the region of your subscription from this table:

Region identifier
China East 2 chinaeast2
China North 2 chinanorth2
China North 3 chinanorth3

Speech SDK

For Speech SDK in sovereign clouds you need to use "from host / with host" instantiation of SpeechConfig class or --host option of Speech CLI. (You can also use "from endpoint / with endpoint" instantiation and --endpoint Speech CLI option).

SpeechConfig class should be instantiated like this:

var config = SpeechConfig.FromHost("azCnHost", subscriptionKey);

Speech CLI should be used like this (note the --host option):

spx recognize --host "azCnHost" --file myaudio.wav

Replace subscriptionKey with your Speech resource key. Replace azCnHost with the expression matching the required service offering and the region of your subscription from this table:

Region / Service offering Host expression
China East 2
Speech to text wss://chinaeast2.stt.speech.azure.cn
Text to speech https://chinaeast2.tts.speech.azure.cn
China North 2
Speech to text wss://chinanorth2.stt.speech.azure.cn
Text to speech https://chinanorth2.tts.speech.azure.cn
China North 3
Speech to text wss://chinanorth3.stt.speech.azure.cn
Text to speech https://chinanorth3.tts.speech.azure.cn