Subscribe to the Speech Recognition API, and get a free trial subscription key
The Speech API is part of Cognitive Services. You can get free trial subscription keys from the Cognitive Services subscription page. After you select the Speech API, select Get API Key to get the key. It returns a primary and secondary key. Both keys are tied to the same quota, so you can use either key.
Get a subscription key. Before you can use Speech client libraries, you must have a subscription key.
In this section we will walk you through the necessary steps to load a sample HTML page. The sample is located in our github repository. You can open the sample directly from the repository, or open the sample from a local copy of the repository.
Some browsers block microphone access on un-secure origin. So, it is recommended to host the 'sample'/'your app' on https to get it working on all supported browsers.
Open the sample directly
Open the sample from a local copy
To try the sample locally, clone this repository:
samples\browser\Sample.html in your favorite browser.
More information on how to include the SDK into your own webpage is available here.
- The Speech Recognition API supports three recognition modes. You can switch the mode by updating the Setup() function found in the Sample.html file. The sample sets the mode to
Interactiveby default. To change the mode, update the parameter
SR.RecognitionMode.Interactiveto another mode. For example, change the parameter to
- For a complete list of supported languages, see Supported languages.