speechd-discuss
[Top][All Lists]
Advanced

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

[PATCH 5/7] remove spd_audio_stop from modules


From: Christopher Brannon
Subject: [PATCH 5/7] remove spd_audio_stop from modules
Date: Tue, 04 Jan 2011 14:14:09 +0000

Andrei Kholodnyi <andrei.kholodnyi at gmail.com> writes:

> it is not the task of the synth module to stop audio.
> now we stop audio before we call module_stop or module_pause

I should have replied to this patch a long time ago.
I think that it has a race condition, and there may be race conditions
in the current code.

Here's the problem.  Speech Dispatcher asks the module to stop.  Two
things must happen.  The currently-playing audio must stop, and the
underlying TTS engine must no longer generate speech.
The race condition comes between stopping audio and stopping speech
synthesis.  The TTS engine could generate more audio, even though audio
has been stopped.

Instead, shouldn't we always stop synthesis before stopping audio?  This
would guarantee that no speech can be produced after audio was stopped.

-- Chris



reply via email to

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