本地安装CSM Voice Cloning需要满足特定硬件和软件环境,以下是详细步骤:
Antecedent Requirements:
- software:NVIDIA CUDA兼容显卡(需足够显存)
- hardware:Python 3.10+版本
- reticulation:能稳定下载模型及依赖项
Installation Process:
- Clone the code repository:
git clone https://github.com/isaiahbjork/csm-voice-cloning.git
cd csm-voice-cloning - Install dependent libraries:
pip install -r requirements.txt
(包含PyTorch、Hugging Face transformers等核心组件) - 配置Hugging Face令牌:
- 在Hugging Face官网申请API令牌
- pass (a bill or inspection etc)
export HF_TOKEN="你的令牌"
Setting environment variables
完成后可通过修改voice_clone.py中的音频路径、文本等参数进行语音生成。首次运行时需要下载约4GB的模型文件,请确保磁盘空间充足。
This answer comes from the articleCSM Voice Cloning: Fast Voice Cloning with the CSM-1BThe