SiteCrafting, Inc.

16 May
Input with Speech

Input with Speech

Using Google Chrome, you can now use speech to text technology on the web, today. Below is a bookmarklet to enable it on any website.


A few months back, Google released a new version of their Chrome Browser. It had a new API that allows any input box to have speech to text as it's input.

To try it out, either click or bookmark this link: Enable Speech.

Here's the code:
(function(){
var e=document.querySelectorAll('input[type=text]')
,i=e.length;
while(i--)
e[i].setAttribute('x-webkit-speech','x-webkit-speech'),
e[i].setAttribute('speech','speech');
})()
This requires Google Chrome, but may eventually include Firefox and Internet Explorer.

So how does it work? You click the icon in the input box. You are then prompted to talk you query. Google Chrome then sends the audio to their servers for processing. It then sends the results to the browser in the form of text. It's then in your control. I have a feeling this is using the same tech as Google 411 (RIP) was using.
From the Workbench, HTML5, Javascript
by Paul Sayre | 5/16/2011 5:20pm | Comments (0)

No comments found.


Leave a Comment




* required    Comment Guidelines