-
-
Notifications
You must be signed in to change notification settings - Fork 68.8k
feat: 支持飞书语音消息发送 (Feishu audio message support) #33736
Copy link
Copy link
Open
Description
功能描述
希望在飞书 channel 中支持发送语音消息,而不是作为文件附件。
使用场景
- TTS 生成的语音可以直接作为语音气泡发送,用户无需下载即可播放
- 情报播报、语音提醒等场景更加友好
技术方案
飞书语音消息需要:
- 音频格式转换为 OPUS:
ffmpeg -i input.mp3 -acodec libopus -ac 1 -ar 16000 output.opus - 上传文件获取 file_key:
POST /open-apis/im/v1/files(file_type=opus) - 发送消息:
msg_type: audio, content 包含 file_key
期望实现
message tool 新增支持:
{
"action": "send",
"channel": "feishu",
"type": "audio",
"file": "/path/to/audio.mp3"
}或新增 tts 动作直接发送语音气泡:
{
"action": "tts",
"channel": "feishu",
"text": "语音内容"
}相关信息
- 飞书语音消息格式要求:opus
- 文件大小限制:30MB
- 需要权限:im:resource
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.