现在来到MacOs平台,还是先克隆项目:
git clone https://github.com/v3ucn/CosyVoice_for_MacOs.git
安装依赖:
cd CosyVoice_for_MacOs
conda create -n cosyvoice python=3.8
conda activate cosyvoice
pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/ --trusted-host=mirrors.aliyun.com
随后需要通过Homebrew安装sox:
brew install sox
如此就配置好了,但是别忘了添加环境变量:
export PYTHONPATH=third_party/AcademiCodec:third_party/Matcha-TTS
使用方式和Windows版本保持一致。
这里还是推荐使用webui:
python3 webui.py --port 50000 --model_dir speech_tts/CosyVoice-300M
访问 http://localhost:50000