# voice-cloning **Repository Path**: hmsay/voice-cloning ## Basic Information - **Project Name**: voice-cloning - **Description**: voxcpm小白本地使用,项目https://github.com/OpenBMB/VoxCPM/ - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-10-14 - **Last Updated**: 2025-10-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 声音克隆 ## 1. 安装 uv ```bash winget install --id=astral-sh.uv -e # windows brew install uv # macos curl -LsSf https://astral.sh/uv/install.sh | sh # linux or macos ``` 如果不方便可以手动安装python [https://mirrors.aliyun.com/python-release/](https://mirrors.aliyun.com/python-release/) ## 2. 安装 git ```bash winget install --id=Git.Git -e # windows brew install git # macos sudo apt install git # ubuntu ``` 如果不方便可以手工安装git [https://mirrors.tuna.tsinghua.edu.cn/github-release/git-for-windows/git/LatestRelease/](https://mirrors.tuna.tsinghua.edu.cn/github-release/git-for-windows/git/LatestRelease/) ## 3. 下载项目 ```bash git clone https://gitee.com/hmsay/voice-cloning.git ``` ## 4. nvidia 和 cuda 具体是否可以使用gpu加速,取决于显卡是否支持,是否安装了nvidia驱动和cuda toolkit。 参考文献[2025年 Windows10 安装 CUDA Toolkit 和 cuDNN,PyTorch 安装 CUDA Runtime 和 cuDNN](https://zhuanlan.zhihu.com/p/1944361508134954370) ## 5. 安装依赖 ```bash cd voice-cloning uv sync ``` 原始的torch版本存在问题,如果需要使用gpu加速,需要安装```torch2.8.0+cu129``` ```bash 卸载旧版本torch uv pip uninstall torch uv pip install torch==2.8.0+cu129 torchaudio -i https://mirrors.sjtug.sjtu.edu.cn/pytorch-wheels/cu129 --index-strategy unsafe-best-match ``` > 版本号需要根据显卡实际调整,例如cuda12.9对应的torch版本为2.8.0+cu129 验证torch是否安装成功 ```bash uv run python -c "import torch; print(torch.cuda.is_available())" # True ``` ## 6. 下载模型 ```bash uv run modelscope download --model iic/SenseVoiceSmall --local_dir ./models/iic/SenseVoiceSmall uv run modelscope download --model iic/speech_zipenhancer_ans_multiloss_16k_base --local_dir ./models/iic/speech_zipenhancer_ans_multiloss_16k_base uv run modelscope download --model openbmb/VoxCPM-0.5B --local_dir ./models/openbmb/VoxCPM-0.5B ``` ## 6. 运行项目 ```bash uv run main.py ```