Created
June 9, 2011 16:57
-
-
Save getflourish/1017178 to your computer and use it in GitHub Desktop.
This file contains 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
/* | |
// This is a basic example to demonstrate how the Speech-To-Text Library | |
// can be used. See www.getflourish.com/sst/ for more information on | |
// available settings. | |
// | |
// Florian Schulz 2011, www.getflourish.com | |
*/ | |
import com.getflourish.stt.*; | |
STT stt; | |
String result; | |
void setup () | |
{ | |
size(600, 200); | |
noCursor(); | |
// Init STT automatically starts listening, files are stored as history | |
stt = new STT(this); | |
stt.debug(true); | |
stt.setLanguage("en"); | |
// Some text to display the result | |
textFont(createFont("Arial", 24)); | |
result = "Say something!"; | |
} | |
void draw () | |
{ | |
background(0); | |
text(result, mouseX, mouseY); | |
} | |
// Method is called if transcription was successfull | |
void transcribe (String utterance, float confidence) | |
{ | |
result = utterance; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment