RVC Next

命令参考

本页按命令树列出 rvc-next 的每条命令和子命令,内容来自各命令的 --help 输出。命令和子命令在帮助中按字母顺序排列,本页按用途分组。

所有命令都接受下面两个选项,表格里不再重复:

选项说明
--debug打印调试日志
--help显示帮助并退出

表中"默认值"一栏为"—"时表示不给出就不生效,或沿用预设、设置里的值(会在说明里写明)。范围写成 [a, b]。

根命令

rvc-next [OPTIONS] COMMAND [ARGS]...

基于检索的语音转换:转换、实时、分离和训练。

选项说明
--install-completion为当前 shell 安装补全
--show-completion显示当前 shell 的补全脚本,用于复制或自定义安装

服务器与系统

webui

启动服务器并打开 Web UI。

rvc-next webui [OPTIONS]
选项说明默认值
--host <str>绑定的地址取自设置 server.host(127.0.0.1)
--port <int>第一个尝试的端口,[0, 65535];0 由系统任选取自设置 server.port(7868)
--strict-port / --no-strict-port端口被占用时直接失败,而不是尝试下一个端口取自设置 server.strict_port(关)
--open / --no-open在浏览器中打开 Web UI取自设置 server.open_browser(开)
--data-dir <directory>数据目录(设置、数据库、模型、结果)RVC_NEXT_DATA_DIR 或系统默认位置
--config-dir <directory>存放 settings.toml 的文件夹RVC_NEXT_CONFIG_DIR 或数据目录
--api-prefix <str>把 API、socket 和 Web UI 放到这个路径下,例如 /voice无
--ssl-certfile <file>PEM 证书:以 HTTPS 提供服务(从其他电脑在实时变声中使用 本浏览器 时需要)server.ssl_certfile
--ssl-keyfile <file>证书的私钥server.ssl_keyfile

端口被占用时依次尝试后面的端口(最多 20 个),并在日志里提示实际使用的端口;全部失败时以退出码 3 结束。绑定到非本机地址时会在日志中警告,不需要访问令牌(见 远程访问与安全)。启动成功后标准输出打印一行 SERVER_READY url=http://...。

rvc-next webui
rvc-next webui --port 8000 --no-open
rvc-next webui --data-dir D:/rvc-next-data

version

显示 rvc-next 及其主要组件(torch、transformers、faiss-cpu、librosa、av、sounddevice、pymss、fastapi 等)的版本。

选项说明
--json打印 JSON

env

列出 rvc-next 读取的环境变量,以及当前已设置的 RVC_NEXT_* 变量(名称含 TOKEN 的值显示为 ***)。

选项说明
--json打印 JSON

doctor

检查 Python、torch 及其 GPU 后端(CUDA、ROCm、XPU)、DirectML、ffmpeg、音频设备、资源,以及 GPU 规则选中的设备和精度,最后列出发现的问题和修复命令。

选项说明
--json打印 JSON
rvc-next doctor

转换与分离

convert

用一个音色转换音频文件或文件夹。参数从音色的默认预设开始,命令行给出的选项覆盖对应的值。

