Closed Mumastema closed 7 months ago
这里需要下载下载1.2G的模型文件而不是拷贝py文件
挂全局代理,在线下载,或 下载这个文件,解压后将 wavlm 文件夹内的pt文件复制过去 https://github.com/jianchang512/clone-voice/releases/download/v0.0.1/model-sts.7z
模型是不存在于代码目录的,无处可复制,必须在线下载,挂全局代理
模型下载成功了,现在目录如下:
但是启动声音->声音线程仍然失败:
已在.env中设置HTTP_PROXY代理,http://127.0.0.1:7890和socks5://127.0.0.1:7890都尝试过了,仍然提示代理不可用,从系统配置中看起来参数应该没有问题:
同时这个代理用clash也是可以正常访问墙外地址的🤔️,想咨询一下还有可能是哪里的问题
先执行python code_dev.py
还缺少一个模型,tts_cache里
执行python code_dev.py时提示报错:
(base) localhost:clone-voice-main xcj$ python code_dev.py
源码部署需要先运行该文件,以便同意coqou-ai协议,当弹出协议时,请输入 y
同时需要连接墙外下载或更新模型,请配置全局代理
> tts_models/multilingual/multi-dataset/xtts_v2 is already downloaded.
> Using model: xtts
> voice_conversion_models/multilingual/vctk/freevc24 is already downloaded.
> Using model: freevc
> Loading pretrained speaker encoder model ...
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/aiohttp/connector.py", line 1104, in _start_tls_connection
tls_transport = await self._loop.start_tls(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 1267, in start_tls
await waiter
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/sslproto.py", line 575, in _on_handshake_complete
raise handshake_exc
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/sslproto.py", line 557, in _do_handshake
self._sslobj.do_handshake()
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/ssl.py", line 979, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/xcj/Desktop/clone-voice-main/code_dev.py", line 20, in <module>
tts = TTS(model_name='voice_conversion_models/multilingual/vctk/freevc24').to(device)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/aiohttp/client.py", line 1187, in __aenter__
self._resp = await self._coro
^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/aiohttp/client.py", line 574, in _request
conn = await self._connector.connect(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/aiohttp/connector.py", line 544, in connect
proto = await self._create_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/aiohttp/connector.py", line 909, in _create_connection
_, proto = await self._create_proxy_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/aiohttp/connector.py", line 1357, in _create_proxy_connection
return await self._start_tls_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/aiohttp/connector.py", line 1118, in _start_tls_connection
raise ClientConnectorCertificateError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host github.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)')]
之前已遇到过这个问题(https://github.com/jianchang512/clone-voice/issues/59) 按照常见问题中的说明从链接下载并复制了两个文件到tts_cache,现模型目录如下:
执行python app.py时还是老问题,SSL验证不通过:
(base) localhost:clone-voice-main xcj$ curl ipinfo.io
{
"ip": "103.84.217.156",
"city": "Singapore",
"region": "Singapore",
"country": "SG",
"loc": "1.2897,103.8501",
"org": "AS38136 Akari Networks",
"postal": "018989",
"timezone": "Asia/Singapore",
"readme": "https://ipinfo.io/missingauth"
}(base) localhost:clone-voice-main xcj$ python app.py
DIR: /Users/xcj/Desktop/clone-voice-main
=====源码部署须知======
如果你是源码部署,需要先执行 python code_dev.py 文件,以便同意coqou-ai的授权协议(显示同意协议后输入 y ),然后从下载或更新模型,需要提前配置好全局vpn
=====
准备启动 【文字->声音】 线程
准备启动 【声音->声音】 线程
启动后加载模型可能需要几分钟,请耐心等待浏览器自动打开
> voice_conversion_models/multilingual/vctk/freevc24 is already downloaded.
> tts_models/multilingual/multi-dataset/xtts_v2 is already downloaded.
> Using model: freevc
> Loading pretrained speaker encoder model ...
res.status_code=200
d={'version': 'v0.888', 'version_num': 888}
启动 声音->声音 线程失败:Cannot connect to host github.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)')]
http://127.0.0.1:7890 代理不可用,请设置正确的代理,以便下载模型
^CKeyboardInterrupt
2024-01-26T14:37:58Z
> Using model: xtts
启动 文字->声音 线程成功
从curl ipinfo.io的返回结果来看代理是成功了的,现在怀疑是终端这样挂代理并不可用🤦想问问有没有什么好的建议,感谢解答~
代理问题。 将代理地址填写到 .env 中,然后再执行 python code_dev.py
执行app.py的代码如下: 其中有一行为
模型目录内容如下(从TTS/vc/modules/freevc/wavlm下载并拷贝的)
想咨询问题出现在哪里,谢谢