Xpersona
A

audio-segmenter

CLAWHUB · Unverified

当用户想要**把长音频切成小段**、**音频切片**、**音频分割**、**把音频分成固定时长片段**、**制作语音数据集**、**准备Karaoke素材**、**翻唱音频切片**时自动触发。 支持单个音频文件或整个文件夹(支持递归),自动用 ffmpeg 把音频按指定秒数切成小片段,完美保留原始文件夹结构,并智能选择输出路径。 常见触发口语: - “帮我把这个音频切成60秒一段” - “把这个长音频分割成小段” - “音频切片,这个文件夹” - “把语音文件切成每段30秒” - “制作数据集,把音频切片” - “Karaoke素材切片” - “翻唱音频分割” - “把MP3切成小段” - Skill: audio-segmenter Owner: wangminrui2022 Summary: 当用户想要**把长音频切成小段**、**音频切片**、**音频分割**、**把音频分成固定时长片段**、**制作语音数据集**、**准备Karaoke素材**、**翻唱音频切片**时自动触发。 支持单个音频文件或整个文件夹(支持递归),自动用 ffmpeg 把音频按指定秒数切成小片段,完美保留原始文件夹结构,并智能选择输出路径。 常见触发口语: - “帮我把这个音频切成60秒一段” - “把这个长音频分割成小段” - “音频切片,这个文件夹” - “把语音文件切成每段30秒” - “制作数据集,把音频切片” - “Karaoke素材切片” - “翻唱音频分割” - “把MP3切成小段” - Tags: latest:1.1.9 Version history: v1.1.9 | 2026-07-03T14:05:51.53

62
Rank
84
Safety
1.1k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.1K downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s17de4avhxep6e2yxdr6snee9h83v08q:audio-segmenter
  1. Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-wangminrui2022-audio-segmenter/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

44,441 characters of source documentation, loaded on request.

Extracted files

4 files captured from the source.

SKILL.md

---
name: Audio-Segmenter
description: |
  当用户想要**把长音频切成小段**、**音频切片**、**音频分割**、**把音频分成固定时长片段**、**制作语音数据集**、**准备Karaoke素材**、**翻唱音频切片**时自动触发。
  
  支持单个音频文件或整个文件夹(支持递归),自动用 ffmpeg 把音频按指定秒数切成小片段,完美保留原始文件夹结构,并智能选择输出路径。
  
  常见触发口语:
  - “帮我把这个音频切成60秒一段”
  - “把这个长音频分割成小段”
  - “音频切片,这个文件夹”
  - “把语音文件切成每段30秒”
  - “制作数据集,把音频切片”
  - “Karaoke素材切片”
  - “翻唱音频分割”
  - “把MP3切成小段”
  - “递归切片整个音频文件夹”
  
  支持格式:mp3、wav、m4a、ogg、flac 等常见音频。
  只处理音频切片相关需求,其他音频处理(如转格式、降噪)不触发。
metadata:
  openclaw:
    requires:
      bins:
        - python
    user-invocable: true
---

# Audio-Segmenter

**功能**:一键把长音频切成固定时长的片段,专为语音训练、素材整理、翻唱/Karaoke 准备、数据集制作设计。完美保持原文件夹结构 + 智能默认输出路径 + 自动处理 ffmpeg。

### 触发时机(Triggers)
- 用户提到“音频切片”“切成小段”“分割音频”“切片”“分段”“每段XX秒”等词,并提供音频文件路径或文件夹。
- 用户说“帮我处理这个长音频”“制作语音数据集”“Karaoke素材准备”等场景。
- 支持单个文件或整个文件夹(可递归)。

### 支持的音频格式
.mp3 / .wav / .m4a / .ogg / .flac / .aac / .wma 等(pydub 支持的所有常见格式)

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

## 参数提取指南
当决定调用此技能时,请从用户上下文中提取以下参数:
1. **`<输入路径>`** (必填): 用户提供的音频文件路径或文件夹路径。
2. **`<切片秒数>`** (选填): 用户指定的每段时长(秒),未提则默认 60。
3. **`<输出目录>`** (选填): 用户指定的输出路径,未指定则使用智能默认。
4. **递归标志** (`-r`): 用户提到“递归”“所有子文件夹”时添加。

