PhraseListGrammar Class
Class that allows runtime addition of phrase hints to aid in speech recognition.
Phrases added to the recognizer are effective at the start of the next recognition, or the next time the speech recognizer must reconnect to the speech service.
Note
Added in version 1.5.0.
- Inheritance
-
builtins.objectPhraseListGrammar
Constructor
PhraseListGrammar(impl_phraseListGrammar)
Parameters
- impl_phraseListGrammar
Methods
| addPhrase |
Adds a single phrase to the current recognizer. |
| clear |
Clears all phrases from the current recognizer. |
| from_recognizer |
Gets the PhraseListGrammar instance from the specified recognizer. |
addPhrase
Adds a single phrase to the current recognizer.
addPhrase(phrase: str)
Parameters
- phrase
Required
clear
Clears all phrases from the current recognizer.
clear()
from_recognizer
Gets the PhraseListGrammar instance from the specified recognizer.
from_recognizer(recognizer: azure.cognitiveservices.speech.Recognizer)
Parameters
- cls
Required
- recognizer
Required
الملاحظات
إرسال الملاحظات وعرضها المتعلقة بـ