JS DizzyCoding

Grammar in Google Web Speech API

Grammar in Google Web Speech API – Even if we have a good project plan and a logical concept, we will spend the majority of our time correcting errors abaout javascript and google-chrome. Furthermore, our application can run without obvious errors with JavaScript, we must use various ways to ensure that everything is operating properly. In general, there are two types of errors that you’ll encounter while doing something wrong in code: Syntax Errors and Logic Errors. To make bug fixing easier, every JavaScript error is captured with a full stack trace and the specific line of source code marked. To assist you in resolving the JavaScript error, look at the discuss below to fix problem about Grammar in Google Web Speech API.

Problem :

Can I improve Google speech API recognition by give him a words list (in my case the request of user is very predictable) to make recognition more accurate?

Solution :

Correct answer is: no, you can’t. =(

I can’t speak for Chrome, but in Android they are quite clear that you cannot provide a grammar. In Android speech recognition you are limited to a choice of two models: “free form” and “web search”.

See Android: Speech Recognition Append Dictionary?

For Google Cloud Speech API (Not Web Speech API) but some may find this useful:

Although currently in beta, Google has released new capability which allows you to

include a list of phrases to act as “hints” to Cloud Speech-to-Text. Providing these hints, a technique called speech adaptation, helps Speech-to-Text API to recognize the specified phrases from your audio data.”

See https://cloud.google.com/speech-to-text/docs/context-strength

Exit mobile version