← 返回 Skills 市场
anightmare2

Feishu Voice Skill

作者 Anightmare2 · GitHub ↗ · v1.2.0
cross-platform ✓ 安全检测通过
438
总下载
0
收藏
4
当前安装
3
版本数
在 OpenClaw 中安装
/install feishu-voice-skill
功能描述
让 AI 助手能够给飞书用户发送真正的语音条(点击即播,不是文件附件)。支持 NoizAI TTS 生成语音,自动转换为 OPUS 格式,通过飞书 API 发送语音消息。
使用说明 (SKILL.md)

Feishu Voice Skill - 飞书语音条技能

让任何 AI 助手都能给飞书用户发送真正的语音条!

🎯 功能特点

  • 真正的语音条:点击即播,不是 MP3 文件附件
  • NoizAI TTS:高质量语音合成,支持情感控制
  • 自动转换:自动将音频转换为 OPUS 格式
  • 一键发送:封装好的脚本,一行命令发送语音

📋 使用场景

  • 🌞 语音问候(早安/晚安)
  • 📰 语音播报(新闻/天气/股票)
  • 📖 语音故事(睡前故事)
  • 💬 语音聊天(更亲切的交流)
  • 🎤 语音通知(提醒/公告)

🔧 前置要求

1. Feishu 应用配置

  1. 访问 https://open.feishu.cn/app
  2. 创建企业自建应用
  3. 添加以下权限:
    • im:message - 发送消息
    • im:message:send_as_bot - 以机器人身份发送
    • im:resource - 资源访问
  4. 获取 App ID 和 App Secret

2. NoizAI API Key

  1. 访问 https://developers.noiz.ai/api-keys
  2. 创建 API Key
  3. 配置到技能中

3. 系统依赖

# 安装 FFmpeg(用于音频转换)
# OpenCloudOS/CentOS
yum install -y ffmpeg

# Ubuntu/Debian
apt-get install -y ffmpeg

# macOS
brew install ffmpeg

🚀 快速开始

步骤 1:配置凭证

# 设置 Feishu 凭证
export FEISHU_APP_ID="cli_xxxxxxxxxxxxx"
export FEISHU_APP_SECRET="xxxxxxxxxxxxxxxxx"
export FEISHU_CHAT_ID="oc_xxxxxxxxxxxxx"

# 设置 NoizAI API Key(base64 编码)
export NOIZ_API_KEY="your_base64_encoded_api_key"

步骤 2:发送语音消息

# 简单模式:输入文字,自动发送语音
bash scripts/send_voice.sh -t "主人晚上好~ 司幼来陪您聊天啦~"

# 指定输出文件
bash scripts/send_voice.sh -t "你好" -o /tmp/voice.opus

# 从文件读取文字
bash scripts/send_voice.sh -f message.txt

# 自定义语音参数
bash scripts/send_voice.sh -t "你好" --speed 1.2 --emotion happy

📖 命令参数

bash scripts/send_voice.sh [选项]

选项:
  -t, --text \x3Ctext>       要转换的文字(必需,除非使用 -f)
  -f, --file \x3Cfile>       文字文件路径
  -o, --output \x3Cfile>     输出音频文件路径
  --chat-id \x3Cid>          飞书聊天 ID(覆盖环境变量)
  --app-id \x3Cid>           飞书 App ID(覆盖环境变量)
  --app-secret \x3Csecret>   飞书 App Secret(覆盖环境变量)
  --speed \x3C1.0>           语速(0.5-2.0,默认 1.0)
  --emotion \x3Cneutral>     情感(happy/sad/angry/neutral)
  --no-send              只生成音频,不发送
  -h, --help             显示帮助信息

💡 使用示例

1. 发送早安问候

bash scripts/send_voice.sh -t "主人早上好~ 新的一天开始啦,今天也要加油哦~"

2. 发送天气预报

bash scripts/send_voice.sh -t "主人,今天上海晴天,气温 15 到 25 度,适合出门哦~"

3. 发送睡前故事

bash scripts/send_voice.sh -f story.txt --speed 0.9

4. 批量发送

# 创建消息列表
echo "早安" > messages.txt
echo "午安" >> messages.txt
echo "晚安" >> messages.txt

# 循环发送
while read line; do
  bash scripts/send_voice.sh -t "$line"
done \x3C messages.txt

🔑 获取 Chat ID

# 方法 1:从飞书开放平台查看
# 访问 https://open.feishu.cn/app,查看应用信息

# 方法 2:通过 API 获取
curl -X GET "https://open.feishu.cn/open-apis/im/v1/chats?user_id=ou_xxx&user_id_type=open_id" \
  -H "Authorization: Bearer \x3Ctenant_access_token>"

🎨 高级用法

1. 使用自定义声音

# 使用参考音频克隆声音
bash scripts/send_voice.sh -t "你好" --ref-audio ./my_voice.wav

2. 情感控制

# 快乐的情感
bash scripts/send_voice.sh -t "太棒了!" --emotion happy

# 悲伤的情感
bash scripts/send_voice.sh -t "我很难过..." --emotion sad

3. 定时发送

# 每天早上 8 点发送早安
crontab -e
# 添加:0 8 * * * /path/to/send_voice.sh -t "主人早上好~"

📦 文件结构

feishu-voice-skill/
├── SKILL.md              # 本文件
├── reference.md          # API 参考文档
├── scripts/
│   └── send_voice.sh     # 主脚本
└── examples/
    ├── morning.sh        # 早安示例
    ├── news.sh           # 新闻播报示例
    └── story.sh          # 故事示例