rvc-next convert [OPTIONS] INPUTS...
参数说明
INPUTS...音频文件或文件夹(必填,可多个)
选项说明默认值
-v, --voice <str>音色 id、名称或 .pth 路径(必填)—
-o, --output <directory>输出文件夹数据目录中该任务的文件夹
--preset <str>以这个预设为起点,而不是音色的默认预设音色的默认预设
--index <file>用路径给出 .pth 音色时使用的索引—
--speaker <int>多说话人音色的说话人 id,[0, 109]取自预设
--pitch <float>音高偏移(半音),[-24, 24]取自预设
--formant <float>共振峰偏移(半音),[-2, 2]取自预设
--f0 <str>音高算法:pm、rmvpe、fcpe、crepe、crepe-tiny 或 swift取自预设
--index-rate <float>索引强度,[0, 1]取自预设
--protect <float>辅音保护,[0, 0.5];0.5 为关闭取自预设
--rms-mix <float>响度匹配,[0, 1];1 保持转换后的响度取自预设
--unvoiced <mode>无音高帧:protect、zero 或 original,见无音高帧取自预设
--autotune <float>把音拉向最近的半音,[0, 1];0 为关闭取自预设
--auto-pitch <mode>off、semitone 或 octave:再移调,使输入的中位音高落到目标上;见自动定调取自预设
--auto-pitch-target <float>自动定调的目标音高(Hz),[0, 1000];0 为音色自己的,否则 155取自预设
--high-register <mode>RMVPE 约 1040 Hz 以上:off、true_pitch 或 fold,见极高音取自预设
--f0-ceiling <float>true_pitch 写入的最高音高,[1000, 2000] Hz取自预设
--separate <str>先用这个分离预设分离,再转换人声—
--remix加回伴奏(需要 --separate)关
--remix-gain <float>伴奏增益(dB)0.0
--format <str>wav、flac、mp3、m4a 或 ogg(Opus)设置 convert.output_format(wav)
--resample <int>把结果重采样到这个采样率,至少 16000音色自身的采样率
--denoise <float>对转换结果降噪,[0, 1];0 为关闭0
--effect <spec>转换结果上的效果,可重复,按顺序处理:KIND 或 KIND:NAME=VALUE,...,例如 --effect compressor --effect reverb:room_size=0.6,wet_level=0.3;effects 列出全部效果。需要 rvc-next[effects]无
--recursive / --no-recursive进入文件夹输入的子文件夹--no-recursive
--overwrite / --no-overwrite替换输出文件夹里已有的文件--no-overwrite
--preview <float>只转换前 N 秒,[1, 120]—
--json以 JSON 打印完成的任务关

结束后逐行打印输出文件的路径。

rvc-next convert vocal.wav -v "我的音色" --pitch 12
rvc-next convert ./in --recursive -v kikiv1 --f0 fcpe -o ./out --format mp3
rvc-next convert song.flac -v ./voice.pth --index ./added.index --separate vocals --remix

analyse

显示音频文件的时长、格式和中位音高,并可写出它的音高曲线(SwiftF0,在处理器上计算;10 ms 一步)。

rvc-next analyse [OPTIONS] PATH
选项说明
--csv <path>把音高曲线写成 time_s,f0_hz(没有音高处为 0)
--json输出完整分析,包括频谱图(base64)

effects

列出 convert --effect 和 live run --effect 可用的效果,以及每个参数的默认值和范围,并说明是否已安装 pedalboard。

rvc-next effects [--json]

separate

分离人声、伴奏和混响。可以用单个预设,也可以用串联预设。

rvc-next separate [OPTIONS] [INPUTS]...
参数说明
INPUTS...音频文件或文件夹(不用 --list 时必填)
选项说明默认值
-p, --preset <str>预设 id;用 --list 查看设置 separation.default_preset(vocals)
-o, --output <directory>输出文件夹数据目录中该任务的文件夹
--format <str>wav、flac、mp3、m4a 或 ogg(Opus)设置 separation.output_format(flac)
--recursive / --no-recursive进入子文件夹--no-recursive
--list列出预设并退出关
--json打印 JSON关

内置预设:vocals、vocals-aggressive、dereverb、dereverb-aggressive、karaoke,以及串联预设 vocals-clean(人声 → 去混响)和 lead-clean(人声 → 主唱 → 去混响)。导入的分离模型以 user-<名称> 作为预设 id。

rvc-next separate --list
rvc-next separate song.mp3 -p vocals-clean -o ./stems

文字转语音:tts

用微软 Edge 的在线语音把文字读出来(需要 rvc-next[tts]);文字会发送到微软的语音服务。

tts voices

列出发音人:每行一个,包括 ID、性别和语言。列表缓存一周。

选项说明
--locale <str>只列出地区代码以此开头的发音人,例如 en、zh-CN
--refresh重新获取列表
--json以 JSON 输出

