Using Mbrola-Voices with the Processing ttslib

Nikolaus Gradwohl2010-06-20T17:33:00+00:00

To use mbrola-voices with the processing ttslib make sure you have installed the newest version of ttslib (version 0.2 at the time of writing). Download the mbrola-binary for your system and make sure the binary is named mbrola (or else freetts won't find it).

Make sure you can live with the mbrola-licence.

Download the us voices you want to use and unzip them to the directory where your mbrola binary lives.

on my linux system the content of the mbrola directory looks like this


in the setup method of your processing sketch set the absolute path to your mbrola directory as a java system property. Now the name of the mbrola voice you want to use can be added as a string parameter to the TTS constructor

import guru.ttslib.*;

TTS tts;

void setup() {
  tts = new TTS("mbrola_us1");

void draw() {

void mousePressed() {
  tts.speak("Hello! I'm a talking processing sketch!");
Tweet This! submit to reddit Digg! Tags: | 14 comments | no trackbacks

See also:

ttslib installation via the processing PDE
Processing TTSlib version 0.4 released
Processing TTSlib version 0.3 released
My name is
ttslib for processing



Leave a response

  1. Gregório 2010-07-11T03:23:03+00:00

    import guru.ttslib.*;

    public class Freet {

    public static void main(String agrs[]) throws InterruptedException, com.sun.speech.freetts.ValidationException {
        System.setProperty("mbrola.base", "C:\\Program Files (x86)\\Mbrola Tools\\br1");
        TTS tts = new TTS("mbrola_br1");
        tts.speak("Olá! Eu sou um computador e posso falar o que eu quizer!");


    why don't wor?

    Could not validate any MBROLA voices at

    C:\Program Files (x86)\Mbrola Tools\br1

    Make sure you FULLY specify the path to the MBROLA directory using the mbrola.base system property.

    Exception in thread "main" java.lang.NullPointerException at guru.ttslib.TTS.( at Freet.main( Java Result: 1

  2. Gregório 2010-07-11T03:25:03+00:00

    why don't work?

    PS.: "Olá! Eu sou um computador e posso falar o que eu quizer!" is like "Hi! I'm a computer and can speak all what I want!"

  3. Jaden 2010-09-11T19:58:14+00:00

    Same problem. Can't run mbrola voices, tried every possible way of writing the path. It's located in "C:\Program Files\Mbrola Tools". Can't make it work :(

  4. simon 2010-11-04T21:09:27+00:00

    could you describe where to put the mbrola directory? do you mean the whole folder, which you download from the mbrola page, or just a part of it? do i have to pute this folder into the sketchbook folder, or in the ttslib folder?? i'm very sorry, but i'm really stuck here.... thx 4 your help!

  5. Nicola 2011-03-24T17:20:34+00:00

    same problem:

    Make sure you FULLY specify the path to the MBROLA directory using the mbrola.base system property

    no one can help us??

  6. Nikolaus Gradwohl 2011-03-24T20:29:20+00:00

    Sorry I have no windows box I could test it on but as far as I remember mbrola doesn't like paths that contain spaces so try to put your mbrola libs in some path like c:\mbrola

  7. Mauricio 2011-04-24T04:02:44+00:00

    hey, fretts is for only

  8. saurabh Datta 2012-10-04T07:59:48+00:00

    hello > I want to know if you could help me in speaking out a string (such a time display string in processing)using this tts lib.

  9. Christine Gerstenmayer 2013-07-30T19:01:38+00:00

    Hi, when trying to use Mbrola in Windows, I get the following error message when playing "Romeo and Juliet"-Example of your processing book (first time when Juliet speaks): "Error: Can't open D:\Programme\processing-2.0.1\V ah i iy I ih U uh ...... File". Seems that it is searching a file named as the content of file "us1mrpa" in processing path. Why that ? Can you imagine the reason ?

  10. Kurarin Jan Maikeru 2014-08-12T16:01:44+00:00

    hi! i want to use ttslib in my project. I use Processing 2.2.1, SDK tools updated. JDK 1.7 and Ant apache 1.9.4.

    When I run the code, I get this Error:

    BUILD FAILED C:\Android\android-sdk\tools\ant\build.xml:892: The following error occurred while executing this line: C:\Android\android-sdk\tools\ant\build.xml:894: The following error occurred while executing this line: C:\Android\android-sdk\tools\ant\build.xml:906: The following error occurred while executing this line: C:\Android\android-sdk\tools\ant\build.xml:283: null returned: 2

    I only get this error when I use guru.ttslib . When I use other import like bluetooth,widgets,buttons, it will run perfectly.

  11. Andre 2015-11-09T23:54:21+00:00

    I did a test with your library but seems to work only with the us1, us2 and us3 packages.

    line 8: System.setProperty("mbrola.base", "C:\Program Files (x86)\Mbrola Tools"); line 9: tts = new TTS("mbrola_us1");

    I have tested with en1, de1, br1.

    Windows 7(x64) - processing 2.2.1 - mbrola.exe from PC/DOS version.

    with the PC/Windows version i had some errors with us1.

  12. Nikolaus Gradwohl 2015-11-12T15:20:54+00:00

    Freetts - the library my plugin is based on only supports the us voices (at least in the current version)

  13. Jane 2016-02-04T10:13:37+00:00

    Doesn't it work with processing 3.0.1 ?

  14. Luis Molina-Tanco 2019-02-01T07:56:10+00:00

    Hi from 2019! I am working on a Windows 10 PC with Processing 3.5.2. I installed the PC/Dos version from the wayback machine works! (only with us voices that's true) What a fantastic library Nikolaus, thank you so much for sharing it!

Leave a comment