Skip to content

feat(pai-voice-system): Add Linux support and CLI configuration#351

Closed
sti0 wants to merge 1 commit into
danielmiessler:mainfrom
sti0:feature/voice-linux-reintegration
Closed

feat(pai-voice-system): Add Linux support and CLI configuration#351
sti0 wants to merge 1 commit into
danielmiessler:mainfrom
sti0:feature/voice-linux-reintegration

Conversation

@sti0

@sti0 sti0 commented Jan 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Re-Adds full Linux platform support for the voice server (audio playback + notifications)
  • Adds CLI arguments for runtime configuration (--port, --extra-args)
  • Enhances .env loading from $PAI_DIR/.env with quote stripping (closes 2.1.0 - ENV path inconsistent #346 )
  • Adds devcontainer/PulseAudio documentation for containerized development

Changes

Linux Audio Support

  • Auto-detects mpg123 or mpv for audio playback on Linux
  • Falls back gracefully if no player is installed
  • macOS continues to use built-in afplay

Linux Notifications

  • Uses notify-send for desktop notifications on Linux
  • macOS continues to use osascript

CLI Arguments

  • --port / -p: Override server port
  • --extra-args: Pass extra arguments to audio player (e.g., -o pulse for PulseAudio)

Environment Variables

  • PAI_VOICE_SERVER_PORT: Server port (default: 8888)
  • PAI_VOICE_SERVER_EXTRA_ARGS: Extra audio player arguments
  • Enhanced .env parsing with quote stripping for values

Documentation

  • Added devcontainer setup guide for PulseAudio
  • Updated platform status to show Linux as fully supported
  • Added changelog entry for v1.1.0

Test Plan

  • Voice notification plays on Linux with mpg123
  • CLI --port argument works
  • CLI --extra-args argument passes to audio player
  • .env values with quotes are parsed correctly
  • TypeScript compiles without errors

@sprantic

sprantic commented Jan 9, 2026

Copy link
Copy Markdown

Hi, while we're at it - I fixed support for WSL which is again different from vanilla linux. I think I will wait requesting until this has straightened out

- Add cross-platform audio player detection (macOS: afplay, Linux: mpg123/mpv)
- Add --port/-p and --extra-args CLI options for runtime configuration
- Support PAI_VOICE_SERVER_PORT and PAI_VOICE_SERVER_EXTRA_ARGS environment variables
- Remove dead code (escapeForAppleScript, spawnSafe functions)
- Fix duplicate PAI_DIR variable - reuse paiDir from line 30
- Add mpg123 volume limitation comment
- Update header documentation with platforms and CLI options
- Update README to mark Linux as fully supported

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@sti0
sti0 force-pushed the feature/voice-linux-reintegration branch from 3f23898 to 8a0b0e0 Compare January 9, 2026 20:59
@kaimagnus

Copy link
Copy Markdown
Collaborator

Thank you for the Linux voice support work, @sti0! This is a valuable contribution for cross-platform compatibility.

Unfortunately, v3.0 restructured the codebase and the Packs/pai-voice-system/ directory no longer exists. The voice server now lives under Releases/v3.0/.claude/VoiceServer/. Closing as the target paths no longer exist.

If you'd like to rebase this against the v3.0 structure, we'd welcome it! Linux voice support is still needed.

@kaimagnus kaimagnus closed this Feb 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2.1.0 - ENV path inconsistent

3 participants