2

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.

1

1 Answer 1

3

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.

Sign up to request clarification or add additional context in comments.

2 Comments

exactly so is there a way to have the keyboard already set to the the microphone button so when you click the input field it is already up and running waiting for the user to say something. Instead of having to tap the microphone icon. @Michael Levy
not to my knowledge. In general, the philosophy on those types of things is leave it to the user to choose an action. I can't think examples where your code can force that type of action.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.