Cross Browser Speech Recognition

I am currently working on a project in ASP.NET. I need to add voice command which will work on IE/Chrome/Firefox. I have searched a lot, but haven't found any solutions for cross browser.

Is there any JavaScript framework to do it? Can i use Google web speech API as a service?

Any suggestion will be helpful.

Answers:

Answer

It can be done as long as the browser supports HTML5's getUserMedia API:

  1. Use HTML5's getUserMedia to capture an audio stream
  2. Save it to .WAV, there are libraries for that
  3. Send the .WAV to the server through AJAX
  4. Feed the .WAV to SpeechRecognitionEngine, through the SetInputToWaveFile method
  5. Get the result and return it in the AJAX call

An example:

http://weblogs.asp.net/ricardoperes/speech-recognition-in-asp-net

Answer

You can check support for speech recognition in various browsers at Can I Use. At the moment only Chrome supports speech recognition reliably. Others don't, including IE, Firefox and Safari. Firefox is working on the speech recognition support, but it's not there yet.

If your browser supports getUserMedia to record audio you can record the audio and send it to the server for recognition. You can also use javascript-only recognizer Pocketsphinx.js if you want to recognize few simple commands.

On browsers which do not support getUserMedia API you can use Flash object or java applet to capture audio. That's pretty much your only option if you prioritize IE.

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.