Can't get SAY to work (Program Bug and Problems)

by Hans Linkels @, Saturday, January 15, 2011, 01:19 (3138 days ago)

Hello,

I have basic256 version 9.6.50 installed in Debian Sid.
flite is installed and works from the command line.
espeak is installed and works from the command line.
SOUND from basic256 works

I have alsa installed and I am using a USB headset. The headset is set as default output device. Sound from Skype, Firefox and mplayer work as well. flite and espeak work thru the headset as well.
flite and espeak are installed in /usr/bin and this is part of the PATH.

However I cannot get the SAY command to work. I can't imagine any option or debug action.

Any pointers greatly appreciated.

regards
Hans Linkels

Can't get SAY to work

by Hans Linkels @, Saturday, January 15, 2011, 01:51 (3138 days ago) @ Hans Linkels

Some more info: as soon as I have basic256 open, espeak doesn't work from the command line anymore. No error message, the prompt disappears for the time it takes to speak the sentence, but nothing is heard.
When I close basic256 again, espeak works again immediately.

jlinkels

Can't get SAY to work

by Jim ⌂ @, Russell, KY, Monday, January 17, 2011, 20:58 (3135 days ago) @ Hans Linkels

Hans,

I have not heard of this issue before. I have one question. Did you modify the file "BASIC256.pro" or did it compile correctly without change?

Be sure that the espeak development library is installed and that the flite lines in the .pro file are commented out. The SAY statement will not work if you are trying to use both TTS libraries at the same time.

Jim

Can't get SAY to work

by Hans Linkels @, Tuesday, January 18, 2011, 18:55 (3134 days ago) @ Jim

Hi Jim,

Thanks for your answer.

I see a few issues:
- currently both espeak and flite are installed, although I am sure I did testing with only one of the two installed, just cannot remember which I installed first. I ĺl repeat that.
- the espeak development files are not installed, everything else is.
- I did not compile myself but used a pre-compiled Debian package. Compiling in Debian requires some more work to do it debian-correct.

I'll try the options, the easiest first, and report back.

Thanks
Hans

Can't get SAY to work

by Hans Linkels @, Thursday, January 20, 2011, 01:30 (3133 days ago) @ Hans Linkels

Hi Jim,

Thanks for your answer.

I see a few issues:
- currently both espeak and flite are installed, although I am sure I did testing with only one of the two installed, just cannot remember which I installed first. I ĺl repeat that.

I had eflite uninstalled.

- the espeak development files are not installed, everything else is.

I installed the espeak dev files. No SAY

- I did not compile myself but used a pre-compiled Debian package. Compiling in Debian requires some more work to do it debian-correct.

Tried to compile from source. Installed a number of additional source packages to make it compile correctly. Compiled. Run. No SAY :(

Is there any flag I can set so debug statements appear on the command line when I start the app from a terminal. I mean application debug, not Basic debug.

BTW, this happens on 2 different machines, both running Debian Unstable. Any libraries/versions I should check?

Thanks for any help you can provide. Getting SAY to work has more or less become my mission in life for the next few days.

Hans


Thanks
Hans

Can't get SAY to work

by Jim ⌂ @, Russell, KY, Thursday, January 20, 2011, 16:01 (3132 days ago) @ Hans Linkels

Hans,

I am currently installing Debian sid into a VirtualBox and I am going to see if I can get "SAY" to work. Hopefully I can find the trick we are missing.

Jim

Can't get SAY to work

by Hans Linkels @, Friday, January 21, 2011, 01:09 (3132 days ago) @ Jim

Hans,

I am currently installing Debian sid into a VirtualBox and I am going to see if I can get "SAY" to work. Hopefully I can find the trick we are missing.

Jim

Jim,

That's real nice of you.
Yesterday night I experimented some more. I am absolutely sure now espeak_Synth is called and returns EE_OK. I even added a espeak_SetParameter to set the volume at 100%, returns EE_OK as well.

espeak from the command line still produces sound. One starts to think about an error in espeak API, isn't it? I googled a bit about that but didn't find anything useful.

No experimenting anymore tonight, way too tired.

Thanks again so far.

Hans

Can't get SAY to work

by Jim ⌂ @, Russell, KY, Friday, January 21, 2011, 02:41 (3131 days ago) @ Hans Linkels

Hans,

I totally agree with your thoughts on an error in the espeak_Synth API function. I believe it is coming from an error between the "portaudio" driver used internally with espeak, the portaudio library (18 or 19), and other goofy audio stuff (alsa).

If you download 0.9.6.59 from SourceForge you will see that I have added an option to use espeak from a system shell and not from the library. This worked very well for me on a virtual Debial sid I have and was how it was originally implemented (a couple of years ago).

1. download the tgz file
2. make sure all of the dependencies ate installed per the COMPILING.txt file
3. edit the BASIC256.pro file and comment out the lines for the espeak library and uncomment the line for the LINUX_ESPEAK_EXECUTE
4. follow compiling instructions: make clean, qmake, make, sudo make install

Tell me what happened.
Jim

Can't get SAY to work

by Hans Linkels @, Saturday, January 22, 2011, 00:32 (3131 days ago) @ Jim

Hans,

I totally agree with your thoughts on an error in the espeak_Synth API function. I believe it is coming from an error between the "portaudio" driver used internally with espeak, the portaudio library (18 or 19), and other goofy audio stuff (alsa).

If you download 0.9.6.59 from SourceForge you will see that I have added an option to use espeak from a system shell and not from the library. This worked very well for me on a virtual Debial sid I have and was how it was originally implemented (a couple of years ago).

1. download the tgz file
2. make sure all of the dependencies ate installed per the COMPILING.txt file
3. edit the BASIC256.pro file and comment out the lines for the espeak library and uncomment the line for the LINUX_ESPEAK_EXECUTE
4. follow compiling instructions: make clean, qmake, make, sudo make install

Tell me what happened.
Jim

Jim,

I compiled the package as per your directions, and I can confirm espeak is now called as a system call. However, no sound was heard from the USB headset.

BUT I did some discoveries. From BASIC256 espeak is playing thru the on-board sound card, not the USB headset which is the default.

When BASIC256 is not running, espeak from the command line plays thru my USB headset.
When I start BASIC256 espeak from the command line still plays thru my USB headset.
After I run a SAY command in BASIC256, sound comes from the on-board card
With BASIC256 still running (the application, not the basic program) when I run espeak from a command line again, sound still comes from my on-board card.
After closing BASIC256, espeak from the command line plays thru my USB headset again.

Other applications (mplayer on the command line, youtube in the browser) show exactly the same behaviour.

It seems as running the SAY command makes my on-board sound device the default device, and as soon as I terminate BASIC256, the default device returns to what I specified in asound.conf.

Hans

Can't get SAY to work

by Jim ⌂ @, Russell, KY, Sunday, January 23, 2011, 02:08 (3129 days ago) @ Hans Linkels

According to the espeak documentation it uses the portaudio library for sound. I will look at the documentation and see if I should change the library to use a different parameter.

RSS Feed of thread
powered by my little forum