[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Festival and OSS/ALSA (was: [Kenny Hitt] Re: Is Debian appropriate for accessibility?)



Unfortunately, good and cheap sound cards are not commonly available
today.  So most Linux users have to base their sound output on ALSA
dmix.

Here is how to do it on a Debian GNU/Linux system:

- Tell all applications to use ALSA instead of OSS.

- If it is not possible (as with Festival that can only use OSS dsp
  devices), use the aoss wrapper.  Install the alsa-oss package and run
  the OSS-only applications with that wrapper, e.g. `aoss festival'.
  (There's no need to arrange this in Speech Dispatcher as Speech
  Dispatcher uses Festival only for synthesizing the sound, not playing
  it.)

- If you don't have /proc/asound on your system, the aoss script won't
  work.  Remove the checking condition in the script in such a case
  (yes, I should file a bug report about this).

- Remove the oss emulation kernel modules in order to prevent OSS
  applications hijacking your sound device.

- Enforce using dmix system-wide.  I do this by putting something like
  the following into /etc/asound.conf:

    # Setup the dmix plugin
    pcm.dmixer {
      type dmix
      ipc_key 1024
      ipc_key_add_uid false   # let multiple users share
      ipc_perm 0666           # IPC permissions for multi-user sharing
      slave {
        pcm "hw:0,0"          # change this if you use other sound device
      }
    }
    # Use dmix as the default device
    pcm.!default {
      type plug
      slave.pcm "dmixer"
    }
    # Redirect all OSS devices
    pcm.dsp {
      type plug
      slave.pcm "dmixer"
    }
    pcm.dsp0 {
      type plug
      slave.pcm "dmixer"
    }

  Note it may be necessary to put additional hardware specific options
  to the pcm.dmixer section in order to make it work with some audio
  devices.

  You may need to reboot after changing the asound.conf file.

HTH.

Milan Zamazal



Reply to: