Warning: session_start(): open(/var/lib/php/sessions/sess_r0capsnk7vbddm6t4o1cvnscl4, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
!7
static TextView tv;
please include function aContinuousEnglishRecognition.
p {
makeBot("Recognizer.");
makeMyselfAware();
androidUI(r {
tv = aTextView();
tvStatus = aTextView("Preparing...");
androidShow(aNorthAndCenter(tvStatus, tv));
});
new ContinuousEnglishRecognition rec;
rec.onSpeech = f onSpeech;
rec.onReady = r { aSetText(tvStatus, "Listening.") };
rec.onUnready = r { aSetText(tvStatus, "Hold on...") };
rec.start();
}
sS last = "";
static long time;
static void onSpeech(L l) {
S s = first(l), ss = s;
if (startsWith(s, last)) ss = dropPrefixTrim(last, s);
last = s;
time = now();
print("> " + ss);
if (nempty(ss)) {
//androidShowText(ss);
fS text = ss;
}
}
answer {
if "text" ret now() + ": " + last;
}