fix(tts): use opus format and enable voice bubbles for feishu and whatsapp#27366
Conversation
Greptile SummaryUnified TTS voice bubble support across Telegram, Feishu, and WhatsApp by extracting a Key changes:
The implementation is sound - both Feishu and WhatsApp are confirmed to support opus audio for voice messages (WhatsApp uses OGG Opus for PTT voice notes per Confidence Score: 5/5
Last reviewed commit: fc3f125 |
…tsapp Previously only Telegram received opus output and had `shouldVoice=true`. Feishu and WhatsApp also support voice-bubble playback and require opus audio, but were falling back to mp3 with `audioAsVoice=false`. - Extract VOICE_BUBBLE_CHANNELS set (telegram, feishu, whatsapp) - resolveOutputFormat: return TELEGRAM_OUTPUT (opus) for all voice-bubble channels - shouldVoice: enable for all voice-bubble channels, not just telegram - Update test to cover feishu and whatsapp cases
b1c0784 to
4a682bb
Compare
|
PR #27366 - fix(tts): use opus format and enable voice bubbles for feishu and whatsapp (#27366) Merged via squash.
Thanks @smthfoxy! |
…tsapp (openclaw#27366) * fix(tts): use opus format and enable voice bubbles for feishu and whatsapp Previously only Telegram received opus output and had `shouldVoice=true`. Feishu and WhatsApp also support voice-bubble playback and require opus audio, but were falling back to mp3 with `audioAsVoice=false`. - Extract VOICE_BUBBLE_CHANNELS set (telegram, feishu, whatsapp) - resolveOutputFormat: return TELEGRAM_OUTPUT (opus) for all voice-bubble channels - shouldVoice: enable for all voice-bubble channels, not just telegram - Update test to cover feishu and whatsapp cases * Changelog: add TTS voice-bubble channel coverage note --------- Co-authored-by: Ning Hu <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
…tsapp (openclaw#27366) * fix(tts): use opus format and enable voice bubbles for feishu and whatsapp Previously only Telegram received opus output and had `shouldVoice=true`. Feishu and WhatsApp also support voice-bubble playback and require opus audio, but were falling back to mp3 with `audioAsVoice=false`. - Extract VOICE_BUBBLE_CHANNELS set (telegram, feishu, whatsapp) - resolveOutputFormat: return TELEGRAM_OUTPUT (opus) for all voice-bubble channels - shouldVoice: enable for all voice-bubble channels, not just telegram - Update test to cover feishu and whatsapp cases * Changelog: add TTS voice-bubble channel coverage note --------- Co-authored-by: Ning Hu <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
…tsapp (openclaw#27366) * fix(tts): use opus format and enable voice bubbles for feishu and whatsapp Previously only Telegram received opus output and had `shouldVoice=true`. Feishu and WhatsApp also support voice-bubble playback and require opus audio, but were falling back to mp3 with `audioAsVoice=false`. - Extract VOICE_BUBBLE_CHANNELS set (telegram, feishu, whatsapp) - resolveOutputFormat: return TELEGRAM_OUTPUT (opus) for all voice-bubble channels - shouldVoice: enable for all voice-bubble channels, not just telegram - Update test to cover feishu and whatsapp cases * Changelog: add TTS voice-bubble channel coverage note --------- Co-authored-by: Ning Hu <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
…tsapp (openclaw#27366) * fix(tts): use opus format and enable voice bubbles for feishu and whatsapp Previously only Telegram received opus output and had `shouldVoice=true`. Feishu and WhatsApp also support voice-bubble playback and require opus audio, but were falling back to mp3 with `audioAsVoice=false`. - Extract VOICE_BUBBLE_CHANNELS set (telegram, feishu, whatsapp) - resolveOutputFormat: return TELEGRAM_OUTPUT (opus) for all voice-bubble channels - shouldVoice: enable for all voice-bubble channels, not just telegram - Update test to cover feishu and whatsapp cases * Changelog: add TTS voice-bubble channel coverage note --------- Co-authored-by: Ning Hu <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
…tsapp (openclaw#27366) * fix(tts): use opus format and enable voice bubbles for feishu and whatsapp Previously only Telegram received opus output and had `shouldVoice=true`. Feishu and WhatsApp also support voice-bubble playback and require opus audio, but were falling back to mp3 with `audioAsVoice=false`. - Extract VOICE_BUBBLE_CHANNELS set (telegram, feishu, whatsapp) - resolveOutputFormat: return TELEGRAM_OUTPUT (opus) for all voice-bubble channels - shouldVoice: enable for all voice-bubble channels, not just telegram - Update test to cover feishu and whatsapp cases * Changelog: add TTS voice-bubble channel coverage note --------- Co-authored-by: Ning Hu <[email protected]> Co-authored-by: Tak Hoffman <[email protected]> (cherry picked from commit 4d6c535)
…tsapp (openclaw#27366) * fix(tts): use opus format and enable voice bubbles for feishu and whatsapp Previously only Telegram received opus output and had `shouldVoice=true`. Feishu and WhatsApp also support voice-bubble playback and require opus audio, but were falling back to mp3 with `audioAsVoice=false`. - Extract VOICE_BUBBLE_CHANNELS set (telegram, feishu, whatsapp) - resolveOutputFormat: return TELEGRAM_OUTPUT (opus) for all voice-bubble channels - shouldVoice: enable for all voice-bubble channels, not just telegram - Update test to cover feishu and whatsapp cases * Changelog: add TTS voice-bubble channel coverage note --------- Co-authored-by: Ning Hu <[email protected]> Co-authored-by: Tak Hoffman <[email protected]> (cherry picked from commit 4d6c535)
…tsapp (openclaw#27366) * fix(tts): use opus format and enable voice bubbles for feishu and whatsapp Previously only Telegram received opus output and had `shouldVoice=true`. Feishu and WhatsApp also support voice-bubble playback and require opus audio, but were falling back to mp3 with `audioAsVoice=false`. - Extract VOICE_BUBBLE_CHANNELS set (telegram, feishu, whatsapp) - resolveOutputFormat: return TELEGRAM_OUTPUT (opus) for all voice-bubble channels - shouldVoice: enable for all voice-bubble channels, not just telegram - Update test to cover feishu and whatsapp cases * Changelog: add TTS voice-bubble channel coverage note --------- Co-authored-by: Ning Hu <[email protected]> Co-authored-by: Tak Hoffman <[email protected]> (cherry picked from commit 4d6c535)
…tsapp (openclaw#27366) * fix(tts): use opus format and enable voice bubbles for feishu and whatsapp Previously only Telegram received opus output and had `shouldVoice=true`. Feishu and WhatsApp also support voice-bubble playback and require opus audio, but were falling back to mp3 with `audioAsVoice=false`. - Extract VOICE_BUBBLE_CHANNELS set (telegram, feishu, whatsapp) - resolveOutputFormat: return TELEGRAM_OUTPUT (opus) for all voice-bubble channels - shouldVoice: enable for all voice-bubble channels, not just telegram - Update test to cover feishu and whatsapp cases * Changelog: add TTS voice-bubble channel coverage note --------- Co-authored-by: Ning Hu <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
…tsapp (openclaw#27366) * fix(tts): use opus format and enable voice bubbles for feishu and whatsapp Previously only Telegram received opus output and had `shouldVoice=true`. Feishu and WhatsApp also support voice-bubble playback and require opus audio, but were falling back to mp3 with `audioAsVoice=false`. - Extract VOICE_BUBBLE_CHANNELS set (telegram, feishu, whatsapp) - resolveOutputFormat: return TELEGRAM_OUTPUT (opus) for all voice-bubble channels - shouldVoice: enable for all voice-bubble channels, not just telegram - Update test to cover feishu and whatsapp cases * Changelog: add TTS voice-bubble channel coverage note --------- Co-authored-by: Ning Hu <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
…tsapp (openclaw#27366) * fix(tts): use opus format and enable voice bubbles for feishu and whatsapp Previously only Telegram received opus output and had `shouldVoice=true`. Feishu and WhatsApp also support voice-bubble playback and require opus audio, but were falling back to mp3 with `audioAsVoice=false`. - Extract VOICE_BUBBLE_CHANNELS set (telegram, feishu, whatsapp) - resolveOutputFormat: return TELEGRAM_OUTPUT (opus) for all voice-bubble channels - shouldVoice: enable for all voice-bubble channels, not just telegram - Update test to cover feishu and whatsapp cases * Changelog: add TTS voice-bubble channel coverage note --------- Co-authored-by: Ning Hu <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
…tsapp (openclaw#27366) * fix(tts): use opus format and enable voice bubbles for feishu and whatsapp Previously only Telegram received opus output and had `shouldVoice=true`. Feishu and WhatsApp also support voice-bubble playback and require opus audio, but were falling back to mp3 with `audioAsVoice=false`. - Extract VOICE_BUBBLE_CHANNELS set (telegram, feishu, whatsapp) - resolveOutputFormat: return TELEGRAM_OUTPUT (opus) for all voice-bubble channels - shouldVoice: enable for all voice-bubble channels, not just telegram - Update test to cover feishu and whatsapp cases * Changelog: add TTS voice-bubble channel coverage note --------- Co-authored-by: Ning Hu <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
…tsapp (openclaw#27366) * fix(tts): use opus format and enable voice bubbles for feishu and whatsapp Previously only Telegram received opus output and had `shouldVoice=true`. Feishu and WhatsApp also support voice-bubble playback and require opus audio, but were falling back to mp3 with `audioAsVoice=false`. - Extract VOICE_BUBBLE_CHANNELS set (telegram, feishu, whatsapp) - resolveOutputFormat: return TELEGRAM_OUTPUT (opus) for all voice-bubble channels - shouldVoice: enable for all voice-bubble channels, not just telegram - Update test to cover feishu and whatsapp cases * Changelog: add TTS voice-bubble channel coverage note --------- Co-authored-by: Ning Hu <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
…tsapp (openclaw#27366) Cherry-pick of upstream 5350f5b.
…tsapp (openclaw#27366) * fix(tts): use opus format and enable voice bubbles for feishu and whatsapp Previously only Telegram received opus output and had `shouldVoice=true`. Feishu and WhatsApp also support voice-bubble playback and require opus audio, but were falling back to mp3 with `audioAsVoice=false`. - Extract VOICE_BUBBLE_CHANNELS set (telegram, feishu, whatsapp) - resolveOutputFormat: return TELEGRAM_OUTPUT (opus) for all voice-bubble channels - shouldVoice: enable for all voice-bubble channels, not just telegram - Update test to cover feishu and whatsapp cases * Changelog: add TTS voice-bubble channel coverage note --------- Co-authored-by: Ning Hu <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
…tsapp (openclaw#27366) * fix(tts): use opus format and enable voice bubbles for feishu and whatsapp Previously only Telegram received opus output and had `shouldVoice=true`. Feishu and WhatsApp also support voice-bubble playback and require opus audio, but were falling back to mp3 with `audioAsVoice=false`. - Extract VOICE_BUBBLE_CHANNELS set (telegram, feishu, whatsapp) - resolveOutputFormat: return TELEGRAM_OUTPUT (opus) for all voice-bubble channels - shouldVoice: enable for all voice-bubble channels, not just telegram - Update test to cover feishu and whatsapp cases * Changelog: add TTS voice-bubble channel coverage note --------- Co-authored-by: Ning Hu <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
…tsapp (openclaw#27366) * fix(tts): use opus format and enable voice bubbles for feishu and whatsapp Previously only Telegram received opus output and had `shouldVoice=true`. Feishu and WhatsApp also support voice-bubble playback and require opus audio, but were falling back to mp3 with `audioAsVoice=false`. - Extract VOICE_BUBBLE_CHANNELS set (telegram, feishu, whatsapp) - resolveOutputFormat: return TELEGRAM_OUTPUT (opus) for all voice-bubble channels - shouldVoice: enable for all voice-bubble channels, not just telegram - Update test to cover feishu and whatsapp cases * Changelog: add TTS voice-bubble channel coverage note --------- Co-authored-by: Ning Hu <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
…tsapp (openclaw#27366) * fix(tts): use opus format and enable voice bubbles for feishu and whatsapp Previously only Telegram received opus output and had `shouldVoice=true`. Feishu and WhatsApp also support voice-bubble playback and require opus audio, but were falling back to mp3 with `audioAsVoice=false`. - Extract VOICE_BUBBLE_CHANNELS set (telegram, feishu, whatsapp) - resolveOutputFormat: return TELEGRAM_OUTPUT (opus) for all voice-bubble channels - shouldVoice: enable for all voice-bubble channels, not just telegram - Update test to cover feishu and whatsapp cases * Changelog: add TTS voice-bubble channel coverage note --------- Co-authored-by: Ning Hu <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
…tsapp (openclaw#27366) * fix(tts): use opus format and enable voice bubbles for feishu and whatsapp Previously only Telegram received opus output and had `shouldVoice=true`. Feishu and WhatsApp also support voice-bubble playback and require opus audio, but were falling back to mp3 with `audioAsVoice=false`. - Extract VOICE_BUBBLE_CHANNELS set (telegram, feishu, whatsapp) - resolveOutputFormat: return TELEGRAM_OUTPUT (opus) for all voice-bubble channels - shouldVoice: enable for all voice-bubble channels, not just telegram - Update test to cover feishu and whatsapp cases * Changelog: add TTS voice-bubble channel coverage note --------- Co-authored-by: Ning Hu <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
…tsapp (openclaw#27366) * fix(tts): use opus format and enable voice bubbles for feishu and whatsapp Previously only Telegram received opus output and had `shouldVoice=true`. Feishu and WhatsApp also support voice-bubble playback and require opus audio, but were falling back to mp3 with `audioAsVoice=false`. - Extract VOICE_BUBBLE_CHANNELS set (telegram, feishu, whatsapp) - resolveOutputFormat: return TELEGRAM_OUTPUT (opus) for all voice-bubble channels - shouldVoice: enable for all voice-bubble channels, not just telegram - Update test to cover feishu and whatsapp cases * Changelog: add TTS voice-bubble channel coverage note --------- Co-authored-by: Ning Hu <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
…tsapp (openclaw#27366) * fix(tts): use opus format and enable voice bubbles for feishu and whatsapp Previously only Telegram received opus output and had `shouldVoice=true`. Feishu and WhatsApp also support voice-bubble playback and require opus audio, but were falling back to mp3 with `audioAsVoice=false`. - Extract VOICE_BUBBLE_CHANNELS set (telegram, feishu, whatsapp) - resolveOutputFormat: return TELEGRAM_OUTPUT (opus) for all voice-bubble channels - shouldVoice: enable for all voice-bubble channels, not just telegram - Update test to cover feishu and whatsapp cases * Changelog: add TTS voice-bubble channel coverage note --------- Co-authored-by: Ning Hu <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
…tsapp (openclaw#27366) * fix(tts): use opus format and enable voice bubbles for feishu and whatsapp Previously only Telegram received opus output and had `shouldVoice=true`. Feishu and WhatsApp also support voice-bubble playback and require opus audio, but were falling back to mp3 with `audioAsVoice=false`. - Extract VOICE_BUBBLE_CHANNELS set (telegram, feishu, whatsapp) - resolveOutputFormat: return TELEGRAM_OUTPUT (opus) for all voice-bubble channels - shouldVoice: enable for all voice-bubble channels, not just telegram - Update test to cover feishu and whatsapp cases * Changelog: add TTS voice-bubble channel coverage note --------- Co-authored-by: Ning Hu <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
…tsapp (openclaw#27366) Cherry-pick of upstream 5350f5b.
…tsapp (openclaw#27366) * fix(tts): use opus format and enable voice bubbles for feishu and whatsapp Previously only Telegram received opus output and had `shouldVoice=true`. Feishu and WhatsApp also support voice-bubble playback and require opus audio, but were falling back to mp3 with `audioAsVoice=false`. - Extract VOICE_BUBBLE_CHANNELS set (telegram, feishu, whatsapp) - resolveOutputFormat: return TELEGRAM_OUTPUT (opus) for all voice-bubble channels - shouldVoice: enable for all voice-bubble channels, not just telegram - Update test to cover feishu and whatsapp cases * Changelog: add TTS voice-bubble channel coverage note --------- Co-authored-by: Ning Hu <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
…tsapp (openclaw#27366) * fix(tts): use opus format and enable voice bubbles for feishu and whatsapp Previously only Telegram received opus output and had `shouldVoice=true`. Feishu and WhatsApp also support voice-bubble playback and require opus audio, but were falling back to mp3 with `audioAsVoice=false`. - Extract VOICE_BUBBLE_CHANNELS set (telegram, feishu, whatsapp) - resolveOutputFormat: return TELEGRAM_OUTPUT (opus) for all voice-bubble channels - shouldVoice: enable for all voice-bubble channels, not just telegram - Update test to cover feishu and whatsapp cases * Changelog: add TTS voice-bubble channel coverage note --------- Co-authored-by: Ning Hu <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
…tsapp (openclaw#27366) * fix(tts): use opus format and enable voice bubbles for feishu and whatsapp Previously only Telegram received opus output and had `shouldVoice=true`. Feishu and WhatsApp also support voice-bubble playback and require opus audio, but were falling back to mp3 with `audioAsVoice=false`. - Extract VOICE_BUBBLE_CHANNELS set (telegram, feishu, whatsapp) - resolveOutputFormat: return TELEGRAM_OUTPUT (opus) for all voice-bubble channels - shouldVoice: enable for all voice-bubble channels, not just telegram - Update test to cover feishu and whatsapp cases * Changelog: add TTS voice-bubble channel coverage note --------- Co-authored-by: Ning Hu <[email protected]> Co-authored-by: Tak Hoffman <[email protected]> (cherry picked from commit 5350f5b)
…tsapp (openclaw#27366) * fix(tts): use opus format and enable voice bubbles for feishu and whatsapp Previously only Telegram received opus output and had `shouldVoice=true`. Feishu and WhatsApp also support voice-bubble playback and require opus audio, but were falling back to mp3 with `audioAsVoice=false`. - Extract VOICE_BUBBLE_CHANNELS set (telegram, feishu, whatsapp) - resolveOutputFormat: return TELEGRAM_OUTPUT (opus) for all voice-bubble channels - shouldVoice: enable for all voice-bubble channels, not just telegram - Update test to cover feishu and whatsapp cases * Changelog: add TTS voice-bubble channel coverage note --------- Co-authored-by: Ning Hu <[email protected]> Co-authored-by: Tak Hoffman <[email protected]> (cherry picked from commit 5350f5b)
Problem
TTS voice messages on Feishu and WhatsApp were sent as mp3 file attachments instead of playable audio bubbles, because
resolveOutputFormatonly selected opus for Telegram, andshouldVoicewas only set totruefor Telegram.Both Feishu and WhatsApp support voice-bubble playback and require opus audio—the same behavior as Telegram.
Solution
VOICE_BUBBLE_CHANNELSset containingtelegram,feishu, andwhatsappresolveOutputFormat: return opus output for all channels in this setshouldVoice: enable for all channels in this set (not just telegram)Changes
src/tts/tts.ts: +4 lines, -2 linessrc/tts/tts.test.ts: +21 lines (added feishu and whatsapp test cases)Testing
All 19 TTS tests pass. Verified on a live Feishu and WhatsApp deployment—voice messages now display as audio players.