Token导航 LogoToken导航TokenDH.com
开发需要联网clawhub未标认证来源可访问clear审计提醒

audio-speaker-tools音频扬声器工具

Agent Skill

用于辅助音频、音乐、语音转写、语音合成或声音素材处理。它适合让 Agent 生成配乐说明、整理音频流程、调用语音工具或处理播客和视频配音素材。使用时需要确认输入音频来源、输出格式、时长和模型限制;涉及人声克隆、版权音乐或公开发布时,应先核对授权和合规边界。

总安装

10,869

周安装

444

GitHub Stars

公开资料未说明

下载量

3,516
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:audio-speaker-tools(音频扬声器工具)
来源仓库:https://github.com/cmfinlan/audio-speaker-tools
安装命令:
openclaw skills install audio-speaker-tools
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install audio-speaker-tools

简介

多说话人分离与语音比对的专业音频分析工具集。

  • 支持语音克隆验证、声纹识别及混合音频分离处理。
  • 包含特征提取和相似度计算模块,适合安全认证场景。
  • 需确保训练数据多样性,避免单一说话人导致的模型偏差。
  • audio-speaker-tools 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

name
audio-speaker-tools
description
Speaker separation, voice comparison, and audio processing tools. Use when working with multi-speaker audio, voice cloning, or speaker verification tasks including: (1) separating speakers from audio files via Demucs and pyannote diarization, (2) comparing voice samples for speaker verification or voice clone quality assessment using Resemblyzer, (3) extracting audio segments, (4) preparing samples for ElevenLabs voice cloning, or (5) validating speaker diarization results.

Audio Speaker Tools

Tools for speaker separation, voice comparison, and audio processing using Demucs, pyannote, and Resemblyzer.

Overview

This skill provides three main workflows:

  1. Speaker separation - Extract per-speaker audio from multi-speaker recordings
  2. Voice comparison - Measure speaker similarity between two audio files
  3. Audio processing - Segment extraction and voice isolation

Prerequisites

Setup Virtual Environment

Run once to create the venv and install dependencies:

bash scripts/setup_venv.sh

Default venv location: ./.venv

Requirements:

  • Python 3.9+
  • ffmpeg (brew install ffmpeg)
  • HuggingFace token (set as env var HF_TOKEN)

Scripts

1. Speaker Separation: diarize_and_slice_mps.py

Separate speakers from multi-speaker audio:

# Basic usage
HF_TOKEN=<your-hf-token> \
  /path/to/venv/bin/python scripts/diarize_and_slice_mps.py \
  --input audio.mp3 \
  --outdir /path/to/output \
  --prefix MyShow

# With speaker constraints
HF_TOKEN=$TOKEN python scripts/diarize_and_slice_mps.py \
  --input audio.mp3 \
  --outdir ./out \
  --min-speakers 2 \
  --max-speakers 5 \
  --pad-ms 100

Process:

  1. Converts input to 16kHz mono WAV
  2. Runs Demucs vocal/background separation (optional, for cleaner input)
  3. Runs pyannote speaker diarization (MPS-accelerated)
  4. Extracts concatenated per-speaker WAV files

Output:

  • <prefix>_speaker1.wav, <prefix>_speaker2.wav, etc. (one per detected speaker)
  • diarization.rttm (time-stamped speaker segments)
  • segments.jsonl (JSON segments metadata)
  • meta.json (pipeline info and speaker index)

Important:

  • Always pass HF token via HF_TOKEN env var, never as CLI arg
  • MPS first, CPU fallback - Script prefers Metal GPU, falls back to CPU if unavailable
  • Default output: ./separated/

2. Voice Comparison: compare_voices.py

Measure similarity between two voice samples using Resemblyzer:

# Basic comparison
python scripts/compare_voices.py \
  --audio1 sample1.wav \
  --audio2 sample2.wav

# JSON output
python scripts/compare_voices.py \
  --audio1 reference.wav \
  --audio2 clone.wav \
  --threshold 0.85 \
  --json

# Exit code = 0 if pass, 1 if fail

Scores:

  • < 0.75 = Different speakers
  • 0.75-0.84 = Likely same speaker
  • 0.85+ = Excellent match (ideal for voice cloning validation)

Use cases:

  • Voice clone quality assessment (compare clone vs. original)
  • Speaker verification (authenticate speaker identity)
  • Validate speaker separation (confirm separated speakers are distinct)

See: references/scoring-guide.md for detailed interpretation

3. Audio Trimming

Use ffmpeg directly for segment extraction:

# Extract 10-second segment starting at 5 seconds
ffmpeg -i input.mp3 -ss 5 -t 10 -c copy output.mp3

# Extract vocals only with Demucs (before diarization)
demucs --two-stems vocals --out ./separated input.mp3

Workflows

Workflow 1: Extract Clean Voice Sample for Cloning

Goal: Get a clean, single-speaker sample for ElevenLabs voice cloning

# 1. Separate speakers
HF_TOKEN=<your-hf-token> python scripts/diarize_and_slice_mps.py \
  --input podcast.mp3 --outdir ./out --prefix Podcast

# 2. Review speaker files (out/Podcast_speaker1.wav, etc.)

# 3. Select best sample (5-30s, clean speech)
ffmpeg -i out/Podcast_speaker2.wav -ss 10 -t 20 -c copy sample.wav

# 4. Upload to ElevenLabs as instant voice clone

See: references/elevenlabs-cloning.md for best practices

Workflow 2: Validate Voice Clone Quality

Goal: Measure how well a cloned voice matches the original

# 1. Generate test audio with ElevenLabs clone
# (done via ElevenLabs web UI or API)

# 2. Compare clone vs. reference
python scripts/compare_voices.py \
  --audio1 original_sample.wav \
  --audio2 elevenlabs_clone.wav \
  --threshold 0.85 \
  --json

# 3. Interpret score:
#    0.85+ = excellent, publish-ready
#    0.80-0.84 = acceptable, may need tweaking
#    < 0.80 = poor, try different sample or settings

See: references/scoring-guide.md for troubleshooting low scores

Workflow 3: Multi-Speaker Conversation Analysis

Goal: Separate and identify speakers in a conversation

# 1. Run diarization
HF_TOKEN=$TOKEN python scripts/diarize_and_slice_mps.py \
  --input meeting.mp3 --outdir ./out --prefix Meeting

# 2. Check detected speakers (meta.json)
cat out/meta.json

# 3. Compare speaker pairs to confirm separation
python scripts/compare_voices.py \
  --audio1 out/Meeting_speaker1.wav \
  --audio2 out/Meeting_speaker2.wav

# Expected: < 0.75 if separation worked correctly

Technical Notes

Device Acceleration

  • pyannote diarization: MPS (Metal) by default, CPU fallback
  • Resemblyzer: CPU only (no GPU acceleration)
  • Demucs: MPS by default when available

To force CPU for diarization: --device cpu

Audio Formats

  • Input: Any format supported by ffmpeg (wav, mp3, flac, m4a, etc.)
  • Processing: Internally converted to 16kHz mono WAV for diarization
  • Output: WAV format (44.1kHz stereo preserved from source)

HuggingFace Token

  • Required for: pyannote speaker diarization
  • Access: Must accept gated repo pyannote/speaker-diarization-3.1 on HF
  • Storage: Any secure secrets manager
  • Usage: Always pass via HF_TOKEN env var, never CLI arg

Sample Quality Tips

  • Shorter is better: 5-30s clean samples often score higher than 60+ second samples
  • Clean audio: Remove background noise with Demucs --two-stems vocals
  • Single speaker: Ensure isolated voice, not mixed conversation
  • Good recording: Studio mic > phone mic for voice comparison accuracy

References

  • elevenlabs-cloning.md - Best practices for ElevenLabs instant voice cloning (model settings, sample selection, proven configurations)
  • scoring-guide.md - How to interpret Resemblyzer similarity scores (thresholds, use cases, troubleshooting)

Common Issues

"Missing HF token" error

  • Export token before running: export HF_TOKEN=<your-token>
  • Or pass inline: HF_TOKEN=<your-token> python script.py ...

Low voice comparison scores for same speaker

  • Try shorter, cleaner samples (5-30s)
  • Use Demucs to isolate vocals: demucs --two-stems vocals input.mp3
  • Ensure consistent recording quality (same mic, environment)
  • See references/scoring-guide.md troubleshooting section

Diarization not detecting all speakers

  • Adjust --min-speakers and --max-speakers flags
  • Check audio quality (clear speech, minimal overlap)
  • Try longer audio (30+ seconds) for better speaker modeling

MPS/Metal acceleration not working

  • Ensure PyTorch with MPS support: python -c "import torch; print(torch.backends.mps.is_available())"
  • Fallback to CPU: --device cpu
  • Re-run setup_venv.sh to reinstall PyTorch

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

75.57%
按下载量换算2,657

安全审计

VirusTotal

通过

ClawScan

可疑

Static analysis

未展示

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills