Install
openclaw skills install byted-las-asr-proASR / STT / speech recognition / voice recognition engine powered by Volcengine LAS. Transcribes and converts speech to text from audio and video files — extracts spoken words and generates text transcription from any recording. Supports dictation, subtitle and caption generation. Handles meeting recordings, meeting notes, meeting minutes, meeting summary, interview transcription, podcast transcription, lecture transcription, customer service call center audio, phone call recording, and recorded audio files. Features speaker diarization and speaker identification (detect who said what), emotion recognition, sentiment detection, gender recognition, and multilingual multi-language auto-detection. Accepts wav, mp3, m4a formats with async submit-poll workflow and batch processing for large-scale transcription jobs. Use this skill when the user wants to transcribe audio or video to text (ASR/speech-to-text), generate subtitles or captions from recordings, do speaker diarization or emotion analysis on meeting/interview/podcast/lecture recordings, or extract spoken content from any audio/video media file.
openclaw skills install byted-las-asr-prolas_asr_pro)支持将音频/视频转写为文字,可选说话人分离、情绪/性别识别、多语种自动识别。
本 skill 主要采用:
lasutil CLI 调用las_asr_prosubmit → poll)LAS_API_KEY (必填)详细参数与接口定义见 references/api.md。
audio.format 必须是容器格式(wav/mp3/m4a),非编码格式。不确定时用 ffprobe 确认。env.sh 并写入 export LAS_API_KEY="...",SDK 会自动读取。复制此清单并跟踪进度:
执行进度:
- [ ] Step 0: 前置检查
- [ ] Step 1: 初始化与准备
- [ ] Step 2: 预估价格
- [ ] Step 3: 提交任务
- [ ] Step 4: 异步查询
- [ ] Step 5: 结果呈现
在接受用户的任务后,不要立即开始执行,必须首先进行以下环境检查:
LAS_API_KEY 与 LAS_REGION:确认环境变量或 .env 中是否已配置。
LAS_REGION 常见为 cn-beijing)。LAS_REGION 必须与您的 API Key 及 TOS Bucket 所在的地域完全一致。如果用户中途切换了 Region,必须提醒用户其 TOS Bucket 也需对应更换,否则会导致权限异常或上传失败。LAS_API_KEY,无需额外 TOS 凭证)。VOLCENGINE_ACCESS_KEY 和 VOLCENGINE_SECRET_KEY。对于仅需要上传输入文件的场景,TOS 凭证不再必须。环境初始化(Agent 必做):
# 执行统一的环境初始化与更新脚本(会自动创建/激活虚拟环境,并检查更新)
source "$(dirname "$0")/scripts/env_init.sh" las_asr_pro
workdir=$LAS_WORKDIR
如果网络问题导致更新失败,脚本会跳过检查,使用本地已安装的 SDK 继续执行。
# 提前检查容器格式(避免参数错误)
./scripts/check_format.sh <local_path>
# 本地使用 ffprobe 获取时长(无需上传即可预估价格)
ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:noprint_section=1 <local_path>
计算预估价格并等待用户确认后,再执行上传:
# 用户确认后,上传到 TOS
lasutil file-upload <local_path>
上传成功后返回 JSON,取其中的 presigned_url(HTTPS 预签名下载链接,24 小时有效)传给算子作为输入 URL。# 使用 ffprobe 本地获取
duration_sec=$(ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:noprint_section=1 <local_path>)
如果 ffprobe 失败,再使用 lasutil 远程获取:
lasutil media-duration <presigned_url>
构造基础 data.json(仅需必填项,其他按需添加):
{
"audio": {"url": "<presigned_url>", "format": "wav"},
"request": {"model_name": "bigmodel"}
}
data=$(cat "$workdir/data.json")
lasutil submit las_asr_pro "$data" > "$workdir/submit.json"
记录返回的 metadata.task_id。
⚠️ 异步任务与后台轮询约束:
sleep 循环会导致超时崩溃:绝对禁止在代码中执行死循环等待! 此时必须立即向用户输出 Task ID 并结束当前轮次,告知用户:"任务已提交,请稍后向我询问进度"。使用优化的后台轮询脚本(动态间隔 + 自动提取结果):
mkdir -p "./output/{task_id}"
./scripts/poll_background.sh {task_id} "./output/{task_id}" & disown
脚本特性:
transcript.txt / utterances.json / utterances.csvpoll.log手动查询示例:
lasutil poll las_asr_pro {task_id} > "./output/{task_id}/result.json"
COMPLETED → 结果已自动提取保存到 ./output/{task_id}/RUNNING/PENDING → 继续等待后台轮询FAILED → 返回错误。处理结果(后台轮询已自动完成提取):
# 自动生成结果展示 markdown(包含必填计费声明)
./scripts/generate_result.md.sh {task_id} "./output/{task_id}" <estimated_price>
生成内容包括:
输出文件结构(已由 poll_background.sh 自动生成):
./output/{task_id}/
├── result.json # 完整 API 响应
├── transcript.txt # 完整识别文本
├── utterances.json # 分句原始数据(若开启)
└── utterances.csv # 分句说话人 CSV(若开启)
上传结果文件(可选):
# 上传文本文件供用户下载
lasutil file-upload "./output/{task_id}/transcript.txt"
lasutil file-upload "./output/{task_id}/utterances.csv"
向用户展示:
执行完成后,Agent 应自检: