Festival: can't open /dev/dsp

I just installed festival-2.1-3.1.2.x86_64 package on my AMD64 PhenomII X3 running on an OpenSuSE 12.1. After issuing /etc/init.d/festival start as root, I executed festival --tts README as a regular user and festival complained with the following error messages:

~ festival --tts README
Linux: can't open /dev/dsp
Linux: can't open /dev/dsp
Linux: can't open /dev/dsp
Linux: can't open /dev/dsp
Linux: can't open /dev/dsp
Linux: can't open /dev/dsp
Linux: can't open /dev/dsp
Linux: can't open /dev/dsp
Linux: can't open /dev/dsp
Linux: can't open /dev/dsp

Here is the output from ls -l /dev/dsp:

~ ls -l /dev/dsp*
crw-rw--w- 1 root sys 14,  3 Dec 30 10:39 /dev/dsp
crw-rw--w- 1 root sys 14, 19 Dec 30 10:39 /dev/dsp1

Which clearly shows the devices are world writable.

Has anyone seen this? How to resolve this issue? espeak works fine. However, the reason I installed festival is to use with FlightGear package.

On 12/30/2011 04:46 PM, mazilo wrote:
> I just installed festival-2.1-3.1.2.x86_64

did you install it with YaST or zypper? if with zypper, did you launch
it from a “su -” root, or “su”, or with sudo??

any errors during install?


DD
openSUSE®, the “German Engineered Automobiles” of operating systems!

I installed festival + festival-devel packages from YaST2 GUI through SUDO sans errors AFAICT.

Here is one thing I forgot to mention. I had to install makedev-2.6-553.1.1.noarch package, cd into /dev, and executed MAKEDEV audio (through SUDO) to create /dev/dsp and /dev/dsp1 nodes before I installed festival and festival-devel packages. However, if I rebooted my system, both the /dev/dsp and /dev/dsp1 nodes are gone. Is there a way to make them permanent?

I do not know what festival is, nor what hardware device corresponds with dsp, but what I know is that all device special files in */dev *are created by udev.. Creating them manualy is useless (as you have seen). udev uses the udev rules in /etc/udev/rules.d.

Thus you may check if there are rules there for your device.

On 12/30/2011 06:16 PM, mazilo wrote:
> Is there a way to make them permanent?

this may or may not help your current problem, but always remember
that neither sudo nor su leads to a having root’s environment and path…

so, anytime you want/need to do something as root you should use “su -”

more than you wanna read at http://tinyurl.com/ydbwssh

sometimes it makes a difference, sometimes you can “get by” just using
su or sudo…

so, try doing those things you mention from a terminal in which you
became root via “su -”…


DD http://tinyurl.com/DD-Caveat
openSUSE®, the “German Engineered Automobiles” of operating systems!

I do not understand much of this. I have diminishing sight and rely quite a lot on tts; formerly festival, but now also jovie. For me both work “out of the box” in both 11.4 and 12.1. Festival is usefull because it does not need any other packages or a GUI, only a functional sound card and speakers.

I install festival from “repo-oss”, start the daemon ( *sudo /usr/sbin/rcfestival start *), and test it with
:~> festival --tts /etc/hosts

I only have* /dev/dsp except on one workstation with two sound cards, which also has /dev/dsp1*

 :~> l /dev/dsp*
crw-rw----+ 1 root audio 14,  3 Dec 18 13:00 /dev/dsp
crw-rw----+ 1 root audio 14, 19 Dec 18 13:00 /dev/dsp1

Note that there will be no output from festival (or jovie) if another program (in my case normally having a radio channel open in chrome) has captured the sound system.

I can only suggest that you remove all of your “modifications”, uninstall, festival, check that you have a working sound system, and then reinstall festival from:
http://download.opensuse.org/distribution/12.1/repo/oss/

I uninstalled festival + festival-devel packages using YasT2 through SUDO and use zypper install festival festival=devel without a problem. However, when I tried to execute festival --tts README as a regular user (of course after I executed /etc/init.d/festival start through SUDO), festival still gives me the same error messages as before.

I had Google Chrome running. So, I terminated Google Chrome, restart festival server, and re-run festival --tts README to no avail. :frowning:

I can only suggest that you remove all of your “modifications”, uninstall, festival, check that you have a working sound system, and then reinstall festival from:
Index of /distribution/12.1/repo/oss

I am not sure what exactly did you mean by modifications, but my OpenSuSE v12.1 was a new (fresh) installation. My previous attempt to upgrade from v11.3 to v12.1 gave me a lot of problems with GNOME.

You do have a text file README in the current directory?

.

I am not sure what exactly did you mean by modifications,

I did not do any of this:

I had to install makedev-2.6-553.1.1.noarch package, cd into /dev, and executed MAKEDEV audio (through SUDO) to create /dev/dsp and /dev/dsp1 nodes before I installed festival and festival-devel packages.

