真人级 AI 配音!VoxCPM2 免费一键克隆声音|AI 语音大模型|本地部署教程

大家好,我是超哥。今天给大家分享一款非常强大的免费 AI 语音大模型 VoxCPM。它支持 AI 配音声音克隆音色设计,还能生成 48kHz 真人级音质,支持 30 种语言和多种中文方言,而且完全开源免费商用。下面我就带大家一步一步完成本地部署,我们马上开始。

一、安装基础环境

1. 安装python

下载地址:https://www.python.org/downloads/release/python-3120/

直达下载:https://www.python.org/ftp/python/3.12.0/python-3.12.0-amd64.exe

验证python是否安装成功,cmd里执行下面代码:

python --version

2. 安装git

下载地址:https://git-scm.com/install/windows

直达下载:https://github.com/git-for-windows/git/releases/download/v2.55.0.windows.2/Git-2.55.0.2-64-bit.exe

验证git是否安装成功,cmd里执行下面代码:

git --version

二、代码下载

1. 进入C盘(或D盘等),在地址栏里输入cmd,在打开的cmd里执行下载代码:

git clone https://github.com/OpenBMB/VoxCPM.git

2. 在下载的依赖包代码目录里(比如:D:\VoxCPM)创建:requirements.txt,把下面的内容复制粘贴进去:

addict==2.4.0
aiohappyeyeballs==2.6.1
aiohttp==3.13.5
aiosignal==1.4.0
aliyun-python-sdk-core==2.16.0
aliyun-python-sdk-kms==2.16.5
annotated-doc==0.0.4
annotated-types==0.7.0
antlr4-python3-runtime==4.9.3
anyascii==0.3.3
anyio==4.13.0
argbind==0.3.9
attrs==26.1.0
audioread==3.1.0
brotli==1.2.0
certifi==2026.2.25
cffi==2.0.0
charset-normalizer==3.4.7
click==8.3.2
colorama==0.4.6
contourpy==1.3.3
contractions==0.1.73
crcmod==1.7
cryptography==46.0.7
cycler==0.12.1
datasets==3.6.0
decorator==5.2.1
dill==0.3.8
docstring_parser==0.17.0
editdistance==0.8.1
einops==0.8.2
fastapi==0.135.3
filelock==3.25.2
fonttools==4.62.1
frozenlist==1.8.0
fsspec==2025.3.0
funasr==1.3.1
gradio==6.12.0
gradio_client==2.4.1
groovy==0.1.2
h11==0.16.0
hf-gradio==0.3.0
hf-xet==1.4.3
httpcore==1.0.9
httpx==0.28.1
huggingface_hub==1.10.1
hydra-core==1.3.2
idna==3.11
inflect==7.5.0
jaconv==0.5.0
jamo==0.4.1
jieba==0.42.1
Jinja2==3.1.6
jmespath==0.10.0
joblib==1.5.3
kaldifst==1.8.0
kaldiio==2.18.1
kiwisolver==1.5.0
lazy-loader==0.5
librosa==0.11.0
llvmlite==0.47.0
markdown-it-py==4.0.0
MarkupSafe==3.0.3
matplotlib==3.10.8
mdurl==0.1.2
modelscope==1.35.4
more-itertools==11.0.2
mpmath==1.3.0
msgpack==1.1.2
multidict==6.7.1
multiprocess==0.70.16
networkx==3.6.1
numba==0.65.0
numpy==2.4.4
omegaconf==2.3.0
orjson==3.11.8
oss2==2.19.1
packaging==26.0
pandas==3.0.2
pillow==12.2.0
platformdirs==4.9.6
pooch==1.9.0
propcache==0.4.1
protobuf==7.34.1
psutil==5.9.8
pyahocorasick==2.3.0
pyarrow==23.0.1
pycparser==3.0
pycryptodome==3.23.0
pydantic==2.13.0
pydantic_core==2.46.0
pydub==0.25.1
Pygments==2.20.0
pynndescent==0.6.0
pyparsing==3.3.2
python-dateutil==2.9.0.post0
python-multipart==0.0.26
pytorch-wpe==0.0.1
pytz==2026.1.post1
PyYAML==6.0.3
regex==2026.4.4
requests==2.33.1
rich==15.0.0
safehttpx==0.1.7
safetensors==0.7.0
scikit-learn==1.8.0
scipy==1.17.1
semantic-version==2.10.0
sentencepiece==0.2.1
shellingham==1.5.4
simplejson==3.20.2
six==1.17.0
sortedcontainers==2.4.0
soundfile==0.13.1
soxr==1.0.0
spaces==0.48.1
starlette==1.0.0
sympy==1.14.0
tensorboardX==2.6.5
textsearch==0.0.24
threadpoolctl==3.6.0
tokenizers==0.22.2
tomlkit==0.14.0
torch-complex==0.4.4
torchaudio==2.8.0
torchcodec==0.11.0
tqdm==4.67.3
transformers==5.5.3
typeguard==4.5.1
typer==0.24.1
typing-inspection==0.4.2
typing_extensions==4.15.0
tzdata==2026.1
umap-learn==0.5.12
urllib3==2.6.3
uvicorn==0.44.0
wetext==0.1.2
xxhash==3.6.0
yarl==1.23.0

