← 返回
未分类

飞书语音回复

Generate Feishu-native voice replies with a playable pause/resume bar by synthesizing text, converting it with ffmpeg to Ogg/Opus, and sending it as a voice...
生成飞书原生语音回复,使用文本合成并通过 ffmpeg 转换为 Ogg/Opus,添加可暂停/继续的播放条后发送为语音
jeffli2002
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 401
下载
💾 0
安装
1
版本
#latest

概述

Feishu Voice Reply

Create Feishu replies that contain both normal text and a real voice bubble/player. Avoid sending raw mp3 files when the goal is in-chat playback.

Workflow

  1. Draft the text reply first.
  2. Keep the visible text and the spoken text aligned.
  3. Use scripts/build_feishu_voice.py to synthesize Chinese speech with Edge TTS and convert it to Ogg/Opus through ffmpeg.
  4. Send the text reply normally.
  5. Send the generated .ogg file with the messaging tool as a voice message:
    • mimeType: audio/ogg
    • asVoice: true
  6. If a message id is available, reply to the triggering message for both 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 send 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 skill specifically for Feishu playback UX. If the user only wants downloadable audio, normal attachments are fine.
  • If synthesis succeeds but voice sending fails, tell the user clearly that Feishu voice delivery failed instead of pretending it worked.

Script

Build a Feishu-compatible voice file

Run:

python3 scripts/build_feishu_voice.py \
  --text "今天上海多云,气温十一度。" \
  --out-dir /root/.openclaw/workspace/temp/voice

The script prints JSON including:

  • ogg_path: send this to Feishu as the voice file (必须在 Workspace 下)
  • mp3_path: intermediate file
  • voice: selected Edge TTS voice

Sending pattern

After building the file:

  1. Send the visible text reply.
  2. Send ogg_path with:
    • channel feishu
    • path = generated ogg_path
    • mimeType = audio/ogg
    • asVoice = true

Resource

  • scripts/build_feishu_voice.py: deterministic synthesis + ffmpeg conversion for Feishu voice playback.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-03 10:04 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

Ima All Ai

jeffli2002
最全面的AI内容创作平台,统一接入所有领先模型,覆盖图像(通过KIE API的KIE Nano Banana 2)、视频(Wan 2.6、Kli...
★ 0 📥 385

URL to Video Generator

jeffli2002
使用 Remotion + React 将任意网站转换为宣传视频。适用于用户希望根据网站 URL 生成视频、制作营销宣传片等场景。
★ 1 📥 290

WeChat朋友圈营销

jeffli2002
微信公众号/朋友圈营销内容智能体。输入产品/服务主题、卖点、讲师信息、配图需求,输出专业文案+结构化配图。触发词:发朋友圈、生成朋友圈文案、微信图文、朋友圈营销、创建微信帖子、生成微信图文。
★ 1 📥 303