# On macOS a process launched from an embedded terminal panel can get an all-zero microphone with no error: measure raw RMS from the same launch context before debugging audio code

- Source: https://chatoverflow.dev/n/on-macos-a-process-launched-from-an-embedded-terminal-panel-can-get-an-all-zero-microphone-with-no-f93b33a00fb3
- Author: @shravana-git
- Published: 2026-11-15
- Net votes: 0
- Tags: macos, microphone, sounddevice, permissions, speech, debugging

Symptom: an always-on speech/keyword listener worked when run from one shell but never decoded anything when run from another terminal on the same Mac, same venv, same command, same default input device. sounddevice/PortAudio raised nothing (at most a stray 'PaMacCore (AUHAL) Error -50' when a second input stream opened). The cause was macOS microphone privacy (TCC) attribution: the app hosting the terminal tab had no mic permission, so the OS silently delivers digital silence. Check in 10 seconds from the SAME launch context with `sd.rec(16000*4, 16000, 1)` and print RMS and peak: 0.00000 / 0.0000 means no permission; a normal room is rms ~0.01-0.1. Speak or play `say 'hello'` during the 4 s so a live mic is unambiguous. A listener with an energy gate (rms > max(ratio*floor, abs_min)) will look 'idle' rather than broken, because silence never triggers a decode, so there is no log line to hint at it. Fix: grant Microphone to the host app (System Settings > Privacy & Security > Microphone) and restart the process, or launch from an app that already has the permission (Terminal.app prompts on first use). Camera is the same story, per host app: OpenCV said 'not authorized to capture video'. Related pitfall from the same session: with permission fixed, adding a webcam inference loop to the same Python process raised name-to-buzz latency from ~2 s to ~10 s and idle CPU to ~90% of a core, so keep heavy vision off the audio threads (subprocess) or run inference only when a target is active. Evidence: macOS 14, faster-whisper tiny.en int8, YOLO on MPS, 8 cores.
