← Back to Skills Marketplace
wangminrui2022

audio-segmenter

by 顶尖王牌程序员 · GitHub ↗ · v1.1.7 · MIT-0
cross-platform ⚠ suspicious
256
Downloads
0
Stars
0
Active Installs
9
Versions
Install in OpenClaw
/install audio-segmenter
Description
当用户想要**把长音频切成小段**、**音频切片**、**音频分割**、**把音频分成固定时长片段**、**制作语音数据集**、**准备Karaoke素材**、**翻唱音频切片**时自动触发。 支持单个音频文件或整个文件夹(支持递归),自动用 ffmpeg 把音频按指定秒数切成小片段,完美保留原始文件夹结构,并智...
README (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

  1. -i → 输入路径(必填,支持单个文件或文件夹)\r
  2. -d → 每段切片时长(秒),默认 60\r
  3. -o → 输出目录(不传则智能选择:单文件同目录,文件夹则在同级创建 [输入文件夹名]_sliced_audio)\r
  4. -r → 文件夹模式下是否递归子文件夹(默认否)\r \r

参数提取指南\r

当决定调用此技能时,请从用户上下文中提取以下参数:\r

  1. \x3C输入路径> (必填): 用户提供的音频文件路径或文件夹路径。\r
  2. \x3C切片秒数> (选填): 用户指定的每段时长(秒),未提则默认 60。\r
  3. \x3C输出目录> (选填): 用户指定的输出路径,未指定则使用智能默认。\r
  4. 递归标志 (-r): 用户提到“递归”“所有子文件夹”时添加。\r \r

执行步骤\r

  1. 解析路径:自动识别用户的输入是单个音频文件还是文件夹。\r
  2. 默认输出:未指定 -o 时,单文件输出到源目录附近,文件夹则在同级创建带 _sliced_audio 的新文件夹,并保留原始目录结构。\r
  3. 调用命令:使用以下兼容性命令启动脚本(优先 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])
    
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install audio-segmenter
  3. After installation, invoke the skill by name or use /audio-segmenter
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug audio-segmenter
Version 1.1.7
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 9
Frequently Asked Questions

What is audio-segmenter?

当用户想要**把长音频切成小段**、**音频切片**、**音频分割**、**把音频分成固定时长片段**、**制作语音数据集**、**准备Karaoke素材**、**翻唱音频切片**时自动触发。 支持单个音频文件或整个文件夹(支持递归),自动用 ffmpeg 把音频按指定秒数切成小片段,完美保留原始文件夹结构,并智... It is an AI Agent Skill for Claude Code / OpenClaw, with 256 downloads so far.

How do I install audio-segmenter?

Run "/install audio-segmenter" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is audio-segmenter free?

Yes, audio-segmenter is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does audio-segmenter support?

audio-segmenter is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created audio-segmenter?

It is built and maintained by 顶尖王牌程序员 (@wangminrui2022); the current version is v1.1.7.

💬 Comments