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

TTS.append() (Was: Re: Speech API: first editor's draft posted)

From: Hans Wennborg <hwennborg@google.com>
Date: Tue, 24 Apr 2012 16:36:13 +0100
Message-ID: <CAB8jPhdA7jp7Vj=zds4sDvqSj12vxU5=ApphXC1rBsyt4sm-SQ@mail.gmail.com>
To: Jim Barnett <Jim.Barnett@genesyslab.com>
Cc: public-speech-api@w3.org, Satish S <satish@google.com>, Glen Shires <gshires@google.com>
On Fri, Apr 13, 2012 at 14:58, Jim Barnett <Jim.Barnett@genesyslab.com> wrote:
> A couple of quick comments:
> 1) The current TTS API sets the string to be played as a single action.
> Could it be useful to add an 'append' function, allowing the programmer
> to append text to the string that is already playing?  I'm thinking of
> the case where the page wants to play out a large document, possibly one
> that's being streamed from another source.  We'd have to handle the edge
> cases, of course.  For example, I think that doing an append after the
> play had stopped (when 'ended'==true) would simply set the text field
> and a new start() would be required before play would resume.

I think the web page could achieve the same effect as having an
'append' function by using the 'onend' handler on the TTS object, and
start playing the new text as soon as the old playback finishes.

Thanks,
Hans
Received on Tuesday, 24 April 2012 15:37:02 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:27:22 UTC