This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.getflourish.stt.*; | |
STT stt; | |
String result; | |
void setup(){ | |
size(600, 200); | |
// Inicia a escuchar | |
stt = new STT(this); | |
stt.enableDebug(); | |
stt.setLanguage("es"); | |
// texto | |
textFont(createFont("Arial", 24)); | |
result = "Habla, di algo"; | |
} | |
void draw (){ | |
background(0); | |
text(result, mouseX, mouseY); | |
} | |
// | |
void transcribe (String utterance, float confidence){ | |
println(utterance); | |
result = utterance; | |
if(result.equals("internet") == true){ | |
link("http://programacionits.blogspot.mx/search/label/Proyecto%20Integrador"); | |
} | |
} | |
public void keyPressed () { | |
stt.begin(); | |
} | |
public void keyReleased () { | |
stt.end(); | |
} | |
Programa detección automática | |
import com.getflourish.stt.*; | |
STT stt; | |
String result; | |
void setup () | |
{ | |
size(600, 200); | |
stt = new STT(this); | |
stt.enableDebug(); | |
stt.setLanguage("es"); | |
stt.enableAutoRecord(); | |
// muestra el texto | |
textFont(createFont("Arial", 24)); | |
result = "Di algo, lo que sea"; | |
} | |
void draw (){ | |
background(0); | |
text(result, mouseX, mouseY); | |
} | |
void transcribe (String utterance, float confidence){ | |
println(utterance); | |
result = utterance; | |
if(result.equals("internet") == true){ | |
link("http://programacionits.blogspot.mx/search/label/Proyecto%20Integrador"); | |
} | |
} |
Link para descargar de la librería
https://www.facebook.com/download/375754579172446/stt.rar
No comments:
Post a Comment