### 执行步骤
1. **解析路径**:自动识别用户的输入是单个音频文件还是文件夹。
2. **默认输出**:未指定 -o 时,单文件输出到源目录附近,文件夹则在同级创建带 _sliced_audio 的新文件夹,并保留原始目录结构。
3. **调用命令**:使用以下兼容性命令启动脚本(优先 python3,失败则 python)。脚本会自动创建虚拟环境、检测并安装 ffmpeg。

   ```bash
   (python3 scripts/audio_slicer.py -i "<输入路径>" [-d <切片秒数>] [-o "<输出目录>"] [-r]) || (python scripts/audio_slicer.py -i "<输入路径>" [-d <切片秒数>] [-o "<输出目录>"] [-r])

README.md

# Audio-Segmenter 🎧

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Python](https://img.shields.io/badge/Python-3.8%2B-green.svg)](https://www.python.org/)
[![OpenClaw](https://img.shields.io/badge/OpenClaw-Skill-orange.svg)](https://github.com/wangminrui2022)

**Audio-Segmenter** 是一款专为高效处理音频素材设计的智能切片工具。它支持单文件或海量文件夹的递归切片,能够自动处理复杂的依赖环境,并完美保留原始目录结构。

---

## 🌟 核心特性

* **⚡ 零配置启动**:集成 `env_manager` 与 `ensure_package`,首次运行自动创建虚拟环境并安装依赖,无需手动执行 `pip install`。
* **📦 自动 FFmpeg**:内置静默下载机制,自动匹配系统架构下载便携版 FFmpeg,彻底解决“找不到 ffmpeg”的环境痛点。
* **📂 结构化输出**:在递归模式下处理文件夹时,会自动在目标目录 **1:1 复刻** 源目录层级。
* **🛠️ 智能路径逻辑**:
    * **单文件模式**:默认输出至原文件所在目录。
    * **文件夹模式**:自动创建 `[原名]_sliced_audio` 文件夹进行汇总,确保目录整洁。

## 🚀 执行步骤

1. **环境准备**:确保系统安装了 Python 3.12+。
2. **解析目录**:识别用户的源路径(支持单个音频文件或整个文件夹)。
3. **调用命令**:使用以下兼容性命令启动脚本。脚本会自动执行环境检查、依赖安装并完成切片。

### **在 OpenClaw 聊天中**

你可以直接对你的 Agent 说:

1. **基础触发**:

    1、帮我把这个音频切成小段:F:\命理学-音频\猴哥说易\月支月令如何看一个人事业!.mp3

    2、音频切片,这个文件夹 F:\命理学-音频-干声,每段每段15秒,输出到 F:\命理学-音频-干声-切片

    3、把语音文件分割成每段60秒

    Karaoke素材切片

1. **参数指定**: 

    1、把这个音频切成30秒一段:F:\命理学-音频\猴哥说易\月支月令如何看一个人事业!.mp3 输出到 F:\命理学-音频-切片

    2、递归切片整个文件夹 F:\命理学-音频 -d 45

    3、音频分割 -i F:\命理学-音频\猴哥说易\月支月令如何看一个人事业!.mp3 -d 90

1. **口语化/场景**:

    1、帮我制作语音数据集,把这些音频都切片

    2、翻唱音频准备,把长文件分成小段

    3、把这个播客切成短片段

1. **边界测试(负向)**:

    1、帮我转格式这个音频 → 不应触发

    2、音频降噪 → 不应触发

    3、没有路径就直接切片 → 应该询问路径

1. **强制触发**:

    /Audio-Segmenter -i "F:\命理学-音频\猴哥说易\月支月令如何看一个人事业!.mp3" -d 60


## 📘 参数指南

| 参数简写 | 完整参数     | 是否必填 | 类型   | 默认值 | 说明 |
|----------|--------------|----------|--------|--------|------|
| `-i`     | `--input`    | 是       | String | 无     | 输入文件或文件夹的绝对/相对路径 |
| `-d`     | `--duration` | 否       | Int    | 60     | 每个切片的时长(单位:秒) |
| `-o`     | `--output`   | 否       | String | None   | 输出根目录,不填则根据输入方式自动生成 |
| `-r`     | `--recursive`| 否       | Flag   | 无     | 是否递归处理子目录 |

```bash
# 通用调用命令(优先使用 python3)
(python3 ./scripts/audio_slicer.py -i "<输入路径>" [-d <时长>] [-o "<输出目录>"] [-r]) || (python ./scripts/audio_slicer.py -i "<输入路径>" [-d <时长>] [-o "<输出目录>"] [-r])

_meta.json

{
  "ownerId": "kn77473086ppakmtqf0e4myp8981mhjd",
  "slug": "audio-segmenter",
  "version": "1.1.9",
  "publishedAt": 1783087551531
}

skill-card.md

## Description:

Audio-Segmenter helps agents split a single audio file or a folder of audio files into fixed-duration segments while preserving the source folder structure and choosing default output paths.

This skill is ready for commercial/non-commercial use.

## Publisher:

[wangminrui2022](https://clawhub.ai/user/wangminrui2022)

### License/Terms of Use:

MIT-0

## Use Case:

External users and developers use this skill to prepare speech datasets, karaoke material, cover-song assets, podcasts, or other long audio by slicing inputs into smaller fixed-duration files. The skill supports a required input path plus optional duration, output directory, and recursive folder processing.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: The skill automatically installs Python packages and downloads FFmpeg, which can change the user's Python environment.

Mitigation: Review before installing, run in an isolated sandbox or disposable virtual environment, and require pinned dependencies plus verified FFmpeg binaries before using it on sensitive systems.

## Reference(s):

- [ClawHub skill page](https://clawhub.ai/wangminrui2022/skills/audio-segmenter)
- [Python documentation](https://www.python.org/)

## Skill Output:

**Output Type(s):** [Text, Markdown, Shell commands, Files, Configuration guidance]

**Output Format:** [Markdown guidance with inline shell commands; generated audio segment files are written to the selected output directory.]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Requires Python. The artifact may create or update a virtual environment and download FFmpeg before processing audio.]

## Skill Version(s):

1.1.9 (source: server release metadata)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

Sponsored

Ads related to audio-segmenter and adjacent AI workflows.