myshell-ai / MeloTTS

High-quality multi-lingual text-to-speech library by MyShell.ai. Support English, Spanish, French, Chinese, Japanese and Korean.
MIT License
3.98k stars 476 forks source link

unidic 国内无法下载? #62

Open bergli2020 opened 3 months ago

bergli2020 commented 3 months ago

download url: https://cotonoha-dic.s3-ap-northeast-1.amazonaws.com/unidic-3.1.0.zip 国内无法访问,请教下如何解决?

RUN python3 -m unidic download:
2.445 Downloading UniDic v3.1.0+2021-08-31... 2.506 download url: https://cotonoha-dic.s3-ap-northeast-1.amazonaws.com/unidic-3.1.0.zip 2.506 Dictionary version: 3.1.0+2021-08-31 unidic-3.1.0.zip: 0.00B [00:00, ?B/s] 2.866 Traceback (most recent call last): 2.866 File "/usr/local/lib/python3.9/urllib/request.py", line 1346, in do_open 2.900 h.request(req.get_method(), req.selector, req.data, headers, 2.900 File "/usr/local/lib/python3.9/http/client.py", line 1285, in request 2.934 self._send_request(method, url, body, headers, encode_chunked) 2.934 File "/usr/local/lib/python3.9/http/client.py", line 1331, in _send_request 2.934 self.endheaders(body, encode_chunked=encode_chunked) 2.934 File "/usr/local/lib/python3.9/http/client.py", line 1280, in endheaders 2.934 self._send_output(message_body, encode_chunked=encode_chunked) 2.934 File "/usr/local/lib/python3.9/http/client.py", line 1040, in _send_output 2.935 self.send(msg) 2.935 File "/usr/local/lib/python3.9/http/client.py", line 980, in send 2.935 self.connect() 2.935 File "/usr/local/lib/python3.9/http/client.py", line 1454, in connect 2.936 self.sock = self._context.wrap_socket(self.sock, 2.936 File "/usr/local/lib/python3.9/ssl.py", line 500, in wrap_socket 2.936 return self.sslsocket_class._create( 2.936 File "/usr/local/lib/python3.9/ssl.py", line 1040, in _create 2.937 self.do_handshake() 2.937 File "/usr/local/lib/python3.9/ssl.py", line 1309, in do_handshake 2.937 self._sslobj.do_handshake() 2.937 ConnectionResetError: [Errno 104] Connection reset by peer

liurongsheng commented 3 months ago

确实需要梯子才行

gotoolkits commented 3 months ago

这个库是必须的还是可以忽略此下载?

YingjiaoLiu commented 3 months ago

用梯子下载好zip然后如何安装呢?远程服务器没法用命令python3 -m unidic download安装

Game5048-bilibili commented 3 months ago

我也想问qwq,大家都是怎么安装的

Game5048-bilibili commented 3 months ago

我解决了

zhangguangxun commented 3 months ago

我解决了

请教一下怎么解决的呢?

Game5048-bilibili commented 3 months ago

首先你需要pip install unidec 然后找你的python的路径,我这里是venv所以就拿venv说 我的路径是./python_venv/Lib/site-packages 接着你需要找unidecunidec_lite两个文件夹 我当时发现是unidec_lite中有个dicdir文件夹,而unidec中没有,而且报错中显示的目标也在这个文件夹中,所以我把dicdir复制了一份到unidec文件夹中,然后就可以了。

但是因为网络问题,这个程序还要下载亚马逊和huggingface里的配置文件和模型,我尝试过手动导入,但是我代码基础差看不懂,所以还是运行不了,你们如果解决了麻烦告诉我!!提前说声感谢

Game5048-bilibili commented 3 months ago

首先你需要pip install unidec 然后找你的python的路径,我这里是venv所以就拿venv说 我的路径是./python_venv/Lib/site-packages 接着你需要找unidecunidec_lite两个文件夹 我当时发现是unidec_lite中有个dicdir文件夹,而unidec中没有,而且报错中显示的目标也在这个文件夹中,所以我把dicdir复制了一份到unidec文件夹中,然后就可以了。

但是因为网络问题,这个程序还要下载亚马逊和huggingface里的配置文件和模型,我尝试过手动导入,但是我代码基础差看不懂,所以还是运行不了,你们如果解决了麻烦告诉我!!提前说声感谢

要是需要我提供文件夹请@我

zhangguangxun commented 3 months ago

首先你需要pip install unidec 然后找你的python的路径,我这里是venv所以就拿venv说 我的路径是./python_venv/Lib/site-packages 接着你需要找unidecunidec_lite两个文件夹 我当时发现是unidec_lite中有个dicdir文件夹,而unidec中没有,而且报错中显示的目标也在这个文件夹中,所以我把dicdir复制了一份到unidec文件夹中,然后就可以了。

但是因为网络问题,这个程序还要下载亚马逊和huggingface里的配置文件和模型,我尝试过手动导入,但是我代码基础差看不懂,所以还是运行不了,你们如果解决了麻烦告诉我!!提前说声感谢

