Warning: session_start(): open(/var/lib/php/sessions/sess_202bo52ajesr2lgis9qpbu3cg7, 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
module SpeechRecogConfirmation > DynPrintLogAndButtons {
start {
onSpeechRecognized_withoutMyUtterancesAndTyped(voidfunc(fS s) {
print();
print("I heard: " + quote(s));
bool empty = eq(s, "?");
print(empty ? "Did you say anything?" : "Did you say that?");
O[] params = new O[] {
empty ? "No " : "Yes", r { log(s, 'yes); print("Thanks"); },
empty ? "Yes" : "No", r { log(s, 'no); whatDidYouSay(s); }};
showButtons(empty ? reverseParams(params) : params);
});
}
void log(S heard, S answer) {
print("> " + upper(answer));
logStructure(programLogFile(), litorderedmap(+heard, +answer));
hideButtons();
}
void whatDidYouSay(fS heard) {
print("What did you say?");
final JTextField tf = jTextField(heard);
showButtons(textFieldAndButton(tf, "is what I said", voidfunc(S corrected) {
print("> I said " + quote(upper(corrected)));
logStructure(programLogFile(), litorderedmap(+heard, +corrected));
hideButtons();
print("Thanks");
}));
focus(tf);
}
}