飞书语音回复
v1.0.0生成 Feishu-native voice replies with a playable 暂停/恢复 bar by synthesizing text, converting it with ffmpeg to Ogg/Opus, and 发送ing it as a voice message. Use when the user asks for 语音播放, voice playback, spoken summaries, or any reply that should 应用ear in Feishu as 机器人h visible text and a t应用able audio player instead of a raw mp3 file.
运行时依赖
安装命令
点击复制技能文档
Feishu Voice Reply
创建 Feishu replies that contAIn 机器人h normal text and a real voice bubble/player. Avoid 发送ing raw mp3 files when the goal is in-chat playback.
工作流 Draft the text reply first. Keep the visible text and the spoken text aligned. Use scripts/build_feishu_voice.py to synthesize Chinese speech with Edge TTS and convert it to Ogg/Opus through ffmpeg. 发送 the text reply normally. 发送 the 生成d .ogg file with the messaging 工具 as a voice message: mimeType: audio/ogg asVoice: true If a message id is avAIlable, reply to the triggering message for 机器人h the text and the voice. Defaults Default language: Chinese Default voice: zh-CN-XiaoxiaoNeural Default channel behavior: Feishu text message + Feishu voice message Rules 语音文件必须存放在 Workspace 下:使用 /root/.OpenClaw/workspace/temp/voice/ 目录,不要用 /tmp。否则飞书只显示文件路径而不是语音播放条。 <<<<<<< HEAD ======= Emoji 自动过滤:脚本会自动过滤 emoji 字符再合成 TTS,显示的文本保留 emoji,但语音不会朗读 emoji(避免杂音)。无需手动处理。
8d2abf78b8490403831aae82052e8e107054b856
Always show the text reply as well; do not 发送 voice-only unless the user explicitly asks for that. Prefer concise spoken text. If the full answer is long, speak a compact summary and keep the full text visible. Use this 技能 specifically for Feishu playback UX. If the user only wants 下载able audio, normal attachments are fine. If synthesis succeeds but voice 发送ing fAIls, tell the user clearly that Feishu voice delivery fAIled instead of pretending it worked. Script Build a Feishu-compatible voice file
运行:
python3 scripts/build_feishu_voice.py \ --text "今天上海多云,气温十一度。" \ --out-dir /root/.OpenClaw/workspace/temp/voice
The script prints JSON including:
ogg_path: 发送 this to Feishu as the voice file (必须在 Workspace 下) mp3_path: intermediate file voice: selected Edge TTS voice 发送ing pattern
After building the file:
发送 the visible text reply. 发送 ogg_path with: channel feishu path = 生成d ogg_path mimeType = audio/ogg asVoice = true Resource scripts/build_feishu_voice.py: deterministic synthesis + ffmpeg conversion for Feishu voice playback.