Bug 506624

Summary: espeak hangs and APIs hangs as well
Product: [Fedora] Fedora Reporter: William Estrada <mrumunhum>
Component: espeakAssignee: Francois Aucamp <francois.aucamp>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: low    
Version: 10CC: francois.aucamp
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 1.40.02-2.fc11 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-07-11 16:57:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description William Estrada 2009-06-18 01:50:29 UTC
Description of problem:
espeak hangs while processing text.

Version-Release number of selected component (if applicable):

FC10
How reproducible:
run test program attached or enter ;espeak hi; over and over until it hangs

Steps to Reproduce:
1.compile program and run, it will hang on different lines.
of run 'espeak hello'  over and over again
2.
3.
  
Actual results:
it speaks some lines the hangs

Expected results:
speak all input line with no hangs

Additional info:
I have written a sample program using the espeak APIs.
Both sample and the espeak program will hang. not always
on the same line.

Comment 1 William Estrada 2009-06-18 16:29:42 UTC
Here is another test:

while [ 1 ]; do espeak hi ; date;done

It may run for 20 times or just 2 but it will hang.

Comment 2 Francois Aucamp 2009-06-19 12:53:05 UTC
Hmm... I've tested this on two Fedora 11 machines (i386 and x86_64) quite a few times, and am unable to replicate the problem (also using the while [1] snippet above; it runs a few hundred times before I manually kill it with ^C)... Nevertheless, espeak has been updated to 1.40 upstream, so I'll update the Fedora package.

Is there any console output when espeak hangs on your system? Is it possible that some other application (skype, arts, etc) is perhaps locking the sound device during calls to espeak?

Finally, have you tried reading a large text file with espeak to see if that hangs? e.g. try:

$ espeak -f /usr/share/doc/espeak-1.39/License.txt

That should read the entire file. If that doesn't hang mid-read, it is very probable that something else is locking the sound card.

Comment 3 William Estrada 2009-06-20 17:23:28 UTC
I have 1.40 source installed and still have the same problem.

Tested your example" 'espeak -f /usr/share/doc/espeak-1.39/License.txt' an about that also hangs about the third line. No other sound processes are running.

I am beginning to think it is my very Linux unfriendly Fujitsu Lifebook laptop??
I will try it on another laptop I have and let you know.

Comment 4 William Estrada 2009-06-21 18:40:05 UTC
It works OK on my Acer Aspire running FC10, so I guess it is a problem with the drivers for my Fujitsu laptop?? Don't think I can help debug the problem so I will close this bug.

Comment 5 William Estrada 2009-06-21 18:57:28 UTC
I found this link about this problem in Ubunutu.
http://ubuntuforums.org/showthread.php?t=1145967&page=3
It recommends this and it appears to work correctly.

espeak
Espeak is behaving oddly, hanging or cutting off some words. (Launchpad).

Workaround: pipe its output to aplay:
Code:

espeak "hello" --stdout | aplay

Also this comment:
 Re: Known Jaunty Jackalope bugs with workarounds
ATI driver with new Ubuntu 9.04 will give a delay when maximizing or minimizing windows. That's due to a patch that was removed from Xorg for the sake of intel cards. Go figure...make ubuntu less compatible with 40% of the cards in the market (ATI) in order to make it compatible with 10% of the cards? Anyways, here's the steps to fix it.

Code:

1. Open synaptic
2. Menu: Settings -> Repositories
3. Click the tab: Third Party Software
4. Click the button "Add" then enter "deb http://ppa.launchpad.net/ubuntu-x-swat/xserver-no-backfill/ubuntu jaunty main", then click ok
5. Click the button "Add" again then enter "deb-src http://ppa.launchpad.net/ubuntu-x-swat/xserver-no-backfill/ubuntu jaunty main", then click ok
6. Click "Close"
7. Click "Reload"
8. Click "Mark All Upgrades"
9. Click "Apply"
10. Logout and log back in.

So I guess it is a driver problem?

Comment 6 Francois Aucamp 2009-06-22 08:48:26 UTC
I doubt that Ubuntu's ATI video driver issue is affecting us here, since my laptop is a Toshiba x86_64 with an ATI Radeon HD 3400, running the default driver that comes with Fedora, and it works fine (read: doesn't interfere with audio drivers). 

My guess would be that (like you said) there is some strange incompatibility between pulseaudio, portaudio (the lib that espeak uses to produce audio; currently it has no direct pulseaudio support) and alsa on your system. If the "pipe espeak to aplay" workaround doesn't work for you (or if you want to test that theory), you could try running espeak using pasuspender:

$ pasuspender espeak "hello"

If that doesn't work fine, it's not pulseaudio, and it is most probably a alsa driver-related problem.

Comment 7 William Estrada 2009-06-22 19:22:24 UTC
I can't find pasuspender on my system.

The pipe to aplay worked.

Your system is a 64 bit cpu, so the drivers would be different than my 32 bit pc, right??

I don't like using the work around but I'm not smart enough to fix it the right way.

Comment 8 Francois Aucamp 2009-06-30 12:28:33 UTC
I'm reoping this, as I am about to push a new update to eSpeak which is compiled against pulseaudio instead of portaudio, which I believe will solve this problem.

Comment 9 Fedora Update System 2009-06-30 12:31:04 UTC
espeak-1.40.02-2.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/espeak-1.40.02-2.fc11

Comment 10 Fedora Update System 2009-06-30 12:31:13 UTC
espeak-1.40.02-2.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/espeak-1.40.02-2.fc10

Comment 11 William Estrada 2009-06-30 16:58:54 UTC
Appears to have fixed the problem. I force installed on my FC10 system.
The link goes to a FC11 rpm file but it installed OK.

Thanks for the fix and your time.

Comment 12 Fedora Update System 2009-07-02 05:45:05 UTC
espeak-1.40.02-2.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update espeak'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-7205

Comment 13 Fedora Update System 2009-07-02 05:50:18 UTC
espeak-1.40.02-2.fc10 has been pushed to the Fedora 10 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update espeak'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-7250

Comment 14 Fedora Update System 2009-07-11 16:56:51 UTC
espeak-1.40.02-2.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 15 Fedora Update System 2009-07-11 17:31:44 UTC
espeak-1.40.02-2.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.