Hi ,
I'm trying to interact with letter of a text.
I'm first trying to recognize a word and overwrite it , but i'm using the a.equals(b) stuff which is not really appropriate in my case.
In this case , i'll write my text in the String t variable , then i want to say :
If String t CONTAIN word [] ( all the word in the word [] array ) so the background turn to green.
But i don't know what can i use to say if string t contain word [] , something happens...
/*
*/
//GLOBALS// String [] word = new String[2]; String t ="c'est ici";
Hi,
I'm would like to change all the "black" pixel of an image into another color ( like blue for example )
So it work pretty good but there is one thing, because its a picture , there is some dark dark grey part that i would also have blue.
Maybe there a better solution to set dark grey scale to black in order to have all very dark near black part turning to blue.
loadPixels(); for (int i = 0; i < width*height; i++) { if (pixels[i] == 0xff000000) pixels[i] = 0xff0000ff; // Make black become blue } updatePixels(); }
Hello ,
I'm using voce , a voice recognizer.
Everything work well , when i say fish , it show fish when i say cat it show cat, the only thing i want to do is that when i say fish , first of all : he show "fish" then he save it under fish.png and then it print it out !
but it don't seems to work, it's not really saying anything as a error but just not printing it out.
Can someone tell me what mistake i've made?
import voce.*;
String s;
int xPos = 0; int yPos = 0;
void setup() { size(480, 200); background(255); voce.SpeechInterface.init("voce/library", true, true, "voce/library/gram", "cat"); System.out.println("This is an awesome test"); textFont(createFont("NeutraTextTF-BookItalicAlt", 24)); }
void draw() {
stroke(255);
while (voce.SpeechInterface.getRecognizerQueueSize () > 0) { s = voce.SpeechInterface.popRecognizedString(); println(s); voce.SpeechInterface.synthesize(s);