Files
GMW/services
MythEclipseandClaude Opus 4.8 f74252f594 feat(voice): add voice transmit functionality for real-time audio streaming
- Add VoiceTransmitter class to handle PCM audio from backend/browser to Discord
- Implement voice:transmit:start and voice:transmit:stop command handlers
- Upsample 24kHz mono PCM to 48kHz stereo for Discord compatibility
- Encode PCM to Opus and stream via browser-bridge player owner
- Subscribe to Redis channel backend:voice:transmit for real-time PCM data

Features:
- Backend can send PCM audio (24kHz mono s16le base64) via Redis
- Automatic upsampling and encoding to Discord-compatible format
- Clean start/stop lifecycle with resource cleanup

This completes the bidirectional voice streaming:
- Listen: Discord → Backend (already working via voicePcmData broadcast)
- Transmit: Backend → Discord (now implemented)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 20:48:16 +07:00
..