CosyVoice win10启用记
1、git
https://gitee.com/heardlovergitee/CosyVoice
https://gitee.com/heardlovergitee/Matcha-TTS
1.1 git clone
git clone git@gitee.com:heardlovergitee/CosyVoice.git
1.2 修改文件:CosyVoice/.gitmodules
[submodule "third_party/Matcha-TTS"]path = third_party/Matcha-TTSurl = https://gitee.com/heardlovergitee/Matcha-TTS.git
1.3 submodule同步
- git add -A
- git commit -m “submodule for Matcha-TTS”
- git push
- git pull
- git submodule sync
1.4 git submodule
git submodule update --init --recursive
1.5 pip install vllm
- copying build\lib\vllm\model_executor\layers\quantization\utils\configs\N=1536,K=1536,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json -> build\bdist.win-amd64\wheel\.\vllm\model_executor\layers\quantization \utils\configs error: could not create 'build\bdist.win-amd64\wheel\.\vllm\model_executor\layers\quantization\utils\configs\N=1536,K=1536,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json': No such file or directory [end of output]
- 由于 Windows 系统对文件名中特殊字符的限制导致的。Windows 不允许在文件名中使用
[
和]
等特殊字符,而你要复制的文件包含block_shape=[128,128]
这样的命名,从而导致创建文件失败。
2、WSL
2.1 wsl
- cat /etc/os-release
PRETTY_NAME="Docker Desktop" - exit
2.2 wsl --install -d Ubuntu-22.04
- cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.5 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.5 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
h@HeMetaBookPro:~$ - exit
3、WSL-Ubuntu-22.04运行CosyVoice
3.1 修改apt源
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
sudo sed -i 's|http://.*archive.ubuntu.com|https://mirrors.aliyun.com|g' /etc/apt/sources.list
sudo apt update
3.2 修改pip源
mkdir -p ~/.pip
nano ~/.pip/pip.conf
python -m pip install --upgrade pip
pip config list
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host = pypi.tuna.tsinghua.edu.cn
按 Ctrl+O 保存,Ctrl+X 退出编辑器。
3.3 pip install vllm
(时间非常长)
pip install modelscope onnxruntime whisper inflect tn python-dateutil ttsfrd omegaconf conformer diffusers hydra-core
pip install hydra-core
pip install lightning gdown matplotlib wget librosa pyarrow pyworld
pip uninstall -y whisper
pip install openai-whisper
pip uninstall -y ttsfrd
git clone https://www.modelscope.cn/iic/CosyVoice-ttsfrd.git
cd CosyVoice-ttsfrd/
pip install ttsfrd_dependency-0.1-py3-none-any.whl
pip install ttsfrd-0.4.2-cp310-cp310-linux_x86_64.whl
h@HeMetaBookPro:/mnt/d/Hworkspace/pythonProject/CosyVoice/CosyVoice$ python vllm_example.py