Skip to content

v3.10.41 — /wake calibrate no longer freezes the REPL on macOS

Choose a tag to compare

@KevRojo KevRojo released this 26 Jul 03:35

🎙️ /wake calibrate froze the whole REPL on a Mac — fixed

Running the wake-word mic calibration on macOS killed the prompt, printing ||PaMacCore (AUHAL)|| Error on line 2523 on the way out.

Two stacked problems:

  • It asked the mic for 16 kHz, but Mac mics are natively 44.1/48 kHz — CoreAudio refused the format and left the stream half-open, so the blocking read() hung forever on the main thread.
  • All of it ran on the REPL thread, so a stuck device took the whole session down.

Fixed

  • Opens at the device's native samplerate (no format rejection).
  • Runs every PortAudio call — including sd.query_devices(), which also touches CoreAudio — in a background thread with a hard 8-second timeout, returning a clear error (device busy / mic permission off) instead of hanging.
  • Mutes the cosmetic CoreAudio/AUHAL C-level noise during capture.

PyPI: https://pypi.org/project/dulus/3.10.41/