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.
Constructor for internal use.
- Inheritance
-
builtins.objectPhraseListGrammar
Constructor
PhraseListGrammar(recognizer: Recognizer)
Parameters
Name | Description |
---|---|
recognizer
Required
|
|
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
Name | Description |
---|---|
phrase
Required
|
|
clear
Clears all phrases from the current recognizer.
clear()
from_recognizer
Gets the PhraseListGrammar instance from the specified recognizer.
from_recognizer(recognizer: Recognizer) -> PhraseListGrammar
Parameters
Name | Description |
---|---|
recognizer
Required
|
|
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
Azure SDK for Python