Re: [g-a-devel] Seek suggestion on how to use gnome-speech programatically



Aditya Pandey wrote:

Hi

I hope this would be the right forum for seeking help on programming
related to gnome-speech. If not, please excuse and if possible, help
me with the info on the right mailing list.
You're in the right place for gnome-speech.

While Gnopernicus is good and standardised, my application needs its
own text-to-speech support. I think that gnome-speech would be a good
wrapper to use, as it looks set to be a default wrapper for TTS
engines/synthesizers.
Yes.  Gnome-speech supports at least six different TTS engines at this time.

I need to support these features for my application (Actual
application implemented this feature using Microsoft SAPI, so the
model was made assuming that):

1. Queue the text
2. Talk
3. Pause/Resume anytime.
4. Stop.

Of these functions, Stop is fairly straightforward. But in gnome-speech, queue and talk are combined into single step
(which I can handle using queue of my own).
Sure.

How to do pause/resume anytime while speech is going on? Any
ideas/suggestions/advice? Would this involve using callbacks (I think
they are not available in festival driver, am I correct)?

Yes, you can do this with callbacks.  The festival driver in recent versions of gnome-speech _does_ support callbacks.  At the moment they (festival callbacks) are end-of-speech markers only.  Therefore, you will want to divide your text into sections of the desired 'granularity'.  In order to pause, call "wait" to ensure that the speaker will pause after the currently speaking utterance, then call "stop" and use the last "callback" received to determine how far along the speech had gotten.  To resume, re-issue any "say" commands in your output list that come after that "last callback received" speech chunk.


(note that 'wait' is missing for the festival driver implementation code, I'm filing a bug on that today; its absence should not be a problem for you since you can still call the GNOME_Speech_Speaker wait() method, but it will do nothing when using the Festival driver).

regards

Bill


Packages I use:
gnome-speech-0.3.0 (Not the latest I know, but RH Linux only supports
it or older)
festival-1.4.2





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