Missing /dev/dsp

I have installed Cepstral Swift (test to speech), and when I run the command which should output audio I get the error

oss_audio: failed to open audio device /dev/dsp

I ensure the also OSS was installed with:

dnf install alsa-utils alsa-plugins-oss

but still same error. I can confirm that the device /dev/dsp is NOT present. I tried to install the padsp tool (to route OSS audio to PA), but that tool is not available for AlmaLinux 9

Asked By: TSG

||

/dev/dsp is the device name of the older "OSS" Linux audio drivers, which are mostly of historical interest (or maybe with very specialized audio hardware) any more. The modern low-level audio driver system on Linux is ALSA.

Modern distributions might not even load ALSA’s OSS compatibility kernel modules any more, and might even have dropped them out of standard kernels.

You can try loading the OSS compatibility modules, if your distribution includes them:

sudo modprobe snd-pcm-oss
sudo modprobe snd-mixer-oss

If those kernel modules are not available, there might be a compatibility wrapper binary aoss (might be in a package named alsa-oss, depending on distribution).

If you use PulseAudio as a higher-level audio mixing/management layer, there is also padsp that is a similar wrapper binary that allows OSS audio applications to output to PulseAudio.

The alsa-plugins-oss package has the opposite compatibility interface: it allows ALSA-aware applications to run on OSS drivers, with appropriate ~/.asoundrc configuration. Since your application clearly tries to use /dev/dsp, that means it uses the OSS interface, and so alsa-plugins-oss packages are not useful to you.

Unfortunately it looks like AlmaLinux 9 has neither the above-mentioned kernel modules in its standard kernel configuration, nor the padsp nor aoss wrapper utilities available. That means applications that only support the OSS audio interface will be unable to produce audio directly on AlmaLinux 9.

Based on quick Googling, you could probably still use Cepstral Swift to produce audio *.wav files from text, and then use aplay or similar tools to play them. If Cepstral can be made to output audio data to standard output, you might be able to construct a two-command pipeline that will be able to turn text into direct audio output.

Answered By: telcoM
Categories: Answers Tags: , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.