pkgsrc-Users archive

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

Re: audio/flite: remove flush in play_wave()



On Wed, 21 Feb 2024, Brian Buhrow wrote:
	hello.  It sounds like you're on the same path I was on, just with newer code.  First, get
speech synthesis working without loss.   Don't worry about interruptability.  Then, when that's
good, begin the process of figuring out how to make the synthesizer, i.e. Flite and the sound
card, stop on demand, regardless of whether there is additional text to be synthesized.  If I
understand where you are, you're at the stage where uninteruptable synthesis is working.

	I wonder if it might be useful to write yourself a small test program that takes PCM audio
and feeds it to a sound device, using the same API Flite uses to talk to that sound device.
Then, see if you can get that test program to stop the audio device on demand reliably.  then,
by having the test program tell you where in the audio stream silence should have been achieved
and comparing that with what you actually hear, you'll be able to explore the semantics of the
API and figure out what works, what doesn't and what the different behaviors are.  I seem to
remember what I did was to take a fixed piece of text, get the synthesizer to speak it, and
then see if I could interrupt it faster and faster.  If I could get the synthesizer to stutter
over a single phoneme, I was doing pretty well.  The reason for the test program is to
confirm that your understanding of how the audio API works is correct and making sure you know
that piece well outside of the Flite and eflite environments.

-Brian

I was in that point before. Now that the wave thread is canceled,
the speech stops pretty fast. For example, in yasrs (the version
you use) I can use the cursor keys to move from a letter to another.
The sound stops inmediatly and the new letter under the cursor is
synthesized with an unnoticed delay. I'm seeing other problems,
but I' ll wait until I test the latest yasr. About the test program,
don't worry, soon you'll hear from me asking for advice in the
lists.

adr


Home | Main Index | Thread Index | Old Index