Text to speech

ttslib is a processing wrapper for the freetts library with two new speak methods, that allow to choose which speaker the text should be coming from

CODE

tts.speak( “I am in the center” );
tts.speakLeft( “I am on the left” );
tts.speakRight( “I am on the right” );

The library can be downloaded at

http://www.local-guru.net/blog/pages/ttslib
Examples of text to speech

1st example: using TMP36 and text to speech library to tell the temperature

Arduino port identification using Processing

Another more simple 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”);
}

Audio images

Leave a Reply

Your email address will not be published.