ttslib
About
ttslib is a wrapper around freetts for processing the library can be used to give your sketches a voice. The only drawback is, that it's not working in applets, because freetts uses custom classloaders for loading the voices, which is not allowed in the browser sandbox.
Download
Installation
to install the library simply download it and unzip it in the library folder of your processing installation. From release 0149 on the libraries folder should be in your sketchbook folder. older releases need it to be copied into the library folder of your processing installation.
Documentation
To use the library simply import the lib, create an instance of the TTS class and call the speak method
import guru.ttslib.*;
TTS tts;
void setup() {
tts = new TTS();
}
void draw() {
}
void mousePressed() {
tts.speak("Hi! I am a speaking Processing sketch");
}
To use mbrola voices make sure you have mbrola and some of the us voices installed. Then set mbrola.base as a java system property. Now the name of the mbrola voice can be set using a constructor parameter. See this blog-post for a more detailed install instruction
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("Hi! I am a speaking Processing sketch");
}
Examples
The zip file includes a simple chatbot example.
Licence
ttslib is released under the GNU LGPL freetts is released under this BSD Licence
Projects using the library
My name is 192.168.159.16 by Varvara Guljajeva
