Skip to contentSkip to conversation

trouble using dmix with tts systems (accessibility )

DISCUSSION Halim Sahin 2 participants 3 messages Mar 20, 2009 – Mar 23, 2009

lore
Share & tools
lore
#0 lore raw

hello,

I have asked this question to alsa user list but got no useful answer.

I am a blind linux user and need asistive Technology to use my pc. The problem I have experienced with alsa is that it is sometimes too slow to stop previous output before starting a new one.
The result of this ends in several speech outputs at a time.
The problem only occurs if the dmix plugin is used.

Is there a way to modify the buffer to avoid these delays???
I have tried to customize my buffer_size vallue in ~/.asoundrc but I wasn't able to to create a working setup with dmix.

All help appreciated ;-)
Regards
halim

#1 lore raw

At Fri, 20 Mar 2009 09:28:02 +0000 (UTC),

Quoted 10 lines · Halim Sahin

hello,

I have asked this question to alsa user list but got no useful answer.

I am a blind linux user and need asistive Technology to use my pc. The problem I have experienced with alsa is that it is sometimes too slow to stop previous output before starting a new one.
The result of this ends in several speech outputs at a time.
The problem only occurs if the dmix plugin is used.

Could you elaborate how the previous output is stopped, and how the next sample is started? Are they different processes, open/close sequences, or snd_pcm_drop() / prepare / re-start, or what?

It'd be best if you could show a small test-case program to reproduce the problem...

thanks,

Takashi

#2 lore raw

Hello Takashi

Quoted 13 lines · Takashi Iwai

At Fri, 20 Mar 2009 09:28:02 +0000 (UTC),

Quoted 10 lines · Halim Sahin

hello,

I have asked this question to alsa user list but got no useful answer.

I am a blind linux user and need asistive Technology to use my pc. The problem I have experienced with alsa is that it is sometimes too slow to stop previous output before starting a new one.
The result of this ends in several speech outputs at a time.
The problem only occurs if the dmix plugin is used.

Quoted 3 lines

Could you elaborate how the previous output is stopped, and how the next sample is started? Are they different processes, open/close sequences, or snd_pcm_drop() / prepare / re-start, or what?

It seems that the speech-server is using the following functions to handle sound output through alsa:
snd_pcm_drop, snd_pcm_status..., snd_pcm_prepare, snd_pcm_resume ....

The server can be found here:
http://www.freebsoft.org/pub/projects/speechd/speech-dispatcher-0.6.7.tar.gz
The alsa code can be found in file
speechd_0.6.7/src/audio/alsa.c

Quoted 2 lines

It'd be best if you could show a small test-case program to reproduce the problem...

Please have a look to speech-dispatcher , which shows the problem.

I can reproduce the mentioned problem with other apps as well like mplayer. mplayer -ao alsa *.mp3
During playback simply press right/left for forward/backward. This step uses dmix if it is enabled!
Then try the same with:
mplayer -ao alsa:device=hw=0.0 *.mp3

Please ask if you have more questions.
I.ll be happy if we can find a working solution for the speech stuff. Thanks a lot
for your response.
Regards
halim