Using Mbrola-Voices with the Processing ttslib

Nikolaus Gradwohl2010-06-20T17:33:00+02: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

./mbrola206a-linux-ppc
./mbrola-linux-alpha
./mbrola_linux_libc5
./mbrola
./mbrola-linux-i386
./mbrola302b-linux-ppc
./us1
./us1/us1mrpa
./us1/license.txt
./us1/us1.txt
./us1/TEST
./us1/TEST/xmas.pho
./us1/TEST/alice.pho
./us1/TEST/push.pho
./us1/TEST/mbroli.ini
./us1/TEST/mbrola.pho
./us1/us1
./us2
./us2/license.txt
./us2/us2.txt
./us2/TEST
./us2/TEST/babel.pho
./us2/TEST/alice.pho
./us2/TEST/mbroli.ini
./us2/TEST/mbrola.pho
./us2/us2
./us3
./us3/us3
./us3/us3.txt
./us3/license.txt
./us3/TEST
./us3/TEST/cslu.pho
./us3/TEST/diphone.pho
./us3/TEST/mike.pho
./us3/TEST/mbroli.ini

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() {
  System.setProperty("mbrola.base","/path/to/mbrola/");
  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: | 7 comments | no trackbacks

Trackbacks

Comments

Leave a response

  1. Gregório 2010-07-11T03:23:03+02: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.<init>(TTS.java:23)
        at Freet.main(Freet.java:10)
    

    Java Result: 1

  2. Gregório 2010-07-11T03:25:03+02: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+02: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+01: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+01: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+01: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+02:00

    hey, fretts is for en.us only

Leave a comment