Skip to content

feat(voice-server): Add Linux support for v3.0 VoiceServer#686

Open
fayerman-source wants to merge 1 commit intodanielmiessler:mainfrom
fayerman-source:feat/linux-compat-v3
Open

feat(voice-server): Add Linux support for v3.0 VoiceServer#686
fayerman-source wants to merge 1 commit intodanielmiessler:mainfrom
fayerman-source:feat/linux-compat-v3

Conversation

@fayerman-source
Copy link
Contributor

Summary

Adds cross-platform support to the v3.0 VoiceServer so it works on both macOS and Linux:

  • Audio playback: Auto-detects mpg123/mpv/aplay on Linux; preserves afplay on macOS
  • Desktop notifications: Uses notify-send on Linux; preserves osascript on macOS
  • Installation: Creates systemd user service on Linux; preserves LaunchAgent on macOS

Platform is detected once at startup — zero runtime overhead.

Files Changed

  • Releases/v3.0/.claude/VoiceServer/server.ts — Cross-platform playAudio() and sendNotification()
  • Releases/v3.0/.claude/VoiceServer/install.sh — Platform-aware service installation (LaunchAgent or systemd)

Context

These are the same Linux fixes from PR #285 and PR #288 (both merged into the old Packs/ structure), ported to the v3.0 architecture. The original code was lost when Packs/ was removed during restructuring.

PLATFORM.md at the repo root documents Linux as "Fully Supported" and references these fixes — this PR makes that documentation accurate again for v3.0.

Testing

  • Tested on Ubuntu/WSL2 (Linux 6.6.87)
  • macOS code paths preserved exactly — no behavioral changes on Darwin

Closes #685

@kaimagnus
Copy link
Collaborator

Great work on this! We'd love to merge it, but it has merge conflicts with recent VoiceServer changes (error propagation fix in commit 95d65cc). Could you rebase on main and resolve the conflicts? Once rebased, we'll merge right away. Thanks! 🙏

server.ts: Cross-platform audio playback (afplay on macOS, mpg123/mpv on
Linux with auto-detection) and desktop notifications (osascript on macOS,
notify-send on Linux). Platform detected once at startup via os.platform().

install.sh: Detect macOS vs Linux, create LaunchAgent or systemd user
service accordingly. Linux install checks for audio player and notify-send
prerequisites. Logs go to ~/.config/pai/ on Linux.

Closes danielmiessler#685
@fayerman-source
Copy link
Contributor Author

Done! Rebased on main and resolved the conflict in sendNotification — kept your desktopNotifications guard and merged it with the Linux notify-send branch. All good on our end. Let me know if anything else needs adjusting.

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.

v3.0 VoiceServer has hard macOS dependencies — no Linux support

2 participants