Getting xvoice and ViaVoice working with a USB headset

Date: Wed, 12 Nov 2003 17:25:43 +0100
From: Anthony Jameson
To: xvoice-user@lists.sourceforge.net
Subject: [Xvoice-user] A USB headset that works with xvoice and ViaVoice
    under Linux
  

USB headsets are especially valuable to laptop users because they do not rely on the computer's sound card.

After some trial and error, I was able to get the Plantronics DSP100 to work with ViaVoice and xvoice.

It has been known for some time that this headset works under Linux (except for the mute button). The obstacle with ViaVoice is that ViaVoice calls for a sampling rate of about 22000, while the Plantronics gives about 44000.

I don't know exactly why the following steps worked, or which ones are necessary, but in any case the results were good for me. I now use RedHat 9, but the same steps also worked under RedHat 7.3.

  1. Under Windows I installed the firmware upgrade for this headset, which is available from the Plantronics website (http://www.plantronics.com). (Actually, there were strange error messages during the installation, so I'm not sure that the firmware was really upgraded.) This upgrade is claimed to be especially important in connection with speech recognition programs like ViaVoice. I'm not sure if it is required for recently manufactured versions of the headset.
  2. I installed the alsa drivers (see http://www.alsa-project.org/). Somehow I arrived at the following content in /etc/modules.conf, some of which may be irrelevant here:
    alias parport_lowlevel parport_pc
    alias scsi_hostadapter ppa
    alias usb-controller usb-uhci
    alias snd-card-0 snd-usb-audio
    alias sound-slot-0 snd-card-0
    alias sound-service-0-0 snd-mixer-oss
    alias sound-service-0-1 snd-seq-oss
    alias sound-service-0-3 snd-pcm-oss
    alias sound-service-0-8 snd-seq-oss
    alias sound-service-0-12 snd-pcm-oss
    alias sound-slot-1 audio
    alias sound-service-1-0 snd-mixer-oss
    alias sound-service-1-1 snd-seq-oss
    alias sound-service-1-3 snd-pcm-oss
    alias sound-service-1-8 snd-seq-oss
    alias sound-service-1-12 snd-pcm-oss
    post-install sound-slot-1 /bin/aumix-minimal -f /etc/.aumixrc -L >/dev/null 2>&1 || :
    pre-remove sound-slot-1 /bin/aumix-minimal -f /etc/.aumixrc -S >/dev/null 2>&1 || :
            
    It seems to be necessary to reboot after installing the drivers.
  3. Before trying the headset with xvoice, you will want to see if it works with ViaVoice and also set up a new voice model (while using the same user name as before). As far as I can see, there is no way within the normal ViaVoice applications to add a new voice model for an existing user. A hack that seems to work is the following:
    1. Edit the file that for the user "jameson" is called "/root/viavoice/users/jameson/jameson.uid": In the line
        	Default_Enrollid	= jam1
                
      change "jam1" to "jam2".
    2. Then create a file jam2.eid in the same directory by copying the existing jam1.eid, replacing the "Description" of the voice model with some appropriate text (e.g., "USB headset, office"), and deleting everything starting with the "Status" block. When you next start vvstartuserguru, you should be able to select this voice model in the initial screen.

      (If anyone knows of a better way of creating a new voice model, please let us know.)

    3. In vvstartuserguru, the real test is whether the system will understand your speech once you start reading text that it really processes (as opposed to just performing the audio test). If you don't see the words you read being highlighted, there's something wrong. You can see if rebooting helps. Otherwise, other sorts of trial and error may help.
    4. Once you have successfully trained ViaVoice with the new headset, you can trying using xvoice. With the latest rpm version of xvoice (xvoice-0.9.5-11.i386.rpm), the headset did not work for me. But it did work after I had recompiled the latest version of the sources with the option --with-esd. (By the way, during the compilation I got a few error messages complaining about missing functions like "v_start". I got around them by adding the line "#include <stdarg.h>" at the beginning of the files that were causing the errors.)
    5. I invoke xvoice *without* the option --esd (or -e), because when it is invoked with this option the microphone stops recording after a few seconds of speech.
    6. If you use a laptop and sometimes put it into standby mode after using the headset: Once you have brought the laptop back out of standby you will have to unplug the headset from the USB port and plug it in again in order for xvoice or ViaVoice to work.

Hope this helps someone,
Anthony Jameson