← 返回 Skills 市场
icesumer-lgtm

🎙️ 飞书语音条生成

作者 icesumer-lgtm · GitHub ↗ · v1.1.0 · MIT-0
cross-platform ✓ 安全检测通过
115
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install feishu-voice-note
功能描述
将文本通过 TTS 生成 MP3,转换为飞书支持的 OPUS 格式后自动发送为飞书语音条,实现语音消息自动化。
使用说明 (SKILL.md)

feishu-voice-note 技能

描述

飞书原生语音条(语音条)生成工具。使用场景:用户要求发送语音条、需要将 TTS 转为 OPUS 格式、飞书语音消息自动化。支持 OpenAI/Edge TTS、ffmpeg 转换、自动发送。

触发词

  • "发送语音条"
  • "用语音回复"
  • "语音消息"
  • "语音条"
  • "TTS 转语音"

执行流程

步骤 1:TTS 生成 MP3

调用 tts 工具生成 MP3 音频:

# 使用 OpenClaw 内置 tts 工具
tts --text "要转换的文本内容" --channel feishu

输出: MP3 文件路径(如 voice.mp3


步骤 2:ffmpeg 转换为 OPUS 32k

使用 ffmpeg 将 MP3 转换为飞书支持的 OPUS 格式:

# Windows PowerShell
& "C:\ffmpeg\ffmpeg-8.1-essentials_build\bin\ffmpeg.exe" -i "voice.mp3" -c:a libopus -b:a 32k "voice.opus" -y

参数说明:

  • -i voice.mp3 - 输入 MP3 文件
  • -c:a libopus - 使用 OPUS 编码器
  • -b:a 32k - 比特率 32kbps(飞书推荐)
  • -y - 覆盖已存在的文件

输出: OPUS 文件路径(如 voice.opus


步骤 3:发送语音条到飞书

使用 openclaw message send 发送语音条:

openclaw message send \
    --channel feishu \
    --account main \
    --target "user:ou_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
    --media "voice.opus"

参数说明:

参数 说明
--channel feishu 指定飞书渠道
--account main 使用主账号配置
--target user:ou_XXX 目标用户 Open ID(需要替换为实际用户 ID)
--media 文件路径 OPUS 音频文件路径

⚠️ 重要: --target 参数需要替换为实际的用户 Open ID,格式为 user:ou_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


步骤 4:回复 NO_REPLY

发送语音条后,回复 NO_REPLY 避免重复消息:

NO_REPLY

完整流程图

graph TB
    A[准备回答] --> B[正常文本回复]
    B --> C[TTS 生成 MP3]
    C --> D[ffmpeg 转 OPUS 32k]
    D --> E[openclaw message send]
    E --> F[回复 NO_REPLY]

技术配置

前置条件

  1. ffmpeg 已安装

    • Windows: C:\ffmpeg\ffmpeg-8.1-essentials_build\bin\ffmpeg.exe
    • macOS: /usr/local/bin/ffmpeg
    • Linux: /usr/bin/ffmpeg
  2. OpenClaw 配置

    • TTS Provider 已配置(Edge TTS / OpenAI TTS)
    • 飞书渠道已启用
  3. 依赖

    • Node.js 18+
    • OpenClaw 2026.3.13+

错误处理

常见错误及解决方案

错误 1:ffmpeg 未找到

错误:'ffmpeg' 不是内部或外部命令
解决:安装 ffmpeg 并添加到 PATH

错误 2:Open ID 格式错误

错误:Invalid target format
解决:确保格式为 user:ou_XXX(32 字符)

错误 3:文件不存在

错误:File not found: voice.opus
解决:检查 ffmpeg 转换是否成功,文件路径是否正确

适用范围

所有回答 - 无论长短、简单/复杂
所有场景 - 个人聊天、群聊、子会话
所有 Agent - 阿美、阿香、阿丽、dev、content、ops 等


例外情况

心跳确认 - HEARTBEAT_OK 不需要语音
NO_REPLY 回复 - 已经发送语音后不需要再次发送


最佳实践

1. TTS 文本长度控制

  • 推荐: 150 字以内(约 30-60 秒)
  • 过长处理: 分段生成多个语音条

2. 文件清理

发送后清理临时文件:

Remove-Item "voice.mp3" -Force
Remove-Item "voice.opus" -Force

3. 错误重试

发送失败时重试 1 次:

# 重试逻辑
if (!$?) {
    Start-Sleep -Seconds 2
    openclaw message send --channel feishu --account main --target "user:ou_XXX" --media "voice.opus"
}

版本历史

版本 日期 变更
v1.0 2026-03-18 初始版本
v1.1 2026-03-29 修复命令格式,添加 --channel 和 --account 参数

参考资源

  • OpenClaw 官方文档:https://openclaw.dev/
  • 飞书语音消息 API 文档:https://[你的租户].feishu.cn/docx/XXX
  • ffmpeg 官方文档:https://ffmpeg.org/documentation.html

许可证

MIT License


维护者

阿美团队(OpenClaw Community)

安全使用建议
What to check before installing/using: 1) Ensure ffmpeg is installed and reachable (SKILL.md expects ffmpeg; the registry metadata omitted that requirement). 2) Confirm your OpenClaw configuration includes a Feishu channel/account with correct credentials and permissions; the skill will use that account (e.g., --account main) to send messages. 3) Review trigger settings — the doc suggests broad applicability ("all answers/agents"); disable automatic invocation if you don't want voice messages sent frequently or unexpectedly. 4) Replace example Open IDs with real targets and avoid sending sensitive content as audio. 5) Verify temporary file cleanup and that agents run in an environment where generated audio files won't leak (or adjust cleanup). 6) Because source is listed as unknown/homepage is minimal, you may want to verify the package repository or author if provenance matters. Overall the skill appears coherent with its stated purpose; just confirm environment setup and invocation scope before enabling.
功能分析
Type: OpenClaw Skill Name: feishu-voice-note Version: 1.1.0 The skill is a legitimate utility for generating and sending Feishu voice messages. It defines a workflow using 'tts' for audio generation, 'ffmpeg' for conversion to OPUS format, and the 'openclaw' CLI for delivery. While it contains hardcoded file paths for ffmpeg in 'SKILL.md' and 'package.json' that may lead to execution errors on systems with different configurations, there is no evidence of malicious intent, data exfiltration, or unauthorized command execution.
能力评估
Purpose & Capability
The skill's stated purpose (generate TTS, convert to OPUS, send Feishu voice note) matches the runtime instructions. One minor mismatch: the package/registry metadata lists no required binaries, but SKILL.md clearly requires ffmpeg (and provides example paths). This is an informational inconsistency in metadata, not a functional mismatch.
Instruction Scope
SKILL.md instructions are narrowly focused: call the built-in 'tts' tool, run ffmpeg to transcode, and call 'openclaw message send' to deliver the OPUS file. They do not instruct reading arbitrary files or exfiltrating secrets. However the doc states the skill is applicable to "所有回答" and "所有 Agent" (all responses/agents), which is broad and may cause frequent automatic voice-sending if enabled—review trigger/usage policies before enabling automatic invocation.
Install Mechanism
This is instruction-only (no install spec, no code files executed or downloaded). That is low-risk: nothing is written to disk by the skill itself beyond normal temporary audio files created at runtime.
Credentials
The skill requests no environment variables or external credentials itself. It relies on existing OpenClaw configuration for TTS provider and the Feishu channel/account (which is expected). Ensure the OpenClaw Feishu account used (e.g., '--account main') has appropriate, minimal permissions.
Persistence & Privilege
Flags show always:false and model invocation enabled (normal). The skill does not request permanent presence or indicate it will modify other skills or system-wide settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install feishu-voice-note
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /feishu-voice-note 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.1.0
v1.1.0: 修复命令格式,添加安全审查,完善文档
元数据
Slug feishu-voice-note
版本 1.1.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

🎙️ 飞书语音条生成 是什么?

将文本通过 TTS 生成 MP3,转换为飞书支持的 OPUS 格式后自动发送为飞书语音条,实现语音消息自动化。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 115 次。

如何安装 🎙️ 飞书语音条生成?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install feishu-voice-note」即可一键安装,无需额外配置。

🎙️ 飞书语音条生成 是免费的吗?

是的,🎙️ 飞书语音条生成 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

🎙️ 飞书语音条生成 支持哪些平台?

🎙️ 飞书语音条生成 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 🎙️ 飞书语音条生成?

由 icesumer-lgtm(@icesumer-lgtm)开发并维护,当前版本 v1.1.0。

💬 留言讨论