!7 static int delay = 1000; static JLabel lblText; sS phoneIP, lineFromBot; p { makeBot("Forwarded Recognizer."); swing { setText_opt = false; setConsoleWidth(400); setConsoleHeight(500); consoleFrame().setLocation(100, 100); consoleFont(sansSerif(40)); wordWrapConsole(); consoleMaxChars(1000); } while licensed { phoneIP = waitForPhone(); if (phoneIP == null) ret; setConsoleTitle(phoneIP); S last = ""; swing { manualConsole(); lblText = jcenteredlabel(); lblText.setFont(sansSerif(40)); replaceComponent(consoleTextArea(), lblText); } repeat with ms sleep delay { S s = lineFromBot = sendToPublicCommBot/*Silently*/(phoneIP, forward("Recognizer.", "text")); s = substring(s, smartIndexOf(s, ":")+1); last = s; if (nempty(last)) { L tokens = javaTokC(s); setText_htmlencode(lblText, joinLines(tokens)); setConsoleTitle(or2(join(" ", takeLast(2, tokens)), "[Speech]") + " - " + phoneIP); awt { lblText.scrollRectToVisible(new Rectangle(0, 10000, 1, 1)); } } } } } answer { if "text" ret lineFromBot; }