Skip to content
A simple speech-to-command program in Python
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


This application is just for fun and should not be used in any way that violates Google's Terms of Services. Do NOT rely on this API for any "real" application if you know what's good for you.


This is a simple speech-to-command program in Python that uses Google's Speech Recognition facility to convert speech into text and then execute a command, if appropriate, on the local machine.


This program depends on alsaaudio and is designed to run on Linux.

Tested on Ubuntu 11.04 in Gnome-Terminal.


Just run python and speak for up to three seconds. The audio will be then processed and translated and an action may be taken.


py-command can be used to launch processes:

$ python
* recording
[===        ]
<say "open firefox">
* done recording
<Firefox opens>

Or to do some math:

$ python
* recording
[===        ]
<say "calcuate three times four">
* done recording

Or to lock the screen:

$ python
* recording
[===        ]
<say "lock screen">
* done recording
<Screen is locked>
Something went wrong with that request. Please try again.