Speech To Text Library

for Java/Processing


The Library

This library used to bring speech recognition to your Processing applications. Since May 2014, this library was using Google Speech API v2. As of December 2014, further development has been discontinued.

Using WebSocket, Google Chrome and Processing, you can get unlimited speech recognition results in your Sketch. View Example

As of May 2014, you need a developer API key to use this library. The new API has a limit of 50 requests/day. Therefor, this library is not useful for real projects anymore. I decided to stop development and want to thank everyone who was experimenting with speech recognition.


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.

Get your API key

Create a Google developer account and enable the Speech API in your project. http://developers.google.com. You may also have to subscribe to the chromium dev list to enable the Speech API. Read more about this here: http://www.chromium.org/developers/how-tos/api-keys


Basic Example (Press a Key to Record)


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–2014