admin管理员组文章数量:1279188
I am currently working on a project in ASP.NET. I need to add voice mand 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.
I am currently working on a project in ASP.NET. I need to add voice mand 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.
Share Improve this question asked Sep 11, 2014 at 13:51 anan_xonanan_xon 1,1121 gold badge12 silver badges22 bronze badges 1- 1 Well i ended up creating a desktop service which uses Microsoft speech API to take input and convert to text and then municate with the browser with web sockets. – anan_xon Commented Feb 22, 2017 at 10:59
2 Answers
Reset to default 5It can be done as long as the browser supports HTML5's getUserMedia API:
- Use HTML5's getUserMedia to capture an audio stream
- Save it to .WAV, there are libraries for that
- Send the .WAV to the server through AJAX
- Feed the .WAV to SpeechRecognitionEngine, through the SetInputToWaveFile method
- Get the result and return it in the AJAX call
An example:
http://weblogs.asp/ricardoperes/speech-recognition-in-asp-net
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 mands.
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.
本文标签: javascriptCross Browser Speech RecognitionStack Overflow
版权声明:本文标题:javascript - Cross Browser Speech Recognition - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741263624a2368059.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论