!7 module SpeechRecogConfirmation > DynPrintLogAndButtons { start { onSpeechRecognized_withoutMyUtterancesAndTyped(voidfunc(fS s) { print(); print("I heard: " + s); print("Did you say that?"); showButtons( "Yes", r { log(s, 'yes) }, "No", r { log(s, 'no); whatDidYouSay(s); }); }); } void log(S heard, S answer) { print("> " + upper(answer)); logStructure(programLogFile(), litorderedmap(+heard, +answer)); hideButtons(); } void whatDidYouSay(S s) { print("What did you say?"); final JTextField tf = jTextField(s); showButtons(textFieldAndButton(tf, "is what I said", voidfunc(S corrected) { print("> " + upper(corrected)); logStructure(programLogFile(), litorderedmap(+heard, +corrected)); hideButtons(); })); } }