Skip to content

fix(pai-voice-system): Add Linux platform support for audio playback#356

Closed
pkumaschow wants to merge 2 commits into
danielmiessler:mainfrom
pkumaschow:fix/voice-server-linux-audio
Closed

fix(pai-voice-system): Add Linux platform support for audio playback#356
pkumaschow wants to merge 2 commits into
danielmiessler:mainfrom
pkumaschow:fix/voice-server-linux-audio

Conversation

@pkumaschow

Copy link
Copy Markdown
  • Detect platform (macOS vs Linux) using os.platform()
  • Update playAudio() to use ffplay on Linux instead of afplay
  • Update sendNotification() to conditionally use osascript on macOS only
  • Add notify-send support on Linux (optional, graceful degradation)
  • Maintain full macOS compatibility

Tested on Linux (Fedora) with ffplay successfully playing ElevenLabs TTS output.

peter.kumaschow and others added 2 commits January 9, 2026 17:06
- Detect platform (macOS vs Linux) using os.platform()
- Update playAudio() to use ffplay on Linux instead of afplay
- Update sendNotification() to conditionally use osascript on macOS only
- Add notify-send support on Linux (optional, graceful degradation)
- Maintain full macOS compatibility

Tested on Linux (Fedora) with ffplay successfully playing ElevenLabs TTS output.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
… issue

Short audio messages were being cut off on Linux due to audio system
fade-in delay. This fix adds 0.5 seconds of silence padding before
playback to give the audio system time to wake up.

Changes:
- Add 0.5s silence padding using ffmpeg for Linux platform
- Enhanced error logging for debugging audio issues
- Proper cleanup of both original and padded temp files
- Graceful fallback to non-padded playback if ffmpeg fails
- macOS behavior unchanged (no padding needed)

Technical details:
- Uses ffmpeg's anullsrc filter to generate silence
- Concatenates silence + audio before playback
- Maintains ffplay for actual playback (volume control)

Tested on Linux (Fedora) with both short ("Done") and long messages.
Short messages now play completely without being cut off.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@sti0

sti0 commented Jan 9, 2026

Copy link
Copy Markdown
Contributor

Already addressed in #351

@kaimagnus

Copy link
Copy Markdown
Collaborator

Thank you for the Linux audio playback support, @pkumaschow! Cross-platform audio is important for the voice system.

Unfortunately, v3.0 restructured the codebase and the Packs/pai-voice-system/ directory no longer exists. Closing as the target paths no longer exist. If you'd like to rebase against v3.0's structure, we'd welcome it!

@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.

3 participants