KeywordRecognizer Class
A keyword recognizer.
- Inheritance
-
builtins.objectKeywordRecognizer
Constructor
KeywordRecognizer(audio_config: Optional[azure.cognitiveservices.speech.audio.AudioConfig] = None)
Parameters
- audio_config
The config for audio input. This parameter is optional. If it is None or not provided, the default microphone device will be used for audio input.
Methods
| recognize_once_async |
Asynchronously initiates keyword recognition operation. |
| stop_recognition_async |
Asynchronously terminates ongoing keyword recognition operation. |
recognize_once_async
Asynchronously initiates keyword recognition operation.
recognize_once_async(model: azure.cognitiveservices.speech.KeywordRecognitionModel) -> azure.cognitiveservices.speech.ResultFuture
Parameters
- model
The keyword recognition model that specifies the keyword to be recognized.
Returns
A future that is fulfilled once recognition has been initialized.
stop_recognition_async
Asynchronously terminates ongoing keyword recognition operation.
stop_recognition_async()
Returns
A future that is fulfilled once recognition has been stopped.
Attributes
canceled
Signal for events containing canceled keyword recognition results.
Callbacks connected to this signal are called with a SpeechRecognitionCanceledEventArgs instance as the single argument.
properties
A collection of properties and their values defined for this KeywordRecognizer.
recognized
Signal for events containing final keyword recognition results (indicating a successful recognition attempt).
Callbacks connected to this signal are called with a KeywordRecognitionEventArgs instance as the single argument.
Feedback
Submit and view feedback for