Tuesday, November 26, 2013

Add voice input to your web page, with one line of html only

(For Google Chrome) To add voice recognition function to your web page, simple add the html code:
<input x-webkit-speech>
Simple Web Speech API Demo
Simple Web Speech API Demo
Example code:
<!DOCTYPE html>
<head>
<title>Mobile-Web-App - Simple Web Speech API Demo</title>
</head>
<body>
<h1>Mobile-Web-App - Simple Web Speech API Demo</h1>
<h3>my blog: Mobile-Web-App</h3>
<div><p><a href="http://mobile-web-app.blogspot.com/">http://mobile-web-app.blogspot.com/</a></p></div>
<br/>
<input x-webkit-speech>
</body>
</html>

Test Simple Web Speech API Demo

tested with Google Chrome browser:

Not support at Microsoft Internet Explorer 11 and Firefox 25.0.1.


No comments:

Post a Comment