voice-changer
Skill617 starsChanged 3 months agoMITView on GitHub
音频变声处理工具 - 使用 RVC AI 模型进行真实的声音转换,支持视频直接输入
- Installs packages
3 other projects use a version of this.
Adopted by
Most recently taken up by
- RobStrayer/voice-agent-skillstheir own version, first seen Oct 1, 2026
- elevenlabs/skillstheir own version, first seen Sep 30, 2026
- elevenlabs/plugintheir own version, first seen Aug 28, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- elevenlabs/skills★ 472same name
- elevenlabs/plugin★ 1same name
- RobStrayer/voice-agent-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository14 other files it gives its agents.
- audiocut-keywordSkill
- code-roasterSkill
- image-generatorSkill
- quark-mswnlz-publisherSkill
- text-to-speechSkill
- youtube-downloaderSkill
- video-voice-changerSkill
- vps-security-hardeningSkill
- wespy-fetcherSkill
- wlzh-invoice-scannerSkill
- wlzh-youtube-trackerSkill
- x-fetcherSkill
- youtube-publisherSkill
- youtube-to-blog-postSkill
The file
Files
voice-changer Skill
概述
voice-changer 是一个音频/视频变声处理 skill,支持直接处理视频文件或音频文件进行变声处理。
功能特性
- 🎙️ RVC AI 模型 - 真实的音色转换
- 🎬 支持视频输入 - 直接处理 .mp4 等视频文件,自动提取音频、变声、合成回视频
- ⚡ 自动分块处理 - 长音频自动分块,避免内存问题
- 🔧 灵活配置 - 支持多种声音预设和自定义参数
- 🎯 简单易用: 命令行一键调用
- 🔌 可被调用 - 可被其他 skills 集成调用
技术方案
当前实现: RVC 方法(AI 模型)
优点:
- 真实的音色转换(不只是音高调整)
- 音质自然,效果更好
- 可以真正"克隆"声音
- 支持跨语言
原理: 使用 HuBERT 特征提取 + RVC 模型推理:
- HuBERT 提取音频特征
- F0 提取基频
- RVC 模型进行声音转换
- 长音频自动分块处理
适用场景:
- 高质量变声需求
- 需要真实音色转换
- 播客、配音等场景
目录结构
voice-changer/
├── SKILL.md # 本文档
├── README.md # 使用说明
├── scripts/
│ └── voice_change.py # 核心变声脚本
├── config/
│ └── voice_config.json # 声音配置文件
└── models/ # RVC 模型目录
├── rvc_env_310/ # Python 3.10 环境
├── rvc_core/ # RVC 核心代码
└── rvc_models/ # RVC 模型文件依赖要求
必需依赖
- Python 3.10(RVC 兼容性)
- FFmpeg 4.0+
- FFprobe
Python 依赖(已包含在 rvc_env_310/)
- torch==2.5.1
- fairseq==0.12.2
- librosa
- soundfile
- pyworld
- parselmouth
- faiss-cpu
- torchcrepe
- pedalboard
配置说明
voice_config.json 结构
{
"method": "rvc",
"rvc_model_path": "models/rvc_models/trained_models/kohane.pth",
"default_voice": "female_3",
"voices": {
"female_3": {
"name": "女声(甜美)",
"method": "rvc",
"model_path": "...kohane.pth",
"index_path": "...kohane.index",
"f0up_key": -1,
"f0_method": "harvest"
}
}
}参数说明
method: 处理方法(rvc或pedalboard)f0up_key: 音高调整(半音)- 正值: 提高音调(女声效果)
- 负值: 降低音调(男声效果)
- 范围: -12 到 +12
f0_method: F0 提取方法(harvest、crepe、pm等)
使用方法
1. 独立使用
# 基本用法(使用默认女声)
python3 ~/.claude/skills/voice-changer/scripts/voice_change.py input.mp3
# 直接处理视频文件(自动提取音频→变声→合成视频)
python3 ~/.claude/skills/voice-changer/scripts/voice_change.py input.mp4 -o output.mp4
# 指定声音类型
python3 ~/.claude/skills/voice-changer/scripts/voice_change.py input.mp3 -v female_2
# 指定输出文件
python3 ~/.claude/skills/voice-changer/scripts/voice_change.py input.mp3 -o output.mp3
# 自定义音高
python3 ~/.claude/skills/voice-changer/scripts/voice_change.py input.mp3 -p 7
# 查看帮助
python3 ~/.claude/skills/voice-changer/scripts/voice_change.py --help2. 支持的视频格式
- .mp4, .mov, .avi, .mkv, .flv, .wmv, .webm
处理视频时会自动:
- 提取视频中的音频
- 对音频进行变声处理
- 将变声后的音频合成回视频
2. 在其他 Skills 中调用
import subprocess
def change_voice(input_audio, voice_type='female_1'):
"""调用 voice-changer skill"""
script_path = os.path.expanduser(
'~/.claude/skills/voice-changer/scripts/voice_change.py'
)
output_audio = input_audio.replace('.mp3', '_voice_changed.mp3')
cmd = [
'python3', script_path,
input_audio,
'-v', voice_type,
'-o', output_audio
]
result = subprocess.run(cmd, capture_output=True, text=True)
if result.returncode == 0:
return output_audio
else:
print(f"变声失败: {result.stderr}")
return input_audio预设声音列表
| 预设名称 | 音高 | 描述 | 适用场景 |
| female_1 | 0 | 女声(轻柔) | 基础女声 |
| female_2 | +2 | 女声(明亮) | 更高的女声 |
| female_3 | -1 | 女声(甜美)⭐ | 默认,自然女声 |
| child | +8 | 童声 | 儿童效果 |
| rvc_female | +4 | AI 女声(高音高) | 高质量女声 |
| rvc_male | -12 | AI 男声(低音高) | 高质量男声 |
| male_normal | -8 | 男声(正常) | 自然男声 |
| male_deep | -12 | 男声(低沉) | 低沉男声 |
性能指标
RVC 方法(CPU 模式,Apple Silicon M1)
- 短音频 (< 60秒): ~10-30 秒
- 长音频分块处理: ~3-5 分钟(15 分钟音频)
- 超长音频 (875秒): ~15 分钟(32 段处理)
内存占用
- 短音频: < 500MB
- 长音频分块: 自动管理,避免 OOM
集成示例
与 audiocut-keyword 集成
# 先过滤关键字,再变声
python3 ~/.claude/skills/audiocut-keyword/scripts/audiocut_keyword.py input.mp3 --change-voice female_1与 youtube-to-xiaoyuzhou 集成
# YouTube 下载 + 过滤 + 变声 + 发布
python3 ~/.claude/skills/youtube-to-xiaoyuzhou/youtube_to_xiaoyuzhou.py \
https://youtu.be/xxxxx \
--filter-keywords \
--change-voice female_1 \
--schedule "2026-01-20 18:00"注意事项
- 处理时间: RVC 方法处理速度较慢,CPU 模式需要耐心等待
- 长音频: 自动分块处理,超长音频可能需要较长时间
- 文件格式: 支持常见音频格式(MP3, WAV, M4A 等)
- 版权问题: 请确保有权对音频进行处理和使用
- 模型资源: 更多 RVC 模型可参考 260款RVC变声器模型
故障排除
问题 1: FFmpeg 未安装
# macOS
brew install ffmpeg
# Ubuntu/Debian
sudo apt-get install ffmpeg问题 2: 处理速度慢
- CPU 模式处理较慢是正常的
- 如有 GPU 可修改代码使用 CUDA
- 短音频处理较快(~10-30 秒)
问题 3: 内存不足
- 已自动分块处理,长音频不会 OOM
- 如仍有问题,可减小分块大小
问题 4: 音质不佳
- 确保使用高质量输入音频
- 尝试不同的 f0up_key 值
- 考虑下载更多 RVC 模型尝试
未来计划
- 添加更多音效(回声、混响等)
- 支持批量处理
- 添加 GUI 界面
- 支持实时变声
- GPU 加速支持
参考资料
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

