oss_audio: failed to open audio device /dev/dsp

Voices won't install properly on your system?

oss_audio: failed to open audio device /dev/dsp

Postby runningonempty » Wed Feb 09, 2011 7:50 am

I am running a fresh install of FC14/64 with the 64bit voice David. When I:

swift hello

I get: oss_audio: failed to open audio device /dev/dsp

googling has only reinforced that others have had this or similar problems on other distros but no solutions were noted.

is "swift" hard coded to "/dev/dsp"? This device does not exist on FC14 but seems to have been replaced with /dev/snd/*files.

any help will be appreciated.
runningonempty
 
Posts: 2
Joined: Tue Feb 08, 2011 4:01 pm

Dealing with the lack of OSS audio drivers in recent distros

Postby AdamW » Wed Feb 09, 2011 8:49 am

As of this posting, Linux releases of Cepstral voices do use the OSS audio drivers. There are many ways to address this:

1- Install the OSS audio compatibility for pulseaudio.

2- Wrap the swift command line with a script that uses swift -o to create a wav file, then play that audio.

2- Credit to Scott Rowe:
In Ubuntu 10.10, ... It could be recommended to others to use padsp.. for example 'padsp swift hello' will produce the audio without problems. No response needed, just wanted to pass it along for you to share with others having similiar issues.
AdamW
 

solution to oss audio: failed to open /dev/dsp & misterh

Postby runningonempty » Thu Feb 10, 2011 11:02 am

Adding to Scott Rowe's effort I provide the following:

This post is primarily for misterhouse home automation, BUT may also
apply to your application under FC14/64

using cepstral voices "swift" is the name of the voice engine.

doing:
swift hello
you get:
oss_audio: failed to open audio device /dev/dsp
this audio device does not exist under FC14 AND as of this post
Cepstrals voice do use OSS audio drivers.

Solution:
you will require the following rpm and possibly others. might be a good
idea to install all PulseAudio rpms.
here is the one you definitely need:
pulseaudio-utils-0.9.21-7.fc14.x86_64 : PulseAudio sound server
utilities

this rpm provides a wrapper called padsp

now with this rpm you can:

padsp swift hello

and the cepstral voice of your choice will speak. No oss_audio:
failed to open ....

now to fix this for "mh" AND POSSIBLY YOUR APPLICATION you need to complete the following 2 steps:

1. when you install cepstral voice engine it places the engine in
/opt/swift/bin/swift
this binary is pointed to by /usr/local/bin/swift, i.e.,
/usr/local/bin/swift -> /opt/swift/bin/swift
remove the link, i.e. /usr/local/bin/swift and replace it with a file
called swift that looks like this:
------cut here------

#!/bin/sh
if test -x /usr/bin/padsp ; then
exec /usr/bin/padsp /opt/swift/bin/swift "$@"
else
exec /usr/bin/opt/swift/bin/swift "$@"
fi

------cut here------

chmod +x this file (/usr/local/bin/swift) or you will get permission errors
in the data/log/print.log file

2. applies to misterhouse only
mh.private.ini
for me there was only one change to mh.private.ini and that was to
comment out
the "voice_text_card" parameter as noted below.
I include this code fragment info.
#
# voice setup using the cepstral speech engine
# this sets the sound program. in my case I am using Cepstrals
voice
# engine known as "swift".
speak_engine=swift
voice_names=male=>Cepstral David
voice_text=swift
voice_text_swift=/usr/local/bin/swift
#voice_text_card=/dev/dsp
sound_program=play
sound_pre_speak=/usr/share/sounds/purple/alert.wav

I am not totally convinced that this is the best solution. In googlin I cam
across something called
OSS PROXY that uses a module called CUSE (lower case actually). this module
does
exist in the FC14/64 bit distro. do a "modinfo cuse" to see results. You
can read more
about this here: http://fedoraproject.org/wiki/Features/OSSProxy This might
be the better solution.

For me the above process seems to take of the issue of not having "voice"
working. So for now on to
other things.

hope this helps.
runningonempty
 
Posts: 2
Joined: Tue Feb 08, 2011 4:01 pm

Postby aiprog » Thu Feb 10, 2011 12:53 pm

You can also use the alsa-oss wrapper to coerce Swift into working under newer versions of Linux, ie: 'aoss swift hello'

But like padsp, aoss is painfully slow, and possibly not particularly useful if you plan on trying to use Swift from within an application.
aiprog
 
Posts: 2
Joined: Thu Feb 10, 2011 12:36 pm


Return to Installation

Who is online

Users browsing this forum: Google [Bot] and 0 guests

cron