W3C home > Mailing lists > Public > public-xg-htmlspeech@w3.org > November 2011

RE: updated final report draft

From: Michael Bodell <mbodell@microsoft.com>
Date: Tue, 15 Nov 2011 02:26:55 +0000
To: Dan Burnett <dburnett@voxeo.com>, Satish S <satish@google.com>
CC: "public-xg-htmlspeech@w3.org" <public-xg-htmlspeech@w3.org>
Message-ID: <22CD592CCD76414085591204EB19F4E8239DBF1D@TK5EX14MBXC262.redmond.corp.microsoft.com>
Yeah, I'm not sold on moving the functions to the collection.  I'm not sold on not doing it either.  It is pretty late in the game to make contentful changes so we should definitely be sure exactly what we want before we make such a change.  If it is on the collection then you'll write code that looks like:

var sr = new SpeechReco();
sr.grammars.addGrammarUri("https://example.org/myGrammar.srgs", 2.0);

whereas without the change you'd have:

var sr = new SpeechReco();
sr.addGrammarUri("https://example.org/myGrammar.srgs", 2.0);

I know the second one is shorter, and that appeals to me.  I suppose we could do the first one and change the name to addFromUri instead of addGrammarUri and then you'd get:

var sr = new SpeechReco();
sr.grammars.addFromUri("https://example.org/myGrammar.srgs", 2.0);

which maybe doesn't have quite as much repetition, but is still longer.

I guess for me it comes back to does it matter enough that we do want to change this 3 days before our last conference call?

From: Dan Burnett [mailto:dburnett@voxeo.com]
Sent: Saturday, November 12, 2011 9:59 PM
To: Satish S
Cc: public-xg-htmlspeech@w3.org
Subject: Re: updated final report draft

Actually, I didn't notice that you had moved the addGrammar* methods onto the new collection object itself.  I agree that we need a new object for the collection and will do that, but I want to hear from others before I move the addGrammar* methods into that collection from the SpeechReco object/interface.

-- dan

On Nov 13, 2011, at 12:53 AM, Dan Burnett wrote:

Agreed.  I will apply this change when I convert the arrays to collections throughout.

-- dan

On Nov 11, 2011, at 9:30 AM, Satish S wrote:

o API Issue 5 (http://bantha.org/~mbodell/speechxg/issuew5.html):
Brought back the grammar/parameter functions.  This involved uncommenting the functions/explanations, adding a new one for grammarString, and renaming and rewording appropriately.

A minor/cosmetic suggestion - it would be cleaner to have a separate interface. See http://www.w3.org/TR/domcore/#domtokenlist for inspiration.

    interface SpeechGrammar {
        attribute DOMString src;
        attribute float weight;

    interface SpeechGrammarList {
        readonly attribute unsigned long length;
        getter SpeechGrammar item(unsigned long index);
        void addGrammarUri(in DOMString src, optional float weight);
        void addGrammarString(in DOMString string, optional float weight);

    interface SpeechReco {
        SpeechGrammarList grammars;

Received on Tuesday, 15 November 2011 02:27:26 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:16:51 UTC