Bug#848016: brltty-espeak: very monotonous speech and noticable delays in speech output
Eric Scheibler, on Wed 11 Jan 2017 15:48:39 +0100, wrote:
> I think, that the mute delay and overlapping belong to the same problem. It seems, that the
> espeak-ng module needs too long to clean the current speech buffer. Or in other words: the time
> between the call to cancel speaking and the actual stop of speech is much higher then before.
It seems that by trying various sound setup cases, I eventually found
one where audio output isn't actually asynchronous (using ALSA with
snd_pcm_mmap_writei), and thus pcaudiolib gets stuck while pushing
it. It seems to get better by reducing espeak-ng's buffering.
Could you try to rebuild espeak-ng after modifying file
src/libespeak-ng/speech.c in the espeak_ng_InitializeOutput function,
buffer_length = 200;
into for instance
buffer_length = 20;
or some value between e.g. 10 and 200.
I'm very surprised to see this 200 value, which means 200ms, while
studies have shown that "interactivity" is usually seen bad by humans
One thing we can do for Stretch is to reduce this value to something
acceptable. A low value make espeak-ng more CPU-intensive, but that
shouldn't be too harmful.