⚠️ 注意事项

  1. 音频格式:必须使用 OPUS 格式,飞书才能识别为语音条
  2. 时长限制:语音消息最长 60 秒
  3. 文件大小:单个文件不超过 20MB
  4. 频率限制:避免短时间内发送大量消息
  5. 权限:确保应用有发送消息的权限

🐛 故障排除

问题 1:发送失败,显示"Invalid request param"

解决:检查 file_type=opus 参数是否正确

问题 2:收到的是 MP3 文件,不是语音条

解决:确保音频是 OPUS 格式,不是 MP3

问题 3:Token 过期

解决:重新获取 tenant_access_token

问题 4:没有权限上传文件

解决:在飞书开放平台添加文件上传权限

📞 支持

💰 授权

  • 个人使用:免费
  • 商业使用:请联系作者获取授权

Made with ❤️ by 司幼 (SiYou)

安全使用建议
This skill appears to do what it says: generate TTS (NoizAI), convert to OPUS with ffmpeg, upload to Feishu, and send an audio message. Before installing or running it: 1) Verify and set the required environment variables (FEISHU_APP_ID, FEISHU_APP_SECRET, FEISHU_CHAT_ID, NOIZ_API_KEY) — the registry metadata omitted these, so don't rely on that summary. 2) Test locally using --no-send to confirm audio generation and conversion without sending messages. 3) Note SKILL.md's suggestion to base64-encode NOIZ_API_KEY but the script does not decode it; provide the key in the format the NoizAI API expects. 4) Ensure the Feishu app has only the necessary permissions (im:message, im:message:send_as_bot, im:resource) and follow least-privilege practices. 5) Review the scripts yourself (they are plain Bash) and run in a controlled environment if the source is untrusted. If you need higher assurance, ask the author for a canonical repository URL and an updated manifest that correctly lists required env vars and any expected header formats.
功能分析
Type: OpenClaw Skill Name: feishu-voice-skill Version: 1.2.0 The skill provides a legitimate utility for sending voice messages to Feishu users using the NoizAI TTS service. The core logic in `scripts/send_voice.sh` uses standard system tools (`curl`, `ffmpeg`, `python3`) to convert text to speech and interact with official API endpoints (open.feishu.cn and api.noiz.ai). The behavior is fully aligned with the stated purpose, and no evidence of malicious intent, data exfiltration, or unauthorized execution was found.
能力评估
Purpose & Capability
The name/description (Feishu voice messages using NoizAI TTS) align with the code and scripts, which call NoizAI, run ffmpeg, upload to Feishu, and send audio messages. However, registry metadata presented earlier incorrectly listed "Required env vars: none" while the script and clawhub.yaml clearly require FEISHU_APP_ID, FEISHU_APP_SECRET, FEISHU_CHAT_ID and NOIZ_API_KEY — an inconsistency in packaging/manifest.
Instruction Scope
SKILL.md and scripts instruct only to generate TTS, convert to OPUS, upload to Feishu, and send. The runtime script reads only provided text/files, uses mktemp for temporary files, and calls known endpoints (api.noiz.ai and open.feishu.cn). It does not attempt to read unrelated system files or extra environment variables. Note: SKILL.md suggests the NoizAI key should be base64-encoded, but the script uses NOIZ_API_KEY directly (no decoding) — a mismatch that affects function but not a secret-exfiltration behavior.
Install Mechanism
No install spec is provided (instruction-only plus included scripts). That is low-risk; the skill will run local shell scripts and expects ffmpeg, python3, curl to be present. Nothing is downloaded from untrusted URLs at install time.
Credentials
The script legitimately requires Feishu credentials (app id/secret/chat id) and a NoizAI API key to perform its function. That level of credential access is proportional to sending messages and calling a TTS API. The manifest/registry metadata omission of these required env vars is misleading and should be corrected. Treat FEISHU_APP_SECRET and NOIZ_API_KEY as sensitive secrets.
Persistence & Privilege
The skill does not request permanent/always-on installation and does not modify other skills or system-wide agent settings. It runs only when invoked and cleans up temporary files.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install feishu-voice-skill
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /feishu-voice-skill 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.2.0
v1.2.0 - 添加语音模板功能,预设常用语
v1.0.1
添加付费版本
v1.0.0
- Initial release of Feishu Voice Skill. - Send real voice notes (not file attachments) to Feishu users, playable with one click. - Integrate NoizAI TTS for high-quality, emotion-controllable speech synthesis. - Automatically convert audio to OPUS format for compatibility with Feishu voice messages. - Simple one-command script for sending text as voice; supports parameter customization. - Includes usage instructions, common scenarios, troubleshooting, and examples.
元数据
Slug feishu-voice-skill
版本 1.2.0
许可证
累计安装 4
当前安装数 4
历史版本数 3
常见问题

Feishu Voice Skill 是什么?

让 AI 助手能够给飞书用户发送真正的语音条(点击即播,不是文件附件)。支持 NoizAI TTS 生成语音,自动转换为 OPUS 格式,通过飞书 API 发送语音消息。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 438 次。

如何安装 Feishu Voice Skill?

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

Feishu Voice Skill 是免费的吗?

是的,Feishu Voice Skill 完全免费(开源免费),可自由下载、安装和使用。

Feishu Voice Skill 支持哪些平台?

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

谁开发了 Feishu Voice Skill?

由 Anightmare2(@anightmare2)开发并维护,当前版本 v1.2.0。

💬 留言讨论