singularity-forge/src/resources/extensions/voice
Tom Boucher 9574c5796d fix(voice): fix misleading portaudio error on PEP 668 Linux systems (#2403) (#2407)
Two bugs in ensureLinuxReady():

1. Branch ordering: "ModuleNotFoundError: No module named 'sounddevice'"
   contains the word "sounddevice", so the portaudio branch matched first,
   producing the misleading "install libportaudio2" message even when
   libportaudio2 was already installed.

2. No venv auto-creation: On PEP 668 systems (Ubuntu 23.10+), system pip
   is blocked. The code trusted speech-recognizer.py to self-install deps,
   but its pip install also fails. Now ensureLinuxReady() auto-creates
   ~/.gsd/voice-venv when the sounddevice module is missing.

Fixes:
- Extract diagnoseSounddeviceError() with correct branch ordering
  (check "No module"/"ModuleNotFoundError" BEFORE "sounddevice")
- Add ensureVoiceVenv() to auto-create venv with sounddevice+requests
- Refactor into linux-ready.ts for testability
- Add 20 unit tests covering all error diagnosis paths and venv creation

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 08:45:39 -06:00
..
tests fix(voice): fix misleading portaudio error on PEP 668 Linux systems (#2403) (#2407) 2026-03-25 08:45:39 -06:00
.gitignore feat(voice): Groq Whisper API backend for Linux voice mode (#366) 2026-03-14 09:08:36 -06:00
extension-manifest.json feat: add extension manifest + registry for user-managed enable/disable (#1238) 2026-03-18 14:12:19 -06:00
index.ts fix(voice): fix misleading portaudio error on PEP 668 Linux systems (#2403) (#2407) 2026-03-25 08:45:39 -06:00
linux-ready.ts fix(voice): fix misleading portaudio error on PEP 668 Linux systems (#2403) (#2407) 2026-03-25 08:45:39 -06:00
speech-recognizer.py feat(voice): Groq Whisper API backend for Linux voice mode (#366) 2026-03-14 09:08:36 -06:00
speech-recognizer.swift fix(voice): preserve transcription across pauses 2026-03-11 16:59:03 -06:00