Speech To Text Library for Processing


Speech recognition library based on Google’s web service that enables speech input on HTML5 input fields in Google Chrome.

<input type="text" x-webkit-speech />

I was really surprised how good it works for several languages and decided to make it available as an open source library for Processing.

The Library

Download and install the library inside your libraries folder. The library listens to the microphone input of your computer and sends recordings of your voice to Google for further processing. If the transcription was successful, the transcribe method is called and you can do whatever you want with the result. You can find some more details in the very early JavaDoc.


Basic Example (Press a Key to Record)

Using External Microphones

If you want to change the audio input source, you can pass a different mixer to the Minim instance that STT is using. If you don't know the id of the mixer, you can get a list as shown in this example:


The library is based on some thoughts by Mike Pultz who wrote an article that shows how to use the technology offered by Google without a browser. The library has the following dependencies: Minim, Gson and Java FLAC Encoder.


Email me or follow me on Twitter. I’m a designer and I’m aware of bugs, errors and bad ways of coding. Anyway, as long as it works for me, I’m happy to share what I’ve got. Feel free to make any changes to the code.

Florian Schulz, June 2011