Speech Recognition – Desktop Control: Voximp:

I’ve found a thing called pocketsphinx – a speaker-independent speech recognition library for linux (think can be compiled on windows too). Even better – it has python bindings. The result of this was:


Voximp is an application, with which programs can be spawned and key/mouse presses simulated, all from just speaking a few words.


If you’re using archlinux, get a PKGBUILD here.
For all of you unlucky enough not to be using arch:

  • Grab the .tar.gz here
  • Extract it
  • mv voximp.py /usr/bin/voximp
  • copy everything from sample_configs to ~/.config/voximp/
  • rename voximpconf.py.sample to voximpconf.py
  • run voximp in a terminal, enjoy!


It’s really very innaccurate…

  • open up ~/.config/voximp/voximpconf.py
  • remove/comment out anything which you don’t need (I’d definitely suggest the bit which adds every letter)
  • follow the instructions to regen the language model

How do I regenerate the config file?

Once you’ve edited the config to your satisfaction, run voximp -c which will create a corpus.txt in the current working directory, and give you some instructions. Follow these instructions.

Nothing is picked up

Seems to be a bit of an issue – the fun of linux + microphones.
A possible solution follows:
list all audio capture devices with arecord -l
for me, this give the following output

**** List of CAPTURE Hardware Devices ****
card 0: Intel [HDA Intel], device 0: CONEXANT Analog [CONEXANT Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: default [AK5370 ], device 0: USB Audio [USB Audio]
Subdevices: 0/1
Subdevice #0: subdevice #0

As I want to use the USB microphone, I can see that I want device 0 on soundcard 1.
I then edit /usr/bin/voximp, and replace alsasrc in line 54 with
alsasrc device="hw:0,1"
Replace hw:0,1 with your specific card/device combination

Speech Recognition – Desktop Control: Voximp:

One thought on “Speech Recognition – Desktop Control: Voximp:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s