success w/ USB headset

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

 



I bought a plantronics 510 USB headset a couple of weeks ago. I've been 
struggling to get a machine with no sound card set up so that it starts 
talking when I plug in the headset. I finally got it working.

1. Install speakup  patched kernel. I am currently using one from Shane's 
space on debian.org.
2. Install espeak. This actually turned out being critical. I could not get 
the  hotplug system stuff to work with flite or festival. Actually, that may 
work with newer version of flite or festival but in debian etch, you get 
flite and festival that depend on oss. But etch runs alsa by default.  The 
alsa-oss module didn't work with the udev subsystem. More on that below.
3. Install speech-dispatcher and speechd-up
4. Add a udev rule to load speech-dispatcher and speechd-up when you connect 
your headset. This is the tricky part.

I can't really explain all there is to know about writing udev rules. A good 
place to start is here:
http://reactivated.net/writing_udev_rules.html


A couple of things I discovered though:
1. The alsa-oss module is not available when udev rules are run. In other 
words, there/s no /dev/dsp.  So starting speech-dispatcher will fail if you 
have it configured to use the oss versions of flite or festival. I think you 
can recompile flite and festival for alsa. Or you can do what I did and 
switch to espeak.
2. I found it difficult to get udev (aka hotplug) to not try to start speech 
several times. I ended up writing a script that first checks if 
/dev/softsynth exists and exits if it does. If /dev/softsynth does not 
exist, it runs speech-dispatcher and speechd-up.

My udev rule:
ACTION=="add",SUBSYSTEM=="usb",SYSFS{idVendor}=="047f",SYSFS{idProduct}=="c001",RUN+="/usr/local/bin/startspeech 
%k %n"


My script /usr/local/bin/startspeech:
--- Begin ---
#!/bin/sh
if [ -e /dev/softsynth ]; then
 exit
fi

/etc/init.d/speech-dispatcher restart
/etc/init.d/speechd-up restart
 -- End ---

John Heim
jheim at math.wisc.edu / 608-263-4189
If you are blind and you use linux, please subscribe to 
blinux-list at redhat.com







[Index of Archives]     [Linux for the Blind]     [Fedora Discussioin]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]
  Powered by Linux