Skip to content

Latest commit

 

History

History
26 lines (17 loc) · 2.4 KB

cognitive-services-speech-service-how-to-recognize-intents-from-speech-intro.md

File metadata and controls

26 lines (17 loc) · 2.4 KB
author ms.service ms.topic ms.date ms.author
wolfma61
cognitive-services
include
09/24/2018
wolfma

The Microsoft Cognitive Services Speech SDK provides a way to recognize intents from speech and is supported by the Cognitive Services Language Understanding service (LUIS).

  1. Create a speech configuration with a LUIS subscription key and region as parameters. The LUIS subscription key is called endpoint key in the service documentation. You can't use the LUIS authoring key. (See the note later in this section.)

  2. Create an intent 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).

  3. Get the language understanding model that's based on your AppId. Add the intents you require.

  4. Tie up the events for asynchronous operation, if desired. The recognizer then calls your event handlers when it has interim and final results (includes intents). If you don't tie up the events, your application receives only a final transcription result.

  5. Start intent 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, use the StartContinuousRecognitionAsync() method. Tie up the events for asynchronous recognition results.

See the following code snippets for intent recognition scenarios that use the Speech SDK. Replace the values in the sample with your own LUIS subscription key (endpoint key), the region of your subscription, and the AppId of your intent model.

Note

In contrast to other services supported by the Speech SDK, intent recognition requires a specific subscription key (LUIS endpoint key). For information about the intent recognition technology, see the LUIS website. For information on how to acquire the endpoint key, see Create a LUIS endpoint key.