← Back to Skills Marketplace
michael-c-matias

feishu-audio-messages

by Michael-C-Matias · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
154
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install feishu-audio-messages
Description
通过飞书Open API发送语音消息,支持文本转语音和上传多格式音频文件,自动转换为opus格式发送。
README (SKILL.md)

feishu-voice - 飞书语音消息发送技能

通过飞书 Open API 发送语音/音频消息。支持文本转语音(TTS)和已有音频文件上传。

快速开始

# 方式1: 文字转语音发送
./send-voice.sh --to \x3Copen_id> --text "床前明月光,疑是地上霜"

# 方式2: 指定语音风格
./send-voice.sh --to \x3Copen_id> --text "通知:会议改到下午3点" --voice zh-CN-YunxiNeural

# 方式3: 发送已有音频文件
./send-voice.sh --to \x3Copen_id> --file /path/to/audio.opus

参数说明

参数 必填 默认值 说明
--to - 接收者 open_id(以 ou_ 开头)
--text 条件必填 - 要转为语音的文字(与 --file 二选一)
--file 条件必填 - 已有音频文件路径(支持 mp3/wav 等,会自动转 opus)
--voice zh-CN-XiaoxiaoNeural TTS 语音名称
--rate +0% 语速调整(如 +10% 加速,-10% 减速)
--volume +0% 音量调整(如 +0%、+10%)

常用语音列表

语音ID 性别/风格 适用场景
zh-CN-XiaoxiaoNeural 女声/活泼 通用、通知
zh-CN-YunxiNeural 男声/沉稳 正式、商务
zh-CN-XiaoyiNeural 女声/温柔 客服、关怀

完整列表:edge-tts --list-voices | grep zh-CN

工作流程

┌─────────────┐    ┌─────────────┐    ┌─────────────┐
│ 文字/文件    │───→│  TTS/转码   │───→│  opus文件   │
│ 输入        │    │(edge-tts/  │    │             │
│             │    │ ffmpeg)     │    │             │
└─────────────┘    └─────────────┘    └──────┬──────┘
                                             │
┌─────────────┐    ┌─────────────┐    ┌──────▼──────┐
│  发送成功    │←───│ 消息发送    │←───│  上传文件    │
│  通知       │    │(audio类型)   │    │  获取file_key│
└─────────────┘    └─────────────┘    └─────────────┘

依赖环境

  • edge-tts - 微软 Edge TTS(语音合成)
  • ffmpeg - 音频格式转换(转为opus)
  • curl - HTTP 请求
  • jq (可选) - JSON解析(比grep更可靠)

安装依赖

# edge-tts
pip install edge-tts

# ffmpeg (Ubuntu/Debian)
sudo apt-get install ffmpeg

# ffmpeg (macOS with Homebrew)
brew install ffmpeg

# jq (可选,用于更可靠的JSON解析)
sudo apt-get install jq  # or brew install jq

配置说明

脚本会按以下顺序查找飞书凭据:

  1. 环境变量:FEISHU_APP_ID, FEISHU_APP_SECRET
  2. 配置文件:~/.openclaw/.env
  3. 配置文件:~/.openclaw/openclaw.json

.env 格式

FEISHU_APP_ID=cli_xxxxxxxx
FEISHU_APP_SECRET=xxxxxxxx

常见问题

Q: 发送失败,提示 receive_id 无效?

A: 确保使用的是 open_id(以 ou_ 开头),而非 user_id。飞书发送消息 API 需要使用 open_id 并在 URL 中指定 receive_id_type=open_id

Q: 没有声音/音频文件为空?

A: 检查 ffmpeg 转换是否正常完成:

ffmpeg -i input.mp3 -c:a libopus -b:a 128k output.opus

Q: edge-tts 安装失败?

A: 如果系统 Python 是 externally-managed (PEP 668),使用虚拟环境:

python3 -m venv ~/.venv/edge-tts
source ~/.venv/edge-tts/bin/activate
pip install edge-tts

Q: 如何获取用户的 open_id?

A: 通过飞书开放平台 API 查询,或使用事件订阅接收用户互动事件获取。

文件说明

send-voice.sh      主脚本
SKILL.md           本文件
.env.example       环境变量模板

开源协议

MIT License - 自由使用,风险自负。


提示:本技能仅供学习和技术交流,使用时请遵守飞书开放平台相关协议和规定。

