Search code examples
javascriptspeech-recognitionspeech-to-textazure-cognitive-services

Microsoft speech recognition PhraseLIst undefined,what is the issue?


currently developing an app with Microsoft speech Rec and its going well except when attempting to user the PhraseListGrammar object it keeps retruning undefined, what is the issue?

recognizer = new SpeechSDK.SpeechRecognizer(speechConfig, audioConfig);
recognizer.BabbleTimeout = 0.75;
var phraseListGrammar = 
**SpeechSDK.PhraseListGrammar.fromRecognizer(recognizer);**

the last line give me the following error:

Cannot read property 'fromRecognizer' of undefined

Why can I not create the PhraseListGrammar object so i can give it a list of poossible words to recognize. this can dramatically increase the effectiveness of my app and decrease the error rate so someone please help. Thank you.


Solution

  • Needed to update my sdk version.