Re: TTS proposal to split Utterance into its own interface

On Fri, Aug 17, 2012 at 10:39 PM, Dominic Mazzoni <dmazzoni@google.com> wrote:
> Thanks!
>
> Anyone else have thoughts on this proposal? Hans?

Sorry for being silent on this thread. I've concerned mostly with the
speech recognition part lately.

I think your proposal looks very good! I like the idea of just having
a singleton that hangs off window. (Which makes me wonder if we should
do the same for speech recognition too?)

If the other CG members think this looks good too, I'd be happy to
update the draft.

Cheers,
Hans


> On Fri, Aug 17, 2012 at 2:36 PM, Olli Pettay <Olli.Pettay@helsinki.fi> wrote:
>>
>> [NoInterfaceObject]
>> interface SpeechSynthesisGetter
>> {
>>   readonly attribute SpeechSynthesis speechSynthesis;
>> };
>>
>> Window implements SpeechSynthesisGetter;
>>
>> On 08/17/2012 08:59 PM, Dominic Mazzoni wrote:
>>>
>>>
>>> Ex 1:
>>> speechSynthesis.speak(SpeechSynthesisUtterance('Hello World'));
>>>
>>> Ex 2:
>>> var u = new SpeechSynthesisUtterance();
>>> u.text = 'Hello World';
>>> u.lang = 'en-US';
>>> u.onend = function() { alert('Finished!'); }
>>> speechSynthesis.speak(u);
>>>
>>> interface SpeechSynthesis {
>>>    readonly attribute boolean pending;
>>>    readonly attribute boolean speaking;
>>>    readonly attribute boolean paused;
>>>
>>>    void speak(SpeechSynthesisUtterance utterance);
>>>    void cancel(SpeechSynthesisUtterance utterance);
>>>    void pause();
>>>    void continue();
>>>    void stopAndFlushQueue();

I wonder if we could come up with a less verbose name than
stopAndFlushQueue, but that's just a minor detail.

>>> }
>>>
>>> [Constructor,
>>>   Constructor(DOMString text)]
>>> interface SpeechSynthesisUtterance {
>>>    attribute DOMString text;
>>>    attribute DOMString lang;
>>>    attribute DOMString serviceURI;

What does serviceURI do in this context?

>>>
>>>    readonly attribute boolean speaking;
>>>    readonly attribute boolean paused;
>>>    readonly attribute boolean ended;
>>>
>>>    attribute Function onstart;
>>>    attribute Function onend;
>>> }

Received on Monday, 20 August 2012 09:49:35 UTC