Feishu Send Voice
/install feishu-send-voice
Feishu Voice TTS
Overview
把文本转换为语音(edge-tts),再转码为飞书可用的 Opus(OGG 容器),调用飞书开放平台“先上传文件再发 audio 消息”的标准流程发送,避免“直接发文件被降级成文本”。
Quick Start
执行脚本:
skills/feishu-voice-tts/scripts/send_feishu_voice.sh "用户你好,这是一条语音消息" "user_open_id"
参数:
text(必填)要播报的文本open_id(必填,可用环境变量替代)飞书用户 open_idvoice(可选)edge-tts 音色,默认zh-CN-YunxiNeural
环境变量(可选,优先级高于配置文件):
FEISHU_APP_IDFEISHU_APP_SECRETFEISHU_OPEN_IDEDGE_TTS_VOICE
Workflow
按以下顺序执行,不要跳步:
- 文本转语音:
edge-tts生成 mp3 - 转码:
ffmpeg转为audio/ogg(opus 编码,16k 单声道) - 获取 tenant token:飞书
/auth/v3/tenant_access_token/internal - 上传语音文件:飞书
/im/v1/files,拿file_key - 发送 audio 消息:飞书
/im/v1/messages,msg_type=audio+file_key
成功时脚本输出:
{"success": true, "message_id": "...", "file_key": "..."}
Requirements
ffmpeg可用edge-tts可用(脚本自动尝试以下入口):edge-tts~/Library/Python/3.14/bin/edge-ttspython3 -m edge_tts
- 本机存在 OpenClaw 配置:
~/.openclaw/openclaw.json- 默认读取:
channels.feishu.accounts.feishu-main.appId/appSecret
- 默认读取:
Failure Handling
- 缺少依赖:按报错安装(例如
python3 -m pip install --user edge-tts) - 飞书 API 失败:脚本会直接输出原始 JSON 错误,按
code/msg排查 - 被降级成文本:确认发送的是
msg_type=audio且content里是上传后的file_key
scripts/
scripts/send_feishu_voice.sh:完整自动化脚本(TTS + 转码 + 上传 + 发送)
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install feishu-send-voice - After installation, invoke the skill by name or use
/feishu-send-voice - Provide required inputs per the skill's parameter spec and get structured output
What is Feishu Send Voice?
将文本转为语音并通过飞书 audio 消息发送给指定用户。用于“给用户发语音”“把这段话转语音并发飞书”“语音播报结果”等场景,尤其当普通文件发送会降级为文本时使用。仅在指定 channel=feishu 时触发。优先在需要高可达、可听播报时使用。 It is an AI Agent Skill for Claude Code / OpenClaw, with 538 downloads so far.
How do I install Feishu Send Voice?
Run "/install feishu-send-voice" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Feishu Send Voice free?
Yes, Feishu Send Voice is completely free (open-source). You can download, install and use it at no cost.
Which platforms does Feishu Send Voice support?
Feishu Send Voice is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Feishu Send Voice?
It is built and maintained by tangzhan_aicoding (@tangc); the current version is v0.1.0.