speechd-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with new module


From: Hynek Hanke
Subject: Problem with new module
Date: Mon, 07 Jan 2008 11:54:05 +0100

Bohdan R. Rau p??e v P? 28. 12. 2007 v 08:31 +0100:
> Ivona has very good voice quality, but is very slow, so it's not a good
> idea to catch the full wave before playing. I noticed there is no
> possibility with speechd builtin audio functions to play wave while
> reading so I used libao for audio output - but I don't think it's a good
> solution.

Hi Bohdan,

you can retrieva audio in smaller chunks and play them one by one
when synthesizing a longer text, actually this is the prefered way
to do it for slower synthesizer. Look for example in the Festival
output module.

One big drawback of the current mechanism however is that each
sound played via spd_play() is played independently, they are
treated as independent sounds. So in other words, if the sound
is not splitted on reasonable places (sentence or at least word
boundaries), you might hear clicks during the playback.

If this is the target of your question, the only answer right
now is that in the TTS API Provider that we are currently
developing as a part of a new and more advanced implementation
of Speech Dispatcher, this is solved differently via
a simple sound subsystem, so that you are able to feed
data into a stream that is already under playback.

For the current Speech Dispatcher, I recommend to either
retrieve the data from the synthesizer in indepentent
pieces = sentences etc. (like we do with Festival),
or to at least attempt to split the text into such pieces
before sending it to the synthesizer.

> audio_open();
> while ((size=read(socket,buffer,BUFSIZE))>0) {
>       /* check for stop, pause or sth */
>       play_audio_part(buffer,size);
> }
> audio_close();

Yes, you could write this code using the spd_play() function. spd_play()
is blocking, it can however be interrupted by calling spd_stop() from
another thread.

Thanks a lot for your work!
Hynek




reply via email to

[Prev in Thread] Current Thread [Next in Thread]