ttslib for processing

Posted by Nikolaus Gradwohl Sat, 16 May 2009 18:31:27 GMT

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");
}

Tags ,  | 2 comments | no trackbacks

Tweet This! submit to reddit Digg!

Comments

  1. nicole said 7 months later:

    How would you change voices with this library? Is it exposed anywhere?

  2. Nikolaus Gradwohl said 7 months later:

    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

Trackbacks

Use the following link to trackback from your own site:
http://www.local-guru.net/blog/trackbacks?article_id=ttslib-for-processing&day=16&month=05&year=2009

(leave url/email »)

   Comment Markup Help Preview comment