scope isItMyUtterance. static int #magicInterval = 2000; static int #reallyLongDelay = 10000; // returns (bool result, assumptions) static Pair isItMyUtterance(long timestamp, S heard) { Pair said = lastVoiceOutputEndBeforeTimestamp(timestamp); if (said != null && said.a <= reallyLongDelay) { S info = "this (delay=" + said.a + " ms): " + heard + (match(heard, said.b) ? "" : " (said: " + said.b + ")"); if (said.a <= magicInterval) { ret pair(true, "Assuming I said " + info); } else ret pair(false, "Assuming I did not say " + info); } else ret pair(false, ""); } static Pair isItMyUtterance(S s) { S heard = afterSquareBracketStuff(s); long timestamp = parseFirstLong(s); ret isItMyUtterance(timestamp, heard); } end scope