Crack Your Own Track

Friday 30 May 2014

How to add voice recognition to your webpage

When the users are visiting your webpage, they will usually type in the webpage to search anything from your site or from in the google. But your web page should be differ from other webpage by allowing the visitor to get the speech recognition in your webpage.So that the user can feel very ease and comfortable to post any comments or search any things in your blog.
This speech recognition is not any software added to your webpage but it is a code that is to be added in the area where the user actually wants to type in your webpage such as in the comments text area and in the search bar of your webpage etc. Tpu can add it any where in the webpage.
But the only condition is it will work well only for the users who are working with the Google Chrome as the web browser.Only the google chrome browser supports the Speech Recognition facilities.

Just simply add this script under the area where the user wants to speak

<script type="text/javascript">
function transcribe(words) {
document.getElementById("speech").value = words;
document.getElementById("mic").value = "";
document.getElementById("speech").focus();
}
</script>

Now the Microphone icon will gets displayed where you add the script in your webpage.
You can press that microphone icon and speak what ever you want to type and make the search and the typing very easier.

No comments:

Post a Comment

Please post your comment and share this blog to your friend.And also write a review on Alexa