Warning: session_start(): open(/var/lib/php/sessions/sess_aljehlp2e30pul49gb3aoaf28f, 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
p-experiment {
L voiceLog = scanLog(cereprocLog());
L earLog = scanLog(speechRecognitionLog());
new L lines;
for (S s : earLog) {
S timestamp = beforeSpace(s);
if (!isInteger(timestamp)) continue;
if (!cic(s, "[Chrome Speech]")) continue;
int i = -Collections.binarySearch(voiceLog, timestamp)-2;
while (i > 0 && !eq(safeUnstructMap(dropUntilSpace(get(voiceLog, i))).get("action"), "End talking")) --i;
S said = get(voiceLog, i);
S timestamp2 = beforeSpace(said);
if (!isInteger(timestamp2)) continue; // huh?
long diff = parseLong(timestamp)-parseLong(timestamp2);
if (diff >= 10000) continue;
Map map = safeUnstructMap(dropUntilSpace(said));
S textSaid = (S) map.get("text");
long talkLength = 0;
S prev = get(voiceLog, i-1);
Map prevMap = safeUnstructMap(dropUntilSpace(prev));
if (eq(mapGet(prevMap, "action"), "Begin talking")
&& eq(mapGet(prevMap, "text"), textSaid))
talkLength = parseLong(timestamp2)-parseLong(beforeSpace(prev));
//print(s + " => " + i + ", " + diff + " ms " + dropUntilSpace(said));
S heard = afterSquareBracketStuff(s);
lines.add(pad(diff, 5) + " ms/" + pad(talkLength, 5) + " ms: " + textSaid + " => " + heard);
}
printLines(sorted(lines));
}