感谢!我去试一下,感谢分享,有进展继续交流!

Game5048-bilibili commented 2 months ago

呃,我已经全部解决了!

MissingTwins commented 2 months ago

Try this in windows cmd

set HTTP_PROXY=http://127.0.0.1:7890
set HTTPS_PROXY=http://127.0.0.1:7890
python -m unidic download

Try this in bash

export HTTP_PROXY=http://127.0.0.1:7890
export HTTPS_PROXY=http://127.0.0.1:7890
python -m unidic download
Game5048-bilibili commented 2 months ago

Try this in windows cmd

set HTTP_PROXY=http://127.0.0.1:7890
set HTTPS_PROXY=http://127.0.0.1:7890
python -m unidic download

Try this in bash

export HTTP_PROXY=http://127.0.0.1:7890
export HTTPS_PROXY=http://127.0.0.1:7890
python -m unidic download

Yeah! It works! Before inputing these, you need a proxy to connect AWS.

hey135 commented 2 months ago

呃,我已经全部解决了!

怎么解决的呀

morganwang010 commented 2 months ago

1, manaul download the unidic.zip from https://cotonoha-dic.s3-ap-northeast-1.amazonaws.com/unidic-3.1.0.zip, 2, cp unidic-3.1.0.zip to /usr/local/lib/python3.9/site-packages/unidic/ and rename it to unidic.zip 3, change /usr/local/lib/python3.9/site-packages/unidic/download.py line 93 , function download_version, comment all except download_and_clean(), 4, change the download_and_clean two parameter anything you want 5, change /usr/local/lib/python3.9/site-packages/unidic/download.py line 63, comment the download_process then execut python -m unidic download again , it will be OK

Super-Tree commented 2 months ago

1, manaul download the unidic.zip from https://cotonoha-dic.s3-ap-northeast-1.amazonaws.com/unidic-3.1.0.zip, 2, cp unidic-3.1.0.zip to /usr/local/lib/python3.9/site-packages/unidic/ and rename it to unidic.zip 3, change /usr/local/lib/python3.9/site-packages/unidic/download.py line 93 , function download_version, comment all except download_and_clean(), 4, change the download_and_clean two parameter anything you want 5, change /usr/local/lib/python3.9/site-packages/unidic/download.py line 63, comment the download_process then execut python -m unidic download again , it will be OK

Yes,it works!

zhangguangxun commented 2 months ago

1, manaul download the unidic.zip from https://cotonoha-dic.s3-ap-northeast-1.amazonaws.com/unidic-3.1.0.zip, 2, cp unidic-3.1.0.zip to /usr/local/lib/python3.9/site-packages/unidic/ and rename it to unidic.zip 3, change /usr/local/lib/python3.9/site-packages/unidic/download.py line 93 , function download_version, comment all except download_and_clean(), 4, change the download_and_clean two parameter anything you want 5, change /usr/local/lib/python3.9/site-packages/unidic/download.py line 63, comment the download_process then execut python -m unidic download again , it will be OK

It works and help a lot

zhangguangxun commented 2 months ago

呃,我已经全部解决了!

怎么解决的呀

unidic的下载你可以参考morganwang010的方法,我试过是可行的 hugging face上的模型下载你可以考虑切换镜像源下载 参考配置代码pip install -U huggingface_hub export HF_ENDPOINT=https://hf-mirror.com nltk的下载问题可以参考知乎文章:https://zhuanlan.zhihu.com/p/347931749 我通过上述方法调通了

yiJianX commented 2 months ago

好的好的,我已经解决了,谢谢你啦

zhangguangxun @.***> 于2024年4月20日周六 17:35写道:

呃,我已经全部解决了!

怎么解决的呀

unidic的下载你可以参考morganwang010 https://github.com/morganwang010的方法,我试过是可行的 hugging face上的模型下载你可以考虑切换镜像源下载 参考配置代码pip install -U huggingface_hub export HF_ENDPOINT= https://hf-mirror.com nltk的下载问题可以参考知乎文章:https://zhuanlan.zhihu.com/p/347931749 我通过上述方法调通了

— Reply to this email directly, view it on GitHub https://github.com/myshell-ai/MeloTTS/issues/62#issuecomment-2067618337, or unsubscribe https://github.com/notifications/unsubscribe-auth/BG3L4EBUU7EMXAFWPP6AAZ3Y6IZGFAVCNFSM6AAAAABERPOI4CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRXGYYTQMZTG4 . You are receiving this because you commented.Message ID: @.***>

iskefu commented 1 month ago

首先你需要pip install unidec 然后找你的python的路径,我这里是venv所以就拿venv说 我的路径是./python_venv/Lib/site-packages 接着你需要找unidecunidec_lite两个文件夹 我当时发现是unidec_lite中有个dicdir文件夹,而unidec中没有,而且报错中显示的目标也在这个文件夹中,所以我把dicdir复制了一份到unidec文件夹中,然后就可以了。 但是因为网络问题,这个程序还要下载亚马逊和huggingface里的配置文件和模型,我尝试过手动导入,但是我代码基础差看不懂,所以还是运行不了,你们如果解决了麻烦告诉我!!提前说声感谢

