mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 19:44:59 +00:00
fix(tts): use opus format and enable voice bubbles for feishu and whatsapp (#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 <ninghu@Nings-MacBook-Pro.local> Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
This commit is contained in:
@@ -154,7 +154,7 @@ describe("tts", () => {
|
||||
});
|
||||
|
||||
describe("resolveOutputFormat", () => {
|
||||
it("selects opus for Telegram and mp3 for other channels", () => {
|
||||
it("selects opus for voice-bubble channels (telegram/feishu/whatsapp) and mp3 for others", () => {
|
||||
const cases = [
|
||||
{
|
||||
channel: "telegram",
|
||||
@@ -165,6 +165,24 @@ describe("tts", () => {
|
||||
voiceCompatible: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
channel: "feishu",
|
||||
expected: {
|
||||
openai: "opus",
|
||||
elevenlabs: "opus_48000_64",
|
||||
extension: ".opus",
|
||||
voiceCompatible: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
channel: "whatsapp",
|
||||
expected: {
|
||||
openai: "opus",
|
||||
elevenlabs: "opus_48000_64",
|
||||
extension: ".opus",
|
||||
voiceCompatible: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
channel: "discord",
|
||||
expected: {
|
||||
|
||||
Reference in New Issue
Block a user