PhraseListGrammar class
Allows additions of new phrases to improve speech recognition.
Phrases added to the recognizer are effective at the start of the next recognition, or the next time the SpeechSDK must reconnect to the speech service.
Methods
add |
Adds a single phrase to the current recognizer. |
add |
Adds multiple phrases to the current recognizer. |
clear() | Clears all phrases added to the current recognizer. |
from |
Creates a PhraseListGrammar from a given speech recognizer. Will accept any recognizer that derives from |
Method Details
addPhrase(string)
Adds a single phrase to the current recognizer.
function addPhrase(phrase: string)
Parameters
- phrase
-
string
Phrase to add.
addPhrases(string[])
Adds multiple phrases to the current recognizer.
function addPhrases(phrases: string[])
Parameters
- phrases
-
string[]
Array of phrases to add.
clear()
Clears all phrases added to the current recognizer.
function clear()
fromRecognizer(Recognizer | ConversationTranscriber | MeetingTranscriber)
Creates a PhraseListGrammar from a given speech recognizer. Will accept any recognizer that derives from
static function fromRecognizer(recognizer: Recognizer | ConversationTranscriber | MeetingTranscriber): PhraseListGrammar
Parameters
- recognizer
The recognizer to add phrase lists to.