algorithmic-art
Generate deterministic SVG algorithmic artwork. Invoke when the user asks for geometric,…
语音转文字(ASR)。使用火山引擎 BigModel ASR 识别语音,包含极速版(≤2h/100MB 同步快速返回)和标准版(≤5h 异步识别)两种模式。支持飞书语音消息、本地音频文件及音频 URL。当收到语音消息或音频附件(.ogg/.mp3/.wav)时使用本技能。
$ npx -y skills add bytedance/agentkit-samples --skill byted-voice-to-text --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/byted-voice-to-textContext preview
The summary Claude sees to decide when to auto-load this skill.
语音转文字(ASR)。使用火山引擎 BigModel ASR 识别语音,包含极速版(≤2h/100MB 同步快速返回)和标准版(≤5h 异步识别)两种模式。支持飞书语音消息、本地音频文件及音频 URL。当收到语音消息或音频附件(.ogg/.mp3/.wav)时使用本技能。
name: byted-voice-to-text
description: 语音转文字(ASR)。使用火山引擎 BigModel ASR 识别语音,包含极速版(≤2h/100MB 同步快速返回)和标准版(≤5h 异步识别)两种模式。支持飞书语音消息、本地音频文件及音频 URL。当收到语音消息或音频附件(.ogg/.mp3/.wav)时使用本技能。
license: Complete terms in LICENSE
metadata: {"openclaw":{"emoji":"🎙️","requires":{"env":["MODEL_SPEECH_API_KEY"]},"os":["darwin","linux"]},"clawdbot":{"emoji":"🎙️","requires":{"env":["MODEL_SPEECH_API_KEY"]},"os":["darwin","linux"]},"moltbot":{"emoji":"🎙️","requires":{"env":["MODEL_SPEECH_API_KEY"]},"os":["darwin","linux"]}}基于[火山引擎 BigModel ASR](https://www.volcengine.com/docs/6561/1354870) 将语音转为文字。准确率和多语言能力远优于本地 whisper,且速度更快。
1. **收到飞书语音消息(`message_type: audio`),需要自动识别语音内容** 2. **用户给音频要转文字**:
2. **缺 ffmpeg / ffprobe**:先执行 `ensure_ffmpeg.py --execute` 3. **用户问安装、开通、手工配置**:按文末 reference map 读取对应文档
**当你收到语音消息或音频文件附件时:**
1. 确认音频来源(本地文件、URL 或飞书语音 file_key)。 2. 运行脚本前先 `cd` 到本技能目录:`skills/byted-voice-to-text`。 3. 执行对应命令(见下方参数说明)。 4. 将脚本输出的文字**当作用户发送的文本消息**,理解其意图并正常回复。不需要额外说明"语音识别结果是xxx",直接回答用户的问题即可。
| 条件 | 脚本 | |------|------| | 时长 ≤ 2h 且 大小 ≤ 100MB | `asr_flash.py --file "<FILE>"` (极速版,同步快速返回) | | 2h < 时长 ≤ 5h | `asr_standard.py --file "<FILE>"` (标准版,异步 submit+poll) | | 时长 > 5h | 不支持,先切片后逐片走极速版 | | 无法获取时长 且 大小 ≤ 100MB | `asr_flash.py --file "<FILE>"` (极速版兜底) | | 无法获取时长 且 大小 > 100MB | `asr_standard.py --file "<FILE>"` (标准版兜底) |
命中 URL、大文件、切片取舍时,再读 [routing_strategy.md](references/routing_strategy.md)。
鉴权采用**新版控制台方案**,详见:[快速入门(新版控制台)](https://www.volcengine.com/docs/6561/2119699)。
| 环境变量 | 用途 | 必需 | |---------|------|------| | `MODEL_SPEECH_API_KEY` | API Key(新版控制台方案) | **是** | | `MODEL_SPEECH_APP_ID` | App ID(旧版鉴权时配合使用) | 否 | | `MODEL_SPEECH_ASR_API_BASE` | 极速版端点(有默认值) | 否 | | `MODEL_SPEECH_ASR_RESOURCE_ID` | 极速版资源 ID(默认 `volc.bigasr.auc_turbo`) | 否 | | `MODEL_SPEECH_ASR_STANDARD_SUBMIT_URL` | 标准版提交端点(有默认值) | 否 | | `MODEL_SPEECH_ASR_STANDARD_QUERY_URL` | 标准版查询端点(有默认值) | 否 | | `MODEL_SPEECH_ASR_STANDARD_RESOURCE_ID` | 标准版资源 ID(默认 `volc.bigasr.auc`) | 否 | | `FEISHU_TENANT_TOKEN` | 飞书 tenant_access_token(仅 `--file-key` 模式) | 否 |
| 脚本 | 用途 | 对应模式 | |------|------|----------| | `scripts/inspect_audio.py` | 音频元信息探测(时长、采样率、声道等) | 预检 | | `scripts/ensure_ffmpeg.py` | 自动检测并安装 ffmpeg/ffprobe | 预检 | | `scripts/asr_flash.py` | 极速版识别(≤2h/100MB,同步) | Express/Flash | | `scripts/asr_standard.py` | 标准版识别(≤5h,异步 submit+poll) | Standard |
# 预检:探测音频元信息 python3 <SKILL_DIR>/scripts/inspect_audio.py "<AUDIO_INPUT>" # 缺 ffmpeg 时自动安装 python3 <SKILL_DIR>/scripts/ensure_ffmpeg.py --execute # 极速版(短音频,≤2h/100MB) python3 <SKILL_DIR>/scripts/asr_flash.py --file "<AUDIO_FILE>" # 标准版(长音频或 URL) python3 <SKILL_DIR>/scripts/asr_standard.py --url "<AUDIO_URL>" python3 <SKILL_DIR>/scripts/asr_standard.py --file "<LONG_AUDIO_FILE>" # 标准版:仅提交不轮询 python3 <SKILL_DIR>/scripts/asr_standard.py --url "<URL>" --no-poll # 标准版:查询已有任务 python3 <SKILL_DIR>/scripts/asr_standard.py --query-task-id <ID> --query-logid <LOGID>
| 参数 | 必填 | 说明 | |------|------|------| | `--file` | 三选一 | 本地音频文件路径 | | `--url` | 三选一 | 音频文件的 URL 地址 | | `--file-key` | 三选一 | 飞书语音消息的 file_key | | `--feishu-token` | 否 | 飞书 tenant_access_token | | `--appid` | 否 | App ID | | `--token` | 否 | API Key | | `--language` | 否 | 语言代码 |
| 参数 | 必填 | 说明 | |------|------|------| | `--url` | 二选一 | 音频文件的 URL 地址 | | `--file` | 二选一 | 本地音频文件路径 | | `--appid` | 否 | App ID | | `--token` | 否 | API Key | | `--language` | 否 | 语言代码 | | `--no-poll` | 否 | 仅提交任务,不轮询结果 | | `--poll-interval` | 否 | 轮询间隔秒数(默认 3) | | `--poll-max-time` | 否 | 最大轮询时间秒数(默认 10800) | | `--query-task-id` | 否 | 查询已有任务 ID | | `--query-logid` | 否 | 查询时传入的 X-Tt-Logid |
收到 audio 消息 → 音频文件已下载到 /root/.openclaw/media/inbound/ → 执行 asr_flash.py --file → 返回文字 → 当作用户消息处理
常用命令:
# 飞书语音文件(最常用,文件已被飞书插件自动下载) python scripts/asr_flash.py --file "/root/.openclaw/media/inbound/xxxxx.ogg"
欢迎来到 AgentKit 代码工坊(Samples)仓库! AgentKit 是火山引擎推出的企业级 AI Agent 开发平台,为开发者提供完整的 Agent 构建、部署和运维解决方案。平台通过标准化的开发工具链和云原生基础设施,显著降低复杂智能体应用的开发部署门槛。 本代码库包含了一系列示例和教程,帮助您理解、实现和集成 AgentKit 的各项功能到您的应用中。
Generate deterministic SVG algorithmic artwork. Invoke when the user asks for geometric,…
Optimize code performance through iterative improvements (max 2 rounds). Benchmark execution…
根据文字描述生成视频,一个生成图片和视频的工作流技能。依赖 skills: byted-web-search, image-generate, video-generate。注意:此…
Manage AgentKit skills, SkillHub/skillhub, skill centers, and skill spaces. Use this skill…
Upload files or directories to TOS-compatible object storage for Volcano Engine or BytePlus…
根据用户的功能需求,完成与 VeADK-Go 相关的功能; 包括:直接根据需求生成 Agent;将Enio Agent转换为VeADK-Go Agent。