Introducing libspeechmike

2 minute read

I recently got a Philips Speechmike device. It seems Philips has a Linux SDK for it, but I was unable to obtain it. I thought it wouldn't be impossible to write a Linux driver for those couple buttons, so I gave it a try.

First the good things:

  • The speaker and microphone work perfectly out-of-the-box with zero configuration using the snd_usb_audio Linux kernel module.
  • The same thing is true for the trackball and scrollwheel as well as the mouse buttons. They are recognized as regular USB mouse and instantly usable.

Not working out-of-the-box are the buttons on top and the status LEDs.

Now there are a couple different layers where you could start writing a driver for these buttons:

  1. the kernel. Make it work like a keyboard device.
  2. X11. Make it work like a keyboard device, too.
  3. create a library that an application could like if it wants to provide support for the SpeechMike.

After some discussion on the linux-usb mailing list it became clear that the SpeechMike is not a usual USB HID device that could be easily supported by the existing code.

I then thought about the idea of the device being a keyboard a bit more: which keyboard events would you assign to the buttons? Use e.g. KEY_PLAY for the "Play" button? That would mean pressing the "Play" button on the SpeechMike would have the same meaning as pressing the "Play" button on your multimedia keyboard. Didn't sound like a good idea to me. Use the more general events like F23? Doesn't look like a good solution either.

I also found out that you can press an arbitrary number of buttons at the same time, like modifier keys (CTRL, ...) on your normal keyboard. I wasn't sure how that would work with a kernel driver or a X11 driver, so I finally decided to write a simple library which I could use in my application.

So here it is: libspeechmike. You can get the source code from my Mercurial (hg) repository at

The source code includes a example program, speechmike_dump, that shows you which keys you pressed and can serve as a reference if you want to build your own application with it. It uses the hiddev interface, which is really easy to use without the need of another library (like libhid or libusb). You only need to make sure you have read permissions for the device file.

The LEDs are currently not working, I guess I'll need to do some USB sniffing with the original Philips driver on Windows to get those working.