Loading Blog Search...

Sunday, May 22, 2005

stardict on debian (voice problem)

My stardict on debian has never output any voice util 10 mins ago. You can see the problem here > > >
> > >
> > > On Fri, 2004-10-22 at 11:31 +0800, Zhao Li wrote:
> > > > hello,
> > > > i'm a newone of debian. moved from fedora just now.
> > > > and now i met a problem about audio.
> > > > i installed kernel 2.6 and enabled alsa modules.
> > > > seems everything is ok before i try stardict, i.e., i can use aplay,
> > > > alsaplayer, active arts based on alsa, etc.

(gnome-sound-recorder does > > > > not work, i think it is normal, as i start arts, right?)
> > > > i installed voice files for stardict, however, i cannot hear any
> > > > voice from it, while i can use artsplay to play these .wav files. ( i
> > > > can hear voice from stardict under fedora core 1-2 with alsa+arts)
> > > >
> > > > who can help me, highly appreciate.
I ask the author of stardict-ed () why?
Thank him so much, the reason is quite simple.

stardict use two methods for playing wav files:
on Windows it use PlaySound (WIN32 API)
on Linux gnome_sound_play (Gnome API).
So if you not use Gnome and use Window Manager/Desktop Environment which
have its own API for work with sound, may be some problems with sound
output. For example, if you use KDE it blocks /dev/dsp, so
gnome_sound_play didn't work.

stardict-ed use three methods for playing wav files:
all that use stardict +
if it compiled without gnome support for play wav files
((./configure --disable-gnome-support))
it execute "play" utility ("play" utility is part of sox package).
You can change play command for whatever you want,
just change in preference dialog appropriate value,
but before doing make certain that it play wav file,
if you call it with wav file as argument.
For example in KDE "play" command didn't work:

$play /usr/share/stardict/sounds/buttonactive.wav
sox: Can't open output file '/dev/dsp': Device or resource busy

No comments: