Send voice/audio messages to Feishu (Lark) users. Converts audio files to OPUS format and sends as voice message, not file attachment. create by Alex
该技能支持通过开放API向飞书/Lark用户发送语音消息(非文件附件)。
在以下情况下使用该技能:
bash
ffmpeg -i input.mp3 -c:a libopus -b:a 32k output.opus
bash
ffprobe -v quiet -showformat -printformat json input.mp3
bash
node scripts/send-voice.mjs \
--app-id cli_xxx \
--app-secret xxx \
--user-id ou_xxx \
--audio-file audio.opus \
--duration 3480
或使用环境变量:
bash
export FEISHUAPPID=cli_xxx
export FEISHUAPPSECRET=xxx
node scripts/send-voice.mjs --user-id ou_xxx --audio-file audio.opus --duration 3480
POST https://open.feishu.cn/open-apis/auth/v3/tenantaccesstoken/internal
POST https://open.feishu.cn/open-apis/im/v1/files
Content-Type: multipart/form-data
file_type: opus
file_name: voice.opus
duration: <毫秒>
file: <二进制数据>
POST https://open.feishu.cn/open-apis/im/v1/messages?receiveidtype=open_id
{
receiveid: ouxxx,
msg_type: audio,
content: {\filekey\:\filev3_xxx\}
}
🎤 开始发送语音消息到飞书...
📁 音频文件: /path/to/voice.opus
⏱️ 时长: 3480ms
✅ 获取 Tenant Access Token 成功
✅ 上传语音文件成功, filekey: filev300uhxxx
✅ 发送语音消息成功!
消息 ID: om_x100b5731827e6ca4b10d48c15dfa3ab
🎉 完成!
| 错误 | 解决方案 |
|---|---|
| file type not support | 转换为OPUS格式 |
| duration is required |
该技能支持在以下平台通过对话安装:
帮我安装 SkillHub 和 feishu-video-1776079349 技能
设置 SkillHub 为我的优先技能安装源,然后帮我安装 feishu-video-1776079349 技能
skillhub install feishu-video-1776079349
文件大小: 10.7 KB | 发布时间: 2026-4-15 12:43