三、创建虚拟环境

1. 进入到VoxCPM的代码目录(比如:D:\VoxCPM),在地址栏里执行输入cmd回车,进入到cmd终端界面,输入下面代码:

python -m venv .venv

2. 在cmd里执行下面代码,激活虚拟环境

.venv\Scripts\activate

四、依赖安装

注意:在虚拟环境执行里执行下面操作。

1. 设置pip镜像

pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

验证是否设置成功命令:

pip config list
看到类似这种说明成功:global.index-url='https://pypi.tuna.tsinghua.edu.cn/simple'。

2. 安装 torch

NVIDIA GPU

pip install torch==2.8.0 torchaudio==2.8.0 --index-url https://download.pytorch.org/whl/cu128

Mac/CPU

pip install torch==2.8.0 torchaudio==2.8.0 --index-url https://download.pytorch.org/whl/cpu

3. 安装其他依赖

pip install -r requirements.txt

4. 安装代码本⾝

pip install -e .

五、AI 语音模型下载

以此执行下面的三条命令:

modelscope download --model OpenBMB/VoxCPM2 --local_dir ./checkpoints/OpenBMB/VoxCPM2
modelscope download --model iic/SenseVoiceSmall --local_dir ./checkpoints/iic/SenseVoiceSmall
modelscope download --model iic/speech_zipenhancer_ans_multiloss_16k_base -- local_dir ./checkpoints/iic/speech_zipenhancer_ans_multiloss_16k_base

六、启动 WEB 界面

1.  极速克隆模式-⼿动转写

python app.py

2. 极速克隆模式-使⽤CPU运⾏转写模型

python app.py --ultra_clone_device cpu

3. 极速克隆模式-使⽤GPU运⾏转写模型(显存>8GB时使⽤)

python app.py --ultra_clone_device cuda

在浏览器中打开提示的网址即可,一般是: http://127.0.0.1:8888/ (端口号有时候不一样)

七、再次启动进入VoxCPM

1. 在VoxCPM代码目录里(比如:D:\VoxCPM)的地址框输入cmd,然后按Enter回车键进入cmd终端,进入cmd之后执行下面代码激活虚拟空间:

.venv\Scripts\activate

2. 进入虚拟空间之后,执行下面命令启动web界面:

python app.py

在浏览器中打开提示的网址即可,一般是: http://127.0.0.1:8888/ (端口号有时候不一样)

上一篇腾讯混元 Hy3 免费开放!Hermes Agent 一键白嫖 AI 大模型教程|无需部署,直接用 下一篇无需服务器和域名!1分钟上线网页,永久免费托管!Cloudflare Drop 部署教程