Re: Proposal for <reco> tag

I like this. I'd like to see a parallel <tts> tag that enables
text-to-speech in the simplest cases --- 

Glen Shires writes:
 > Here's some additional use-cases for the <reco> tag.  Note that the manner in which the <reco> tag visually appears on the page (if at all) is not defined,
 > and is UA-dependent.
 > 
 > The <reco> tag provides easy access to many of the methods of the SpeechInputRequest object corresponding to a particular <input> or <textarea>.  More
 > advanced speech UIs may not use a 1-to-1 correspondence between fields and recognition results, and thus would not be able to rely solely on the <reco> tag
 > and would have to use Javascript APIs.
 > 
 > As mentioned on last week's call, a UA could automatically speech-enable <input> and <textarea> fields without any change to existing web pages (thus
 > automatically implementing this simple UI of 1-to-1 correspondence). Such a "Voice IME" could allow a user to click-on and speak-into any input field (or at
 > least those of certain types, like text, number, date, etc.). When used with a UA of this type, the <reco> tag is optional, but when used, can provide
 > additional information, such as a custom grammar.
 > 
 > In these examples I defined a "for" attribute for explicit binding, although I'm not sure this is the best way to do this (please suggest alternatives).
 >  However, it does allow the UA to provide a very rich integration, including automatic grammar selection, honoring text insertion points, and continuous
 > streaming of results into the field.
 > 
 > The core idea remains: Make it easy for developers, and "keep the simple things simple".
 > 
 > Example 1: Automatically submit form.
 > 
 > <form action="http://google.com/search" method="get">
 >   <input name="q" type="text">
 >   <reco for="q" onresult="this.form.submit()"/>
 > </form>
 > 
 > Example 2: Override default grammar.
 > In this case, user is expected to type a two-character state abbreviation, but a custom speech grammar could allow a user to speak a state name. The grammar
 > would return the corresponding two-letter abbreviation.  (Note: should this need to also call .resetGrammars() ?  )
 > 
 > <input name="state" type="text" pattern="[A-z]{2}">
 > <reco for="state" addGrammar="state_names.grxml"/>
 > 
 > Example 3: Change default parameters.
 > 
 > <input name="foo" type="text">
 > <reco for="foo" setmaxspeechtimeout="5" setconfidencethreshold="0.5"/>
 > 
 > Example 4: Enable continuous speech.
 > 
 > <input name="bar" type="text">
 > <reco for="bar" continuous="true"/>
 > 
 > Example 5: Combining multiple reco tags in one form.
 > 
 > <form action="cityState" method="get">
 >   <input name="city" type="text">
 >   <reco for="city" addGrammar="city_names.grxml"/>
 >   <input name="state" type="text" pattern="[A-z]{2}">
 >   <reco for="state" addGrammar="state_names.grxml"/>
 > </form>
 > 
 > Example 6: Use with textarea.
 > 
 > <textarea name="foo"></textarea>
 > <reco for="foo" continuous="true"/>
 > 

Received on Wednesday, 26 October 2011 15:33:19 UTC