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

Bug#712725: pu: package espeak/1.43.03-2



Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: pu

Hello,

A user reported that “using espeak as an emacspeak speech server is
basically unusable if you're using pulse, which is kind of the default
configuration in wheezy.” (Bug#712629). This happens because the last
chunk of the synthesized sample gets lost. A simple solution was found
by forcing a flush, see patch below. Would it be OK to upload to wheezy?

Samuel


Description: Trigger speech start on final chunk of write
 When espeak is used with pulseaudio, the last part of a line or other chunk
 is not spoken because pa_stream_trigger needs to get called to start
 speech.  This is called if the buffer is full and writes are not
 progressing.  However nothing calls this for the last part of what's
 being spoken.  The contract for wave_write on the portaudio side
 seems to start the stream, so do the same on pulse.
 This patch takes advantage of the fact that calling pulse_free twice
 in a row with no write causes a trigger.  An alternative but larger
 change would be to refactor that code out of pulse_free.

Author: Sam hartman <hartmans@debian.org>


---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:


--- espeak-1.46.02.orig/src/wave_pulse.cpp
+++ espeak-1.46.02/src/wave_pulse.cpp
@@ -731,6 +731,9 @@ size_t wave_write(void* theHandler, char
     }
 
   pulse_write(aBuffer, bytes_to_write);
+  //trigger
+  aTotalFreeMem = pulse_free();
+  aTotalFreeMem = pulse_free();
 
  terminate:
   pthread_mutex_unlock(&pulse_mutex);


Reply to: