checkm

domenica 18 marzo 2007

/dev/dsp su Gentoo

Alcuni programmi come festival davano questo errore per /dev/dsp:

festival> (SayText "foobar")
Linux: can't open /dev/dsp
#<Utterance 0xb70d3aa8>
festival>


Per risolvere ho configurato il kernel così:

Device Drivers  --->
Sound --->

<*> Sound card support

Open Sound System --->
< > Open Sound System (DEPRECATED)

Advanced Linux Sound Architecture --->
Advanced Linux Sound Architecture
(Select this if you want MIDI sequencing and routing)
Sequencer support
OSS Mixer API
OSS PCM (digital audio) API

PCI devices --->
Intel/SiS/nVidia/AMD/ALi AC97 Controller

In seguito ho fatto modprobe "snd-pcm-oss" per caricare il modulo che crea /dev/dsp.
Poi ho aggiunto a /etc/modules.autoload.d/kernel-2.6 la seguente riga:

snd-pcm-oss

Per fare in modo che il modulo venga caricato all'avvio.
E /dev/dsp con festival funziona a dovere. :-)

1 commento:

jooggler ha detto...

ottimo, ma in questo modo usi /dev/dsp che è un vecchio modo (emulazione oss).
E' inutile e non si capisce perché festival dovrebbe usarlo.

Se aggiungi le seguenti righe

;use ALSA
(Parameter.set 'Audio_Method 'Audio_Command)
(Parameter.set 'Audio_Command \"aplay -q -c 1 -t raw -f s16 -r \$SR \$FILE\")

al file .festivalrc nella tua home, per suonare i files festival userà il modo che usano anche gli altri programmi (aplay nello specifico).