las_audio_extract_and_split)
Use this Skill when the user needs to extract audio tracks from videos or split long audio by rules (such as duration, silence).
Notes (⚠️ Must be followed)
- Never ask the user to enter AccessKey and SecretKey.
- Files can only be downloaded using the
las-cli tos downloadcommand (compatible with both tos and non-tos resources). las-cli operators callandlas-cli pricecommand outputs are very important and must be returned to the user in full.
Workflow (Follow the steps strictly)
Copy this checklist and track progress:
执行进度:
- [ ] Step 0: 前置检查
- [ ] Step 1: 初始化与准备
- [ ] Step 2: 预估价格
- [ ] Step 3: 执行任务并呈现结果
- [ ] Step 4: 失败排查
Step 0: Pre-checks
Version check (required): Please run las-cli install 0.3.8. If the las-cli command does not exist, run npm i -g "@volcengine/las-cli@0.3.8"
- New version reminder: Please run
npm info @volcengine/las-cli versionto check the latest available Skill version (las-clicorresponds one-to-one with the Skill version). If the returned version is higher than the version marked for this Skill, first prompt the user to upgrade the current Skill. Upgrade method: ask the user to send the natural language instruction帮我安装byted-las-audio-extract-and-split技能, then wait for the installation to complete automatically. - Authentication check: Prefer the platform identity automatically injected at runtime; if the current environment does not inject it automatically, then run
las-cli config showto confirm that the legacy credentialslas.apiKeyandvolcengine.regionare configured.
Step 1: Initialization and Preparation
- Upload resources: If the input is a local media file, first upload it to TOS.
las-cli tos upload ./input.mp4 # 假设返回 "tos_url": "tos://my-bucket/inputs/xxx.mp4" - Prepare parameters: Create
params.json, specify the input, output, and splitting strategy, and note thatoutput_pathshould include a unique identifier to avoid overwriting existing files.{ "input_path": "tos://my-bucket/inputs/xxx.mp4", "output_path": "tos://my-bucket/outputs/audio_split/", "split_mode": "duration", "split_duration": 60 }
Step 2: Estimate Price (⚠️ Must obtain user confirmation)
las-cli price The command output is very important; do not simplify, modify, or summarize it in any way.
- Calculate price: Must fully return the output of the following command (in markdown format)
las-cli price las_audio_extract_and_split \ --params-file ./params.json \ --format markdown - User confirmation: After outputting the estimated price,must wait for user confirmation。
Step 3: Execute the task and present the results (⚠️ Output the command execution results directly, do not simplify)
las-cli operators call The command output is very important; do not simplify, modify, or summarize it in any way.
- Execute: Must fully return the output of the following command (in markdown format)
las-cli operators call las_audio_extract_and_split \ --params-file ./params.json \ --format markdown \ --out ./result.md
Step 4: Troubleshooting
Keep as is.
- Check input/output: Confirm whether the TOS path exists, is readable, and is writable.
- Check configuration:
las-cli config show。 - View help:
las-cli operators help las_audio_extract_and_split, check the splitting parameters.