Usage Guidance
This script appears to do what it says (TTS -> convert -> upload -> send to Feishu), but the package metadata omitted the fact it requires Feishu credentials. Before installing or running: 1) Review the script (already included) and confirm you trust its Feishu API calls to open.feishu.cn. 2) Provide FEISHU_APP_ID and FEISHU_APP_SECRET via environment variables rather than dropping them into shared config files, or verify ~/.openclaw/.env and ~/.openclaw/openclaw.json contain only intended values. 3) Run edge-tts inside a virtualenv and ensure ffmpeg is from a trusted package manager. 4) Because the manifest didn't declare required secrets, be cautious about automated installs or agents that auto-provide credentials — prefer manual invocation. 5) If you need higher assurance, ask the publisher for a signed source or publish origin (homepage) and an explicit manifest that lists required env vars and permissions.
Capability Analysis
Type: OpenClaw Skill Name: feishu-audio-messages Version: 1.0.0 The skill is a legitimate utility for sending Feishu voice messages via the Feishu Open API, supporting both text-to-speech (using edge-tts) and direct file uploads. It follows standard OpenClaw patterns for credential management, looking for Feishu App IDs and Secrets in environment variables or local configuration files (~/.openclaw/.env). The shell script (send-voice.sh) uses official Feishu API endpoints and standard tools like ffmpeg and curl without any evidence of malicious intent, data exfiltration, or obfuscation.
Capability Assessment
Purpose & Capability
The script's functionality (TTS -> convert -> upload -> send via Feishu Open API) matches the skill name and description. The Feishu APP ID/SECRET it uses are appropriate for this purpose. However, the registry metadata declares no required environment variables or primary credential even though the script requires FEISHU_APP_ID and FEISHU_APP_SECRET (or equivalent entries in ~/.openclaw/.env or ~/.openclaw/openclaw.json). This omission is an inconsistency in the manifest.
Instruction Scope
SKILL.md and send-voice.sh limit actions to generating/transforming audio, reading credentials (env or two ~/.openclaw paths), calling local tools (edge-tts, ffmpeg, curl, optional jq), and POSTing to open.feishu.cn endpoints. The script does not attempt to read unrelated system files, network endpoints beyond Feishu, or exfiltrate data to other hosts.
Install Mechanism
No install spec (instruction-only + an included script). Dependencies are local binaries and a pip package (edge-tts). There are no downloads or archive extraction steps in the skill itself. Risk level is low for install mechanism.
Credentials
The script legitimately needs FEISHU_APP_ID and FEISHU_APP_SECRET to call Feishu APIs and looks for them in environment variables or in ~/.openclaw/.env and ~/.openclaw/openclaw.json. The skill registry, however, declares no required env/primary credential. Requiring secrets but not declaring them in metadata is a meaningful discrepancy and could lead to surprise credential access (the script will read dotfiles in the user's home).
Persistence & Privilege
always:false (no forced persistent presence). The skill does not modify other skills, does not attempt to persist its own credentials beyond reading them, and only creates temporary files under /tmp for conversion — behavior is proportional to its purpose.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install feishu-audio-messages
  3. After installation, invoke the skill by name or use /feishu-audio-messages
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
**feishu-voice 1.0.0** - 重构说明文档,简化为更实用的快速指南和参数表,突出一键发送用法。 - 新增 `.env.example` 环境变量模板,便于快速配置。 - 新增 `send-voice.sh` 脚本,整合文字转语音与音频文件发送流程。 - 移除旧版 `README.md`、`package.json` 及冗余脚本,优化结构。 - 跳转 TTS 依赖至 `edge-tts`,明确依赖环境及安装指令。
Metadata
Slug feishu-audio-messages
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is feishu-audio-messages?

通过飞书Open API发送语音消息,支持文本转语音和上传多格式音频文件,自动转换为opus格式发送。 It is an AI Agent Skill for Claude Code / OpenClaw, with 154 downloads so far.

How do I install feishu-audio-messages?

Run "/install feishu-audio-messages" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is feishu-audio-messages free?

Yes, feishu-audio-messages is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does feishu-audio-messages support?

feishu-audio-messages is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created feishu-audio-messages?

It is built and maintained by Michael-C-Matias (@michael-c-matias); the current version is v1.0.0.

💬 Comments