十念 发表于 2025-3-15 18:15:04

mac摆设GPT-SoVITS,生成粤语踩坑点及使用记载

本身录音,普通话或者粤语
注意:

与在其他设备上训练的模子相比,在mac上使用gpu训练的模子的质量明显较低,因此我们暂时使用cpu代替。


[*]Install Xcode command-line tools by running xcode-select --install.
[*]Install FFmpeg by running brew install ffmpeg.
[*]Install the program by running the following commands:
conda create -n GPTSoVits python=3.9
conda activate GPTSoVits
pip install -r requirements.txt GitHub - RVC-Boss/GPT-SoVITS: 1 min voice data can also be used to train a good TTS model! (few shot voice cloning)

注意py的版本
激活环境:
conda activate GPTSoVits
在macos上训练本身的声音

激活环境:
conda activate GPTSoVits

第一踩坑点

启动下令:
python3 webui.py 之后,无法跳转,显示超时
File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/pydantic/_internal/_generate_schema.py", line 558, in _unknown_type_schema
 raise PydanticSchemaGenerationError(
pydantic.errors.PydanticSchemaGenerationError 办理方法:
pip uninstall fastapi
pip install fastapi==0.112.2 乐成跑起:

第二个踩坑点

是在微调训练gpt报错
RuntimeError: Index tensor must have the same number of dimensions as self tensor return torch.zeros_like(preds_oh, dtype=torch.int32).scatter_(-1, result.unsqueeze(1).unsqueeze(1), 1)
RuntimeError: Index tensor must have the same number of dimensions as self tensor
​<img alt="" height="487" src="https://i-blog.csdnimg.cn/direct/3b45162662874d938358f3e2ee833da6.png" width="981" /> 办理方法:
pip install torchmetrics==1.5 末了乐成跑起https://i-blog.csdnimg.cn/direct/e0fe2330dfa648f88b8d0c78b08ef9c7.png
https://i-blog.csdnimg.cn/direct/5f8cc98433e348d3a052a8574f7c8242.png
效果:
https://i-blog.csdnimg.cn/direct/30b81751392347aeb40faa04a8c843c0.png
CondaError: Run 'conda init' before 'conda activate'

使用Mobaxterm连接长途服务器,在创建conda环境后报错。
输入conda init后返回No action taken.
办理方法


[*] 输入source activate,后发现前面多了(base)
[*] 输入conda activate xxx(此处为自定义的环境名称),后发现(base)变为(xxx)
参考:https://zhuanlan.zhihu.com/p/683118485https://i-blog.csdnimg.cn/direct/ff28c55103bd4bc2bf90d2f9f1c29957.png
使用教程记载

https://i-blog.csdnimg.cn/direct/6034affe942c4491a8ec3d533282c987.png
 https://i-blog.csdnimg.cn/direct/2340b2410c7b474fb608490ed7154b4e.png语音切割,降噪,进行选择语音,就可以打标了

https://i-blog.csdnimg.cn/direct/60d9faa9c562442eb3404966b87517ec.png
https://i-blog.csdnimg.cn/direct/eba8c465bf1d4135bc189000d2709afd.png 打标界面

https://i-blog.csdnimg.cn/direct/17ed4c38c6484723b775d1d85fc38963.png
 之后可以进行训练了

https://i-blog.csdnimg.cn/direct/f344991df8c04c4a99e2ef09ad4abd52.pnghttps://i-blog.csdnimg.cn/direct/8410f64299314975ac330cacdeed68f1.png
https://i-blog.csdnimg.cn/direct/1fec79bea63d4ddf963c8e0ef287bdcb.png
 微调模子https://i-blog.csdnimg.cn/direct/068826839ea345c48f8a7481c50027ce.png
 https://i-blog.csdnimg.cn/direct/71fab31d572b4f2f856a6f161f1632f9.pnghttps://i-blog.csdnimg.cn/direct/b46f1d450cd442c3a66accc7901780bf.png
终端 

https://i-blog.csdnimg.cn/direct/4037a6c8087a472dbb54c282079ca577.png

免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
页: [1]
查看完整版本: mac摆设GPT-SoVITS,生成粤语踩坑点及使用记载