← 返回 Skills 市场
helloeveryworlds

Feishu Voice Tts

作者 helloeveryworlds · GitHub ↗ · v1.1.1 · MIT-0
cross-platform ⚠ suspicious
570
总下载
1
收藏
3
当前安装
5
版本数
在 OpenClaw 中安装
/install feishu-voice-tts
功能描述
将文本通过 MOSS-TTS 转换为语音,并发送到飞书群/个人。支持语音消息格式(带波形条)。
使用说明 (SKILL.md)

飞书语音 TTS 技能

当用户要求"给飞书发语音"、"在飞书里读这段话"或类似需求时,执行以下流程:

核心流程

  1. MOSS-TTS 生成 WAV → 2. ffmpeg 转 opus → 3. 上传飞书 → 4. 发送语音消息

前置要求

  • 系统已安装 ffmpeg
  • 已配置环境变量 MOSS_API_KEY(MOSS-TTS API Key)
  • 飞书配置在 OpenClaw 安装时已自动完成

使用方法

命令行模式

# 基本用法
python scripts/feishu_tts.py --text "要发送的文本" --chat_id "飞书群ID"

# 指定音色
python scripts/feishu_tts.py --text "文本" --voice_id "音色ID" --chat_id "群ID"

# 发送给个人(需要 open_id)
python scripts/feishu_tts.py --text "文本" --receive_id "用户open_id" --receive_id_type "open_id"

参数说明

参数 必填 说明
--text 要转语音的文本
--chat_id 飞书群 ID(与 receive_id 二选一)
--receive_id 接收者 ID(open_id 或 chat_id)
--receive_id_type 接收者类型:chat_idopen_id,默认 chat_id
--voice_id MOSS 音色 ID,默认 2001286865130360832(周周)
--output 输出文件路径,默认 feishu_voice.wav

示例

# 给飞书群发语音
python scripts/feishu_tts.py --text "你好,我是 AI 助手" --chat_id "oc_xxx"

# 给指定用户发语音
python scripts/feishu_tts.py --text "你好" --receive_id "ou_xxx" --receive_id_type "open_id"

飞书权限要求

确保飞书应用已开通以下权限:

  • im:message:send_as_bot - 以机器人身份发送消息
  • drive:file:upload - 上传文件(发送语音消息必需)
  • im:message.group:readonly - 读取群组消息(获取历史记录必需)
  • im:chat:readonly - 读取会话列表

注意:需要在飞书开放平台应用配置中添加 drive:file:upload 权限并发布。

获取消息历史

脚本:get_history.py

获取飞书群消息历史,按时间排序。

# 获取最近 24 小时的消息
python scripts/get_history.py --chat_id "oc_xxx"

# 获取最近 1 小时的消息
python scripts/get_history.py --chat_id "oc_xxx" --hours 1

# 获取所有消息
python scripts/get_history.py --chat_id "oc_xxx" --all

# 只显示 audio 类型的消息
python scripts/get_history.py --chat_id "oc_xxx" --type audio

# 显示最近 10 条
python scripts/get_history.py --chat_id "oc_xxx" --limit 10

参数说明

参数 必填 说明
--chat_id 飞书群 ID
--hours 获取最近几小时的消息,默认 24
--all 获取所有消息(不使用时间过滤)
--limit 显示最近多少条消息,默认 30
--type 只显示指定类型的消息,如 audio, file, text, image

环境变量

需要设置飞书应用认证:

FEISHU_APP_ID=你的应用ID
FEISHU_APP_SECRET=你的应用密钥
安全使用建议
This skill's functionality appears to match its description (MOSS-TTS -> ffmpeg -> Feishu upload), but the published metadata omitted required environment variables and the requirement to install ffmpeg. Before installing or using it: 1) Do not supply secrets blindly — verify you want to give FEISHU_APP_ID/FEISHU_APP_SECRET and MOSS_API_KEY to this code and to the endpoints referenced (studio.mosi.cn and open.feishu.cn). 2) Confirm ffmpeg is installed in the environment. 3) Review the scripts (they are short and readable) to ensure they meet your policy — they call the listed external APIs and use subprocess/ffmpeg but do not contain obfuscated code or unknown endpoints. 4) Ensure the Feishu app permissions requested (message send, file upload, read) are acceptable and apply least privilege. 5) Ask the publisher to correct the skill metadata to declare required env vars and binaries; the current mismatch is misleading. If you cannot verify the MOSS endpoint or do not want to share these credentials, do not install/use the skill.
功能分析
Type: OpenClaw Skill Name: feishu-voice-tts Version: 1.1.1 The skill bundle provides a legitimate integration between MOSS-TTS and Feishu (Lark) for sending voice messages. The scripts (feishu_tts.py, get_history.py, and tts.py) use standard API patterns, handle subprocess calls safely without shell injection risks, and require expected environment variables for authentication (FEISHU_APP_ID, MOSS_API_KEY). No evidence of data exfiltration, malicious execution, or prompt injection was found.
能力评估
Purpose & Capability
The skill's stated purpose (convert text to speech via MOSS-TTS and send to Feishu) matches the scripts' behavior. However the registry metadata claims 'Required env vars: none' and 'Required binaries: none', while the code and SKILL.md clearly require MOSS_API_KEY, FEISHU_APP_ID, FEISHU_APP_SECRET and the ffmpeg binary. This mismatch is an incoherence between claimed requirements and actual needs.
Instruction Scope
The SKILL.md instructions are narrowly scoped and align with the code: call MOSS-TTS, transcode with ffmpeg, upload to Feishu, and optionally fetch message history. The scripts only access the Feishu and MOSS endpoints shown in the files. One minor red flag: SKILL.md's statement that 'Feishu configuration in OpenClaw was automatically completed' may be misleading — the scripts still require FEISHU_APP_ID/SECRET, and the metadata did not declare these.
Install Mechanism
There is no installer that downloads external code at runtime; the package is delivered as scripts in the skill bundle. No remote-install URLs or archive extraction steps were found. This is low install risk.
Credentials
The scripts legitimately require MOSS_API_KEY and FEISHU_APP_ID/FEISHU_APP_SECRET to operate; those environment variables are appropriate for the stated integration. The concern is that the skill metadata claims no required environment variables, which could lead users to inadvertently provide credentials without realizing. Required variables are named SECRET/KEY which is expected, but the metadata omission is a packaging inconsistency that affects user consent/awareness.
Persistence & Privilege
The skill does not request permanent platform presence (always: false). It does not modify other skills or system-wide settings. It runs as ad-hoc scripts and uses no elevated privileges beyond network calls to the noted APIs.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install feishu-voice-tts
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /feishu-voice-tts 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.1.1
Improve reliability: add env/input checks, timeout/network handling, HTTP/JSON validation, ffmpeg precheck, and clearer failure messages.
v1.1.0
Summary: Adds message history retrieval feature and updates permissions. - 新增脚本 get_history.py,可获取飞书群消息历史,支持按时间和类型筛选 - SKILL.md 增加“获取消息历史”相关说明与使用示例 - 飞书权限要求增加读取群组消息与会话列表权限(im:message.group:readonly, im:chat:readonly) - 其他细节文档同步更新
v1.0.2
- 飞书配置步骤已简化:安装 OpenClaw 时自动完成,无需手动设置 FEISHU_APP_ID/FEISHU_APP_SECRET。 - 前置要求部分更新,去除了手动配置飞书凭证的说明。 - 其他内容未变,功能和使用方法保持一致。
v1.0.1
- Updated Feishu app permissions: now requires `drive:file:upload` instead of `im:resource:upload`. - Added a note in documentation to configure and publish the new permission in the Feishu admin console. - No changes to the core usage, parameters, or process.
v1.0.0
Initial release—convert text to voice and send as a Feishu voice message: - Supports text-to-speech via MOSS-TTS with voice style selection. - Converts generated audio to suitable Feishu format using ffmpeg. - Sends voice messages (with waveform) to Feishu groups or individual users. - Command-line interface with flexible parameters for text, target, and voice type. - Requires ffmpeg installation and specific API credentials.
元数据
Slug feishu-voice-tts
版本 1.1.1
许可证 MIT-0
累计安装 3
当前安装数 3
历史版本数 5
常见问题

Feishu Voice Tts 是什么?

将文本通过 MOSS-TTS 转换为语音,并发送到飞书群/个人。支持语音消息格式(带波形条)。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 570 次。

如何安装 Feishu Voice Tts?

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

Feishu Voice Tts 是免费的吗?

是的,Feishu Voice Tts 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Feishu Voice Tts 支持哪些平台?

Feishu Voice Tts 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Feishu Voice Tts?

由 helloeveryworlds(@helloeveryworlds)开发并维护,当前版本 v1.1.1。

💬 留言讨论