Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

how can i have it say it once and thats it but once evertime the function is run?

$
0
0

i found a sketch that has the pc say whatever i want but the issue is that it will keep saying over and over, also i notice that it is very slow at processing and while the pc says anything the video output becomes slow or freezes for like 500ms which is crazy

import guru.ttslib.*;

TTS Server;

void setup() {
  size(100, 100);
  Server = new TTS();
}

void draw() {
}

void mousePressed() {
  Server.speak("Good day?");
}

now if i was to use a function inside draw and every time that functions condition is met the pc will say what ever is on that function right? but the issue is that while that function is being used the pc will keep saying the same thing over and over so HOW can i get it to say what ever JUST ONCE ?


Viewing all articles
Browse latest Browse all 2896

Trending Articles