感谢!我去试一下,感谢分享,有进展继续交流!

这个可以解决python -m unidic download网络错误问题, 我开魔法也解决不了,这样确实解决了 剩下的就是开魔法一路通行,还要下个几百m

easean2 commented 1 month ago

1, manaul download the unidic.zip from https://cotonoha-dic.s3-ap-northeast-1.amazonaws.com/unidic-3.1.0.zip, 2, cp unidic-3.1.0.zip to /usr/local/lib/python3.9/site-packages/unidic/ and rename it to unidic.zip 3, change /usr/local/lib/python3.9/site-packages/unidic/download.py line 93 , function download_version, comment all except download_and_clean(), 4, change the download_and_clean two parameter anything you want 5, change /usr/local/lib/python3.9/site-packages/unidic/download.py line 63, comment the download_process then execut python -m unidic download again , it will be OK

厉害!

wanglongpeng1 commented 3 weeks ago

OpenVoice version: v2版本 demo_part3 第三个cell 会出现这个问题 An error occured while synchronizing the model guillaumekln/faster-whisper-medium from the Hugging Face Hub: An error happened while trying to locate the files on the Hub and we cannot find the appropriate snapshot folder for the specified revision on the local disk. Please check your internet connection and try again. Trying to load the model directly from the local cache, if it exists.

zhengrui18 commented 2 weeks ago

首先你需要pip install unidec 然后找你的python的路径,我这里是venv所以就拿venv说 我的路径是./python_venv/Lib/site-packages 接着你需要找unidecunidec_lite两个文件夹 我当时发现是unidec_lite中有个dicdir文件夹,而unidec中没有,而且报错中显示的目标也在这个文件夹中,所以我把dicdir复制了一份到unidec文件夹中,然后就可以了。

但是因为网络问题,这个程序还要下载亚马逊和huggingface里的配置文件和模型,我尝试过手动导入,但是我代码基础差看不懂,所以还是运行不了,你们如果解决了麻烦告诉我!!提前说声感谢

解决了python -m unidic download网络错误问题,谢谢!

fire17 commented 1 week ago

1, manaul download the unidic.zip from https://cotonoha-dic.s3-ap-northeast-1.amazonaws.com/unidic-3.1.0.zip, 2, cp unidic-3.1.0.zip to /usr/local/lib/python3.9/site-packages/unidic/ and rename it to unidic.zip 3, change /usr/local/lib/python3.9/site-packages/unidic/download.py line 93 , function download_version, comment all except download_and_clean(), 4, change the download_and_clean two parameter anything you want 5, change /usr/local/lib/python3.9/site-packages/unidic/download.py line 63, comment the download_process then execut python -m unidic download again , it will be OK

Had an SSL: CERTIFICATE_VERIFY_FAILED issue when doing unidic download

python3.11 -m unidic download
download url: https://cotonoha-dic.s3-ap-northeast-1.amazonaws.com/unidic-3.1.0.zip
Dictionary version: 3.1.0+2021-08-31
Downloading UniDic v3.1.0+2021-08-31...
unidic-3.1.0.zip: 0.00B [00:00, ?B/s]
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", line 1348, in do_open
    h.request(req.get_method(), req.selector, req.data, headers,
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1303, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1349, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1298, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1058, in _send_output
    self.send(msg)
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 996, in send
    self.connect()
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1475, in connect
    self.sock = self._context.wrap_socket(self.sock,
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/ssl.py", line 517, in wrap_socket
    return self.sslsocket_class._create(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/ssl.py", line 1104, in _create
    self.do_handshake()
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/ssl.py", line 1382, 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)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/unidic/__main__.py", line 17, in <module>
    plac.call(commands[command], sys.argv[1:])
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/plac_core.py", line 436, in call
    cmd, result = parser.consume(arglist)
                  ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/plac_core.py", line 287, in consume
    return cmd, self.func(*(args + varargs + extraopts), **kwargs)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/unidic/download.py", line 104, in download_version
    download_and_clean(dictinfo['version'], dictinfo['url'])
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/unidic/download.py", line 62, in download_and_clean
    download_progress(url, fname)
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/unidic/download.py", line 38, in download_progress
    urlretrieve(url, filename=fname, reporthook=t.update_to, data=None)
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", line 241, in urlretrieve
    with contextlib.closing(urlopen(url, data)) as fp:
                            ^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", line 519, in open
    response = self._open(req, data)
               ^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", line 536, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", line 496, in _call_chain
    result = func(*args)
             ^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", line 1391, in https_open
    return self.do_open(http.client.HTTPSConnection, req,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", line 1351, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)>

Basically did what @morganwang010 suggested

added this incase someone else had SSL error and was looking for it

zhengzhezhe commented 4 days ago

呃,我已经全部解决了!

请问你是怎么解决的

Game5048-bilibili commented 4 days ago

呃,我已经全部解决了!

请问你是怎么解决的

cmd里用代理 https://github.com/myshell-ai/MeloTTS/issues/62#issuecomment-2067618337