W3C home > Mailing lists > Public > public-speech-api@w3.org > May 2012

RE: Calling start() on an already started SpeechRecognition object

From: Young, Milan <Milan.Young@nuance.com>
Date: Fri, 25 May 2012 18:37:45 +0000
To: Hans Wennborg <hwennborg@google.com>, "public-speech-api@w3.org" <public-speech-api@w3.org>
Message-ID: <B236B24082A4094A85003E8FFB8DDC3C1A45CF37@SOM-EXCH04.nuance.com>
Sorry for not getting back to you earlier on these changes.  In any case, yes, I agree with the updates.

Thank you 

-----Original Message-----
From: Hans Wennborg [mailto:hwennborg@google.com] 
Sent: Friday, May 25, 2012 10:13 AM
To: public-speech-api@w3.org
Subject: Re: Calling start() on an already started SpeechRecognition object

On Thu, May 24, 2012 at 1:55 PM, Hans Wennborg <hwennborg@google.com> wrote:
> On Wed, May 16, 2012 at 2:37 PM, Hans Wennborg <hwennborg@google.com> wrote:
>> Hi all,
>>
>> The spec should say what happens when calling start() on an already 
>> started SpeechRecognition object, and calling stop() or abort() on a 
>> non-started object.
>>
>> Do we want to throw an exception? Fire an error event? Do nothing?
>
> If there are no objections, I'll update the draft tomorrow to say that 
> calling start() on an already started SpeechRecognition object causes 
> an InvalidStateError [1] exception to be thrown, and the same for
> stop() and abort() on a non-started object.

I've updated the spec: http://dvcs.w3.org/hg/speech-api/rev/386b0c5dd555

I changed my mind about throwing exceptions for calling stop() or
abort() on already stopped (or non-started) objects. I think we should just ignore such calls instead. This way, web pages can call these functions as part of clean-up code without worrying about catching an exception or trying to keep track of whether the object was started or not.

Thanks,
Hans
Received on Friday, 25 May 2012 18:38:16 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 25 May 2012 18:38:17 GMT