ttslib for processing
Posted by Nikolaus Gradwohl
i have written another library for processing. This time its a wrapper around the freetts library
now processing sketches can have a voice too.
click here to go to the project page.
i cannot present an applet as an example this time, because freetts doesn't work in applets. So i show the example.
import guru.ttslib.*;
TTS tts;
void setup() {
size(100,100);
smooth();
tts = new TTS();
}
void draw() {
background(255);
fill(255);
ellipse( 35, 30, 25, 35 );
ellipse( 65, 30, 25, 35 );
fill(0);
ellipse( 40, 35, 10, 10 );
ellipse( 60, 35, 10, 10 );
noFill();
arc(50,50,50,50,0,PI);
}
void mousePressed() {
tts.speak("Hi! I am a speaking Processing sketch");
}


How would you change voices with this library? Is it exposed anywhere?
you can use the TTS( "voicename" ) constructor to switch between the installed voiced by default kevin16 and alan get installed, mbrola voiced should work, but i haven't tried them yet