← 返回 Skills 市场
256
总下载
0
收藏
0
当前安装
9
版本数
在 OpenClaw 中安装
/install audio-segmenter
功能描述
当用户想要**把长音频切成小段**、**音频切片**、**音频分割**、**把音频分成固定时长片段**、**制作语音数据集**、**准备Karaoke素材**、**翻唱音频切片**时自动触发。 支持单个音频文件或整个文件夹(支持递归),自动用 ffmpeg 把音频按指定秒数切成小片段,完美保留原始文件夹结构,并智...
使用说明 (SKILL.md)
\r \r
Audio-Segmenter\r
\r 功能:一键把长音频切成固定时长的片段,专为语音训练、素材整理、翻唱/Karaoke 准备、数据集制作设计。完美保持原文件夹结构 + 智能默认输出路径 + 自动处理 ffmpeg。\r \r
触发时机(Triggers)\r
- 用户提到“音频切片”“切成小段”“分割音频”“切片”“分段”“每段XX秒”等词,并提供音频文件路径或文件夹。\r
- 用户说“帮我处理这个长音频”“制作语音数据集”“Karaoke素材准备”等场景。\r
- 支持单个文件或整个文件夹(可递归)。\r \r
支持的音频格式\r
.mp3 / .wav / .m4a / .ogg / .flac / .aac / .wma 等(pydub 支持的所有常见格式)\r \r
参数说明(默认值)\r
- -i → 输入路径(必填,支持单个文件或文件夹)\r
- -d → 每段切片时长(秒),默认 60\r
- -o → 输出目录(不传则智能选择:单文件同目录,文件夹则在同级创建 [输入文件夹名]_sliced_audio)\r
- -r → 文件夹模式下是否递归子文件夹(默认否)\r \r
参数提取指南\r
当决定调用此技能时,请从用户上下文中提取以下参数:\r
\x3C输入路径>(必填): 用户提供的音频文件路径或文件夹路径。\r\x3C切片秒数>(选填): 用户指定的每段时长(秒),未提则默认 60。\r\x3C输出目录>(选填): 用户指定的输出路径,未指定则使用智能默认。\r- 递归标志 (
-r): 用户提到“递归”“所有子文件夹”时添加。\r \r
执行步骤\r
- 解析路径:自动识别用户的输入是单个音频文件还是文件夹。\r
- 默认输出:未指定 -o 时,单文件输出到源目录附近,文件夹则在同级创建带 _sliced_audio 的新文件夹,并保留原始目录结构。\r
- 调用命令:使用以下兼容性命令启动脚本(优先 python3,失败则 python)。脚本会自动创建虚拟环境、检测并安装 ffmpeg。\r
\r
(python3 scripts/audio_slicer.py -i "\x3C输入路径>" [-d \x3C切片秒数>] [-o "\x3C输出目录>"] [-r]) || (python scripts/audio_slicer.py -i "\x3C输入路径>" [-d \x3C切片秒数>] [-o "\x3C输出目录>"] [-r])
安全使用建议
This skill appears to implement legitimate audio-slicing, but it will automatically install packages and modify your Python environment (including forcibly reinstalling setuptools), create a virtual environment in a parent path, download ffmpeg, write logs, and restart itself inside the venv. Before installing or running: 1) Review ensure_package.fix_setuptools_for_legacy_packages and ensure_package.pip to confirm you accept automatic pip operations. 2) Run the tool inside an isolated environment (container or throwaway virtualenv) or as a non-privileged user to avoid affecting system Python/site-packages. 3) If you only want slicing, consider running the code manually after creating and activating a venv yourself (set RUNNING_IN_VENV=true to avoid automatic venv creation), or modify the script to remove the forced setuptools/pip behavior. 4) Do not run as root/Administrator. If you are uncomfortable with on-import pip activity or unexpected filesystem writes, treat this skill as suspicious and do not install it on production/workstation systems.
功能分析
Type: OpenClaw Skill
Name: audio-segmenter
Version: 1.1.7
The Audio-Segmenter skill is a utility designed to split audio files into segments using pydub and ffmpeg. It features a robust environment management system (env_manager.py and ensure_package.py) that automatically creates a virtual environment, installs necessary Python dependencies from PyPI (using the Tsinghua mirror), and downloads a portable version of ffmpeg via the ffmpeg-downloader package. While the setup logic is quite comprehensive for a simple utility, its actions are transparently logged and strictly aligned with the stated purpose of providing a zero-configuration audio processing tool.
能力评估
Purpose & Capability
Name/description match the code: the scripts implement audio slicing, preserve folder structure, and invoke ffmpeg/pydub as described. The heavy dependency and environment management code is broadly related to ensuring ffmpeg/pydub availability, so functionality is coherent — but some of the actions taken (see below) are more invasive than the simple purpose implies.
Instruction Scope
SKILL.md promises automatic venv creation and ffmpeg detection/download; the code does that but also performs additional actions not clearly documented: importing ensure_package triggers immediate pip operations (including forcing setuptools changes) at import time, and the script may restart itself inside a created venv. The code will modify the Python environment and create files/directories beyond the target audio outputs.
Install Mechanism
There is no formal install spec, but the included code performs runtime installs: calling pip (via subprocess) to install packages, and using ffmpeg-downloader to fetch a portable ffmpeg from external hosts (the README mentions gyan.dev, johnvansickle, evermeet). The ensure_package module forces a setuptools reinstall on import — a high-impact operation. Automatic network downloads and pip installs at import/runtime are higher risk than an instruction-only skill.
Credentials
The skill requests no secrets or env vars, but it modifies the host Python environment: ensure_package.fix_setuptools_for_legacy_packages runs pip to reinstall setuptools at import time; ensure_package.pip installs packages into the current interpreter (which may be the system Python) before the code switches to a created venv. The venv path is created outside the skill folder (VENV_DIR points to a parent-level 'venv'), which is unexpected. These operations are disproportionate for a simple slicing task and could affect unrelated projects.
Persistence & Privilege
always:false and no special platform privileges, but the skill creates persistent artifacts: a venv directory, downloaded ffmpeg binaries, log files under SKILL_ROOT/logs, and potentially installed packages in the current environment. It also restarts the process inside the venv, which increases persistent footprint. This is expected for a script that self-manages dependencies but is worth user consent.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install audio-segmenter - 安装完成后,直接呼叫该 Skill 的名称或使用
/audio-segmenter触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.1.7
No user-facing changes in this version.
- No file changes detected from the previous version.
v1.1.6
No changes detected in this version.
- Version 1.1.6 does not introduce any updates or modifications.
v1.1.5
No changes detected in this version.
- Version 1.1.5 contains no file or documentation updates.
v1.1.4
- Expanded and clarified the description with example trigger phrases and usage scenarios.
- Added explicit trigger guidance to ensure the skill only handles audio segmentation use cases.
- Included a parameter extraction section for easier integration and automation.
- Updated metadata to indicate the skill is user-invocable.
- No functional or code changes; documentation and instruction improvements only.
v1.1.3
- Updated command examples in documentation to use scripts/audio_slicer.py as the script path.
- No code changes; documentation only.
v1.1.2
Version 1.1.2 of audio-segmenter
- No file changes detected in this release.
- Behavior, features, and documentation remain consistent with previous version.
v1.1.1
Version 1.1.1 of audio-segmenter
- No file changes were detected in this release.
- Functionality and documentation remain unchanged.
v1.1.0
- 更新描述,强调工具的高效、智能和海量递归处理能力。
- 说明支持自动处理复杂依赖环境。
- 保持所有原有功能和参数说明不变。
v1.0.0
Audio-Segmenter 1.0.0
- Initial release of Audio-Segmenter.
- Split long audio files into fixed-length segments with one command.
- Supports both single audio files and entire folders, keeping original folder structure in output.
- Intelligent default output: single file outputs to its folder; folder mode creates “[input folder name]_sliced_audio”.
- Automatically downloads and handles ffmpeg—no manual installation required.
- Works with multiple audio formats supported by pydub, including .mp3, .wav, .m4a, .ogg, .flac, .aac, and .wma.
元数据
常见问题
audio-segmenter 是什么?
当用户想要**把长音频切成小段**、**音频切片**、**音频分割**、**把音频分成固定时长片段**、**制作语音数据集**、**准备Karaoke素材**、**翻唱音频切片**时自动触发。 支持单个音频文件或整个文件夹(支持递归),自动用 ffmpeg 把音频按指定秒数切成小片段,完美保留原始文件夹结构,并智... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 256 次。
如何安装 audio-segmenter?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install audio-segmenter」即可一键安装,无需额外配置。
audio-segmenter 是免费的吗?
是的,audio-segmenter 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
audio-segmenter 支持哪些平台?
audio-segmenter 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 audio-segmenter?
由 顶尖王牌程序员(@wangminrui2022)开发并维护,当前版本 v1.1.7。
推荐 Skills