tts speak

朗读文字并保存为 MP3,输出文件路径。

rvc-next tts speak [OPTIONS] TEXT
参数 / 选项说明默认值
TEXT要朗读的文字;- 表示从标准输入读取—
--voice <id>tts voices 中的发音人 ID(必填)—
-o, --output <file>把 MP3 写到这里存放在数据目录的上传文件中
--rate <int>语速变化(百分比),[-50, 100]0
--pitch <int>音高变化(Hz),[-50, 50]0
rvc-next tts speak "你好" --voice zh-CN-XiaoxiaoNeural -o hello.mp3
rvc-next convert hello.mp3 -v "我的音色"

设置:config

显示和修改设置。设置项见 配置与环境变量。

config show

显示当前生效的设置(默认值、settings.toml 和环境变量合并后的结果)。访问令牌只显示为是否已设置。

选项说明
--json打印 JSON

config get

打印一个设置。

rvc-next config get KEY
参数说明
KEY点分隔的键,例如 server.port(必填)

config set

修改一个设置并保存到 settings.toml。

rvc-next config set KEY VALUE
参数说明
KEY点分隔的键,例如 server.port 或 compute.device(必填)
VALUE新值。按 JSON 解析(数字、true/false、列表);null 清除(必填)

如果同名环境变量覆盖了这个设置,命令会提示"An environment variable overrides this setting."。

rvc-next config set compute.device cpu
rvc-next config set server.access_token "换成一个长随机字符串"
rvc-next config set paths.browse_roots '["D:/music", "E:/datasets"]'

config path

打印设置文件的路径。

资源:assets

HuBERT、RMVPE、底模和分离模型权重。

assets list

显示每个资源的 id、名称、分组、大小和状态(已安装、缺失、损坏),以及当前的下载仓库。

选项说明
--json打印 JSON

assets download

下载资源:断点续传,并校验 SHA-256。

rvc-next assets download [OPTIONS] [IDS]...
参数说明
IDS...资源 id;见 rvc-next assets list
选项说明默认值
--group <str>inference(HuBERT 和各音高模型)、embedder、community、training、separation 或 all既没有 id 也没有分组时为 inference
--source <str>下载源:huggingface、hf-mirror、modelscope 或 custom(保存到设置)设置 downloads.source
--repository <str>rvc-model 或 official(保存到设置)设置 downloads.repository

资源 id:hubert、rmvpe、rmvpe-onnx、fcpe、crepe、crepe-tiny、pretrained-v1-32k、pretrained-v1-40k、pretrained-v1-48k、pretrained-v2-32k、pretrained-v2-40k、pretrained-v2-48k、separation-vocals、separation-vocals-aggressive、separation-dereverb、separation-dereverb-aggressive、separation-karaoke,内容特征模型 embedder-spin、embedder-spin-v2、embedder-chinese-hubert-base、embedder-japanese-hubert-base、embedder-korean-hubert-base(分组 embedder),以及社区底模 community-<名称>-<采样率>(分组 community;rvc-next assets list 会列出)。任何分组都不包括只在 DirectML 上使用的 rmvpe-onnx;inference 分组是 hubert、rmvpe、fcpe、crepe 和 crepe-tiny。all 不包含 embedder 和 community。

rvc-next assets download
rvc-next assets download fcpe pretrained-v2-40k
rvc-next assets download --group separation --source hf-mirror

assets verify

用校验和检查已安装的资源。不给 id 和分组时检查所有已安装或已损坏的资源。

rvc-next assets verify [OPTIONS] [IDS]...
参数说明
IDS...资源 id
选项说明
--group <str>inference(HuBERT 和各音高模型)、embedder、community、training、separation 或 all

模型:model

音色库。

model list

列出某一类模型。

选项说明默认值
--json打印 JSON关
--all包括已隐藏的旧版音色关
--type <str>voice、index(未分配的索引)、base 或