Aplay terminates Fonix DECtalk, sometimes Orca

Bug #54975 reported by Joanmarie
2
Affects Status Importance Assigned to Milestone
gnome-orca (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

If Orca is running using Fonix DECtalk, and aplay plays two sounds, speech
stops. Sometimes Orca terminates.

Steps to reproduce:
1. Launch Orca from GNOME terminal
2. In a different terminal window execute aplay /usr/share/sounds/phone.wav
3. Repeat step 2

Actual results:
The first time, the sound is played; the second time it's played but Orca stops
speaking.

Expected results:
The sound would be played and Orca would continue to speak.

Does this happen every time?
Yes

Other information:
While I can reproduce this 100% of the time, it seems to be the result of a
very specific combination:

1. I can only reproduce it on my laptop which has the following:
    Ubuntu 6.06, current (as of this moment) Orca from CVS
    ATI Technologies Inc
    IXP SB400 AC'97 Audio Controller

    I cannot reproduce this problem on either of my desktop computers (each of
which has a dedicated sound card rather than onboard sound)

2. It only occurs with Fonix DECtalk; not festival

Sometimes I get the following output from Orca:

---

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/orca/gnomespeechfactory.py", line 688,
in __speak
    return speaker.say(text)
  File "/usr/lib/python2.4/site-packages/orca/gnomespeechfactory.py", line 95,
i n say
    return self.gnome_speaker.say(text)
COMM_FAILURE

Restarting speech...

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/orca/gnomespeechfactory.py", line 688,
in __speak
    return speaker.say(text)
  File "/usr/lib/python2.4/site-packages/orca/gnomespeechfactory.py", line 95,
i n say
    return self.gnome_speaker.say(text)
COMM_FAILURE

Restarting speech...
Something looks wrong with speech. Aborting.

---

I had originally filed this at GNOME: http://bugzilla.gnome.org/show_bug.cgi?id=349571

It was closed out as not GNOME.

Revision history for this message
Luke Yelavich (themuso) wrote :

This is unfortunately something that is not really solvable with the current GNOME/esd/ALSA architecture for sound.

I suggest you try turning off esd, and see what happens. The two sounds play, because you are using aplay to play a sound file, which is using ALSA. However, Software DECtalk still only uses OSS, so it can only get exclusive access to the sound device, whereas ALSA apps are quite happy to have their output mixed together, because of the way they talk to
ALSA.

To turn off esd, do the following:
1. Go to the System menu, Preferences, and choose Sound.
2. Uncheck the "Enable software sound mixing (ESD)" checkbox.
3. Log out and back in again.

Revision history for this message
Daniel Holbach (dholbach) wrote :

Does that help?

Revision history for this message
Joanmarie (joanmarie-diggs-deactivatedaccount) wrote :

Not in terms of making the problem go away. :-) The problem persists in Feisty, even with esd turned off.

But it is helpful to know what the problem is. In light of Luke's explanation, the best solution seems to be to disable unnecessary sound events and/or use a different software sythesizer.

Revision history for this message
Henrik Nilsen Omma (henrik) wrote :

Hi Joanie,

Have you tried Feisty on that laptop? Does it happen with eSpeak?

Revision history for this message
Joanmarie (joanmarie-diggs-deactivatedaccount) wrote :

Hi Henrik!

Yup, Feisty is on this laptop. And I've been using eSpeak lately. I hadn't tried the test in this bug with it, however. Turns out the problem is slightly worse under those circumstances. With DECTalk, the second play of the .wav file causes me to lose speech, but not sound. With eSpeak running, I lose all sound and get this error:

ALSA lib pcm_dmix.c:864:(snd_pcm_dmix_open) unable to open slave
aplay: main:550: audio open error: Device or resource busy

I continue to get that error until I quit Orca.

On a related note, I just realized that I'm seeing similar competition/resource grabbing in at least one other environment: Totem. If I am using eSpeak with Orca and launch Totem (with no media files open or playing), Orca will not speak the contents of anything (e.g. the menu items). If I am using DECTalk, however, Orca will. Guess I should file that. :-)

Revision history for this message
Luke Yelavich (themuso) wrote :

This has been addressed in hardy. All gnome-speech audio output should now be played through PulseAudio, as well as sytem sounds, and other audio applications.

Changed in gnome-orca:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.