/dev/dsp will be created if you have a sound device set up correctly, with* /dev/dsp1* only if you have a second sound device.

However, if I rebooted my system, both the /dev/dsp and /dev/dsp1 nodes are gone. Is there a way to make them permanent?

How many sound devices do you have, and do(es) they/it work correctly before installing festival? I
have not noticed any details about your sound chip(s) and drivers.

my OpenSuSE v12.1 was a new (fresh) installation. My previous attempt to upgrade from v11.3 to v12.1 gave me a lot of problems with GNOME.

I do not use GNOME. I installed a minimal X system,
then KDE-4.7.4 from …/repositories/KDE:/Release:/47/openSUSE_12.1/
and kernel-destop-3.1.8 from …/repositories/Kernel:/stable/standard/.
I have RAID0 on the 12.1 test machine and had installion troubles until I “ditched” systemd. I have init=/sbin/sysvinit as a kernel option in grub. This is an AMD Phenom 9650 Quad-Core processor, ASRock K10N78FullHD-hSLI R3.0 motherboard with integrated NVidia GeForce 8200 graphics. There are no proprietary drivers installed.

You could try disabling the systemd boot – it seems to cause all sorts of obscure problems.

On 2011-12-30 20:36, mazilo wrote:
> I am not sure what exactly did you mean by -modifications-, but my
> OpenSuSE v12.1 was a new (fresh) installation. My previous attempt to
> upgrade from v11.3 to v12.1 gave me a lot of problems with GNOME.

You created /dev/dsp, and that is not normal. It should exist already, and
the creation is not permanent. This means you have problems with your audio
setup.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

Yes and I do have the README plain text file.

How many sound devices do you have, and do(es) they/it work correctly before installing festival? I
have not noticed any details about your sound chip(s) and drivers.
The sound system is a built-in on my Asus M3A76-CM mobo and it works just fine. If I do espeak -f README, I can hear the audio from the synthesized speech without a problem. It is festival that gives me the problem.

I believe /dev/dsp* is an OSS device. So you need to load the compatibility module snd-pcm-oss and the devices will appear. It’s no use creating them manually.

Normally you make the module loading persistent by adding snd-pcm-oss into MODULES_LOADED_ON_BOOT in /etc/sysconfig/kernel. However I noticed that this variable doesn’t seem to work for systemd in 12.1. In my case I needed the /dev/mixer* devices so I had to create a .conf file in /etc/modules-load.d, e.g. sound.conf, containing the name of the module I want to load: snd-mixer-oss. You would put snd-pcm-oss in sound.conf.

I’m trying to decide if this ignoring of /etc/sysconfig/kernel:MODULES_LOADED_ON_BOOT is a bug I should report, or I missed something, after I have collected all the issues I found in 12.1.

On 2011-12-31 00:36, ken yap wrote:
> I’m trying to decide if this ignoring of
> /etc/sysconfig/kernel:MODULES_LOADED_ON_BOOT is a bug I should report,
> or I missed something, after I have collected all the issues I found in
> 12.1.

I heard of this before, perhaps there is already a report. I would not
wait, if you have some type of proof that it is ignored, report. I report
the issues I find within the hour, by the dozen.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

Thank you for pointing this out and it works! I edited /etc/sysconfig/kernel, added snd-pcm-oss to MODULES_LOADED_ON_BOOT, and did a modprobe -a snd-pcm-oss to load the OSS driver. Now, I have /dev/dsp and festival --tts README synthesizes the README file to output the audio to speakers.

Well in 12.1 if you are using systemd you will have to create /etc/modules-load.d/sound.conf containing snd-pcm-oss, or it will not load at boot.

BTW I was/am using systemd in 11.4 without any of the problems that require* init=/sbin/sysvinit* or somesuch in 12.1.

Just wait till I post my list. Not that many problems but annoying ones. Probably because I have a non-run-of-the-mill setup with RAID1 and XFS, among other things. I estimate about 40% systemd teething issues, 40% aparmor and the rest miscellaneous.

Use “aoss festival” instead of just “festival”, as simple as that.

You are absolutely right. I created /etc/modules-load.d/sound.conf file containing snd-pcm-oss and now snd_pcm_oss kernel driver gets loaded through reboot

~ lsmod|grep pcm
snd_pcm_oss            58693  0 
snd_pcm               109594  3 snd_pcm_oss,snd_hda_intel,snd_hda_codec
snd_timer              34086  1 snd_pcm
snd_page_alloc         18572  2 snd_hda_intel,snd_pcm
snd_mixer_oss          22602  1 snd_pcm_oss
snd                    86602  12 snd_pcm_oss,snd_hda_codec_via,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_timer,snd_mixer_oss