Alex
Alex

Reputation: 540

Accessing the microphone in android browser on mobile devices

Is there anyway that I could use the default microphone on the android keyboard on mobile devices to do voice recognition on a input field?

For example, when you click a input field that has a

<input type ="tel" value="">

it brings up the android keyboard with only numbers. Is there something similar that would be able to do

<input type="microphone" value =""> 

and it would bring up the android keyboard but with the "speak now" speech recognition. Then once you are done speaking it would fill in the input field with your spoken words.

I have tried to do it with other alternative like flash but it really does not work that well. I also, tried this

<input type="file" accept="audio/*;capture=microphone"></input>  

but that just records your voice does no speech to text translation.

Upvotes: 2

Views: 5020

Answers (1)

Michael Levy
Michael Levy

Reputation: 13287

Chrome supports speech recognition for text input. See http://slides.html5rocks.com/#speech-input and http://www.filosophy.org/2011/03/talking-to-the-web-the-basics-of-html5-speech-input/. These use the following tag for speech recognition:

<input type=”text” speech x-webkit-speech />

However, I don't believe that this is supported by the Android browser.

Most web pages with text inputs automatically display a microphone on the keyboard for speech recognition. If you are using a custom keyboard instead of the stock keyboard, you may not see this.

Of course, you can force the recognizer to be used in a native Java app. I just don't think you can force this in a web page.

enter image description here.

Upvotes: 3

Related Questions