Topics

[espeak-ng:master] reported: sluggish speech interruption #github

espeak-ng@groups.io Integration <espeak-ng@...>
 

[espeak-ng:master] New Comment on Issue #172 sluggish speech interruption
By rhdunn:

The dee3799 commit is intended to be used with the pcaudiolib fix in https://github.com/espeak-ng/pcaudiolib/commit/8a013933f66b58c18e94eae9108fd573467f792b. That is, the fix for the ALSA issue has been moved to pcaudiolib -- instead of calling snd_pcm_drop, it closes the device then opens a new device with the same parameters as the original.

That is why I asked about affected audio APIs (i.e. given that pulseaudio ).

@sthibaul The fix-cancel.txt patch only calls close/open in the my_stop_is_required if branch, not at the end of say_thread. My changes in both of the commits listed at the top were equivalent to the fix-cancel.txt patch with close/open_audio merged into a single cancel_audio function, and the close/open behaviour moved into the ALSA implementation of audio_object_flush.


I agree about fixing the places where the audio APIs are called to address the threading issues. I'll see what I can do.

espeak-ng@groups.io Integration <espeak-ng@...>
 

[espeak-ng:master] New Comment on Issue #172 sluggish speech interruption
By CMB:

There are two places that stop requests are handled / acknowledged. One is in close_stream. The other is at the end of the big main loop in say_thread. Lines 337-351 from src/libespeak-ng/fifo.c. Those line numbers are from master, which is at commit 130a87cb as I write this. The close_stream place has a cancel_audio; the 337-351 place doesn't (and should).

Regards.

espeak-ng@groups.io Integration <espeak-ng@...>
 

[espeak-ng:master] New Comment on Issue #172 sluggish speech interruption
By sthibaul:

Reece H. Dunn, on Sat 28 Jan 2017 11:1720 -0800, wrote: > So IIUC, there is just the thread safety issue remaining for this?

By moving the audio_object_flush call from espeak_ng_Cancel to the if (my_stop_is_required) block in say_thread, yes.

Samuel