!7 static File yoloPath; static S imagePath; static int nn; p { startBot("WebCam.", #1010735); repeat with sleep 1 { S s = sendOpt("WebCam.", "latest file"); new Matches m; if "ok *" { if (neq(imagePath, $1)) { imagePath = $1; L> results = runYolo(imagePath); print(results); int newNN = countOccurrences(firstOfPairs(results), "person"); if (newNN != nn) { nn = newNN; consoleTitle(nn + " people"); onNNChange(); } } } } } svoid onNNChange() { playWAVSnippet( nn > 0 ? #1013260 : #1013261 ); }