Search code examples
javascriptapicasespeech

JavaScript Speech Recognition


Is there a JavaScript Speech Recognition API that works in the following way.

I have a set of sentences of this format: "[piece] to [location]". There are a set of possible values for piece and location. The want the speech recognition to find the closest match to the possible sentences that I have. Is there an API that works like this?

Thanks.


Solution

  • There is definitely a JavaScript Speech Recognition API - see MDN. Your question asking about recognising specific words and matching them to a predefined set of sentences may be leaning more towards machine learning / natural language services though.

    It's possible you'll want the grammars property to build out your list but equally, it may be that you'll want to integrate with another service to make more accurate decisions around the words people use.