author | ms.service | ms.topic | ms.date | ms.author |
---|---|---|---|---|
wolfma61 |
cognitive-services |
include |
09/24/2018 |
wolfma |
The Cognitive Services Speech SDK provides the simplest way to use Speech to Text in your application with full functionality.
-
Create a speech configuration and provide a Speech service subscription key (or an authorization token) and a region as parameters. Change the configuration as needed. For example, provide a custom endpoint to specify a non-standard service endpoint, or select the spoken input language or output format.
-
Create a speech recognizer from the speech configuration. Provide an audio configuration if you want recognize from a source other than your default microphone (for example, audio stream or audio file).
-
Tie up the events for asynchronous operation, if desired. The recognizer then calls your event handlers when it has interim and final results. Otherwise, your application receives only a final transcription result.
-
Start recognition. For single-shot recognition, such as command or query recognition, use the
RecognizeOnceAsync()
method. This method returns the first recognized utterance. For long-running recognition like transcription, use theStartContinuousRecognitionAsync()
method. Tie up the events for asynchronous recognition results.
See the following code snippets for speech recognition scenarios that use the Speech SDK.
[!INCLUDE Get a subscription key]