Re: Next HTML web api document

Another comment about the latest document:

I can't see any easy way to do programmatic TTS. The TTS element is at
least missing the attributes @text and @lang. Without those, it's
pretty hard to do the very simple use case of generating a string and
speaking it. It's possible, but you need to build a whole SSML
document. For use cases, see the samples I sent earlier today.

/Bjorn

On Wed, Nov 2, 2011 at 9:08 PM, Satish S <satish@google.com> wrote:
> Some comments based on reviewing the latest document:
> API related:
>
> SpeechInputRequest.outputToElement() should be an attribute, perhaps
> 'forElement'?
> SpeechInputResult has a getter "item(index)". SpeechInputResultEvent has an
> array "SpeechInputResult[] results. Can we change both to be collections
> similar to http://www.w3.org/TR/FileAPI/#dfn-filelist (accessible via []
> operator and optionally with a .item() method)?
> The <reco> element should probably be a void element with no content on its
> own (http://dev.w3.org/html5/spec/Overview.html#void-elements)
>
> Minor corrections in sample code:
>
> "Speech Web Search JS API With Functional Binding" sample should probably
> use a custom pattern for the 'q' input element so that it is clear why
> .addGrammarFrom() is used.
> In the same example, can we show a .onresult handler which auto-submits the
> form?
> In sample "Speech Web Search JS API Only", simpler to say "sir.grammars = [
> g, g1, g2, g3 ];" instead of assigning them one by one?
> "var f = document.getElementById('f');f.submit();" can be replaced with
> "document.forms[0].submit();"
> "sir.onnomatch() = function" should be "sir.onnomatch = function"
> In the samples where we access the 0-th index of results, we should check
> for length before doing so.
> We should probably use <input> and not <input /> in the doc as in HTML the
> input tag has no end tag.
>
> Cheers
> Satish
>
>
> On Sat, Oct 29, 2011 at 6:31 AM, Michael Bodell <mbodell@microsoft.com>
> wrote:
>>
>> Only changes other than date and last document link are more examples.
>>
>>
>>
>> This time there are two more examples which show two ways to use the JS
>> API.  Neither takes advantage of an earlier open (like onload="sir.open()"
>> to get permisions and early grammar usage), but both should work and show
>> some of the JS api work that should help others with their examples for
>> before the F2F.
>



-- 
Bjorn Bringert
Google UK Limited, Registered Office: Belgrave House, 76 Buckingham
Palace Road, London, SW1W 9TQ
Registered in England Number: 3977902

Received on Wednesday, 2 November 2011 21:22:27 UTC