HTML5 adds the voice input function to the input box.
Here we will introduce the powerful html functions that you will use in the future. You can directly add the voice function to the input box. Let's take a look at the implementation method.
You can see the microphone icon on the right of the input box. Click the microphone to perform speech recognition.
In fact, it is very simple. Speech Recognition is the basic function of html5. its usage is
<Input type = "text" speech x-webkit-speech/>
If you like the syntax similar to XHTML, you can
<Input type = "text" x-webkit-speech = "x-webkit-speech"/>
Speech recognition was incredible ten years ago. Even a few years ago, speech recognition on Web pages could only be implemented in other ways, such as Flashplayer. However, to obtain a speech, you only need to add an attribute label to the input box to identify it.
Mobile devices, such as browsers on mobile phones, should also support speech recognition as long as html5 is supported. How can I view this webpage on Android?
In addition, if you want to use javascript to obtain the end of the speech recognition event, you can use onwebkitspeechchange
<Input type = "text" speech x-webkit-speech onwebkitspeechchange = "alert (this. value)"/>
The above section describes how to add the voice input function to the input box in HTML5. I hope it will be helpful to you. If you have any questions, please leave a message, the editor will reply to you in a timely manner. Thank you very much for your support for the help House website!