feishu-voice-send

飞书语音消息发送:使用官方 API 上传 OPUS 音频并发送语音消息,解决 OpenClaw 内置发送缺少 duration 参数的问题。| Send voice messages via Feishu official API, fixing OpenClaw's missing duration parameter bug.

3,891 stars

Best use case

feishu-voice-send is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

飞书语音消息发送:使用官方 API 上传 OPUS 音频并发送语音消息,解决 OpenClaw 内置发送缺少 duration 参数的问题。| Send voice messages via Feishu official API, fixing OpenClaw's missing duration parameter bug.

Teams using feishu-voice-send should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/feishu-voice-api-sender/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/54meteor/feishu-voice-api-sender/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/feishu-voice-api-sender/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How feishu-voice-send Compares

Feature / Agentfeishu-voice-sendStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

飞书语音消息发送:使用官方 API 上传 OPUS 音频并发送语音消息,解决 OpenClaw 内置发送缺少 duration 参数的问题。| Send voice messages via Feishu official API, fixing OpenClaw's missing duration parameter bug.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Feishu Voice Send Skill

## 功能

通过飞书官方 API 发送语音消息,解决 OpenClaw 内置发送缺少 `duration` 参数的问题。

## 核心问题

OpenClaw 内置的飞书媒体发送存在 bug:
- `uploadFileFeishu` 缺少 `duration` 参数
- `sendFileFeishu` 发送 audio 消息时 content 缺少 `duration`

飞书官方 API 要求:
- 上传 opus 文件时必须提供 `duration`(毫秒)
- 发送 audio 消息时 content 必须包含 `file_key` 和 `duration`

本 skill 直接调用飞书官方 API,绕过 OpenClaw 内置函数的 bug。

## 使用方式

### 方式一:发送现有音频文件

```bash
python3 /mnt/d/wslspace/workspace/skills/feishu-voice-send/scripts/send_voice.py <音频文件路径> <接收者open_id>
```

### 方式二:直接生成 TTS 并发送

```bash
python3 /mnt/d/wslspace/workspace/skills/feishu-voice-send/scripts/tts_and_send.py "要转换的文字" <接收者open_id>
```

## 核心脚本

### send_voice.py

直接发送现有的 .ogg 音频文件:

```bash
python3 scripts/send_voice.py <ogg文件路径> <open_id>
```

### tts_and_send.py

1. 用 edge-tts 生成 TTS(mp3)
2. 用 ffmpeg 转换为标准 Ogg Opus
3. 自动获取 duration
4. 调用官方 API 发送语音消息

```bash
python3 scripts/tts_and_send.py "文字内容" <open_id> [-v voice] [-r rate]
```

参数:
- `文字内容`(必须):要转换的文字
- `open_id`(必须):接收者飞书 open_id
- `-v voice`:TTS 音色,默认 zh-CN-YunjianNeural
- `-r rate`:语速,默认 -10%(即90%速度)

## 示例

### 发送音频文件

```bash
python3 scripts/send_voice.py /path/to/audio.ogg <接收者open_id>
```

### 发送 TTS 语音

```bash
python3 scripts/tts_and_send.py "你好,这是语音测试。" <接收者open_id>
```

### 使用不同音色和语速

```bash
python3 scripts/tts_and_send.py "Hello world" <接收者open_id> -v en-US-EmmaNeural -r 0
```

## 技术说明

### 关键问题

OpenClaw 内置的飞书媒体发送存在 bug:
- `uploadFileFeishu` 缺少 `duration` 参数
- `sendFileFeishu` 发送 audio 消息时 content 缺少 `duration`

飞书官方 API 要求:
- 上传 opus 文件时必须提供 `duration`(毫秒)
- 发送 audio 消息时 content 必须包含 `file_key` 和 `duration`

### 解决方案

直接调用飞书官方 API,不走 OpenClaw 内置函数:

1. 获取 tenant_access_token
2. 上传 opus 文件(带 duration)
3. 发送 audio 类型消息(content 包含 file_key 和 duration)

## 依赖

- Python 3
- requests
- ffprobe(ffmpeg 的一部分)
- edge-tts(通过 uvx 运行)

## 凭证配置

脚本从以下途径获取飞书凭证(优先级从高到低):

### 方式一:环境变量(推荐)

设置环境变量,最灵活:

```bash
# 在终端中设置
export APP_ID="cli_xxxxxxxxxxxxxx"
export APP_SECRET="xxxxxxxxxxxxxxxxxxxxxxxx"

# 或直接运行
APP_ID="cli_xxxxxxxxxxxxxx" APP_SECRET="xxxxxxxx" python3 scripts/send_voice.py ...
```

### 方式二:OpenClaw 配置(自动)

如果脚本在 OpenClaw 环境下运行,会自动从 `~/.openclaw/openclaw.json` 读取 main 账号的凭证。

### 方式三:手动修改脚本

如果以上方式都不适用,可以直接在脚本开头修改:

```python
APP_ID = "cli_xxxxxxxxxxxxxx"
APP_SECRET = "xxxxxxxxxxxxxxxxxxxxxxxx"
```

**注意**:方式三会随 skill 更新丢失,不推荐。

### 获取飞书应用凭证

1. 前往 [飞书开放平台](https://open.feishu.cn/app) 创建应用
2. 获取应用的 `App ID` 和 `App Secret`
3. 配置应用权限(需要 `im:message` 相关权限)
4. 将机器人添加到飞书群或与用户单聊

Related Skills

send-usdc

3891
from openclaw/skills

Send USDC to an Ethereum address or ENS name. Use when you or the user want to send money, pay someone, transfer USDC, tip, donate, or send funds to a wallet address or .eth name. Covers phrases like "send $5 to", "pay 0x...", "transfer to vitalik.eth", "tip someone", "send USDC".

DeFi & Crypto

Invoice Generator

3891
from openclaw/skills

Creates professional invoices in markdown and HTML

Workflow & Productivity

brand-voice-generator

3891
from openclaw/skills

Creates consistent brand voice guidelines and content. Generates copy that matches your brand personality across all channels. Perfect for startups building their identity.

Content & Documentation

SendTradeSignal

3891
from openclaw/skills

A specialized tool for sending quantitative trading signals to the FMZ platform via HTTP API.

Finance & Trading

invoice-ocr

3891
from openclaw/skills

发票 OCR 识别技能。扫描文件夹中的发票文件(PDF/图片),调用阿里云 OCR API 识别发票信息并导出到 Excel 表格。支持 17+ 种发票类型(增值税发票、火车票、出租车票、机票行程单、定额发票、机动车销售发票、过路过桥费发票等)。使用场景:(1) 用户提到"发票识别"、"发票统计"、"发票整理"、"发票汇总" (2) 用户需要批量处理发票 (3) 用户提到阿里云 OCR 识别发票。**重要:首次使用必须先配置阿里云凭证,主动向用户索要 AccessKey ID 和 AccessKey Secret,或引导用户运行 --config 命令自行配置。**

Workflow & Productivity

Bland AI — Voice Calling Skill

3891
from openclaw/skills

Make and manage AI-powered phone calls via the Bland AI API.

Workflow & Productivity

afrexai-invoice-engine

3880
from openclaw/skills

Generate, manage, and track professional invoices with payment terms, recurring billing, overdue automation, and financial reporting. Use when creating invoices, tracking payments, managing clients, or reviewing revenue.

Workflow & Productivity

email-send

3891
from openclaw/skills

基于 Nodemailer 的邮件发送技能。使用 nodemailer + SMTP 向任意邮箱发送邮件。支持 163、QQ、Gmail 等主流 SMTP 服务。当用户请求发送邮件时触发。

feishu-bitable-sync

3891
from openclaw/skills

Sync a local `wechat-report` result into Feishu Bitable after the user has reviewed the report and confirmed the sync.

voice-clone

3891
from openclaw/skills

声音复刻技能,使用 AI Artist API 进行音色克隆和语音合成。支持查询已有音色、上传音频创建新音色、使用指定音色合成语音。 ⚠️ 使用前必须设置环境变量 AI_ARTIST_TOKEN 为你的 API Key! 获取 API Key:访问 https://staging.kocgo.vip/index 注册登录后创建。 触发场景: - 用户要求生成语音,如"用蔡总的音色说..."、"生成一段语音"、"语音合成"等。 - 用户要求克隆音色,如"上传音频创建音色"、"复刻这个声音"、"创建我的音色"等。 - 用户查询已有音色,如"有哪些音色"、"列出音色"、"查看音色列表"等。 - 用户指定音色名称或 ID 进行语音合成。 - 用户发送语音消息后要求用该声音合成其他内容。

wechat-file-sender

3891
from openclaw/skills

Send files via Windows WeChat client using RPA automation. No external dependencies — pure PowerShell + Windows Automation API.

feishu-group-company

3891
from openclaw/skills

Configure a Feishu multi-bot company group so one coordinator bot, for example `company-ceo`, handles normal group messages, while specialist bots reply only when explicitly @mentioned. Use when setting up or fixing a shared company/work group with multiple Feishu bot accounts, especially for patterns like: normal messages then CEO replies; at UI then UI replies; at dev then dev replies; and CEO stays silent when another bot is explicitly mentioned.