RVC-Boss / GPT-SoVITS

1 min voice data can also be used to train a good TTS model! (few shot voice cloning)
MIT License
33.24k stars 3.82k forks source link

M1运行,报错File is not a zip file,No such file or directory: 'logs/xxx/2-name2text-0.txt' #763

Closed Danny0802 closed 6 months ago

Danny0802 commented 6 months ago

完整错误日志如下: "/Users/dannyxch/anaconda3/envs/GPTSoVits/bin/python" GPT_SoVITS/prepare_datasets/1-get-text.py "/Users/dannyxch/anaconda3/envs/GPTSoVits/bin/python" GPT_SoVITS/prepare_datasets/1-get-text.py Traceback (most recent call last): Traceback (most recent call last): File "/Users/dannyxch/PycharmProjects/GPT-SoVITS/GPT_SoVITS/prepare_datasets/1-get-text.py", line 18, in File "/Users/dannyxch/PycharmProjects/GPT-SoVITS/GPT_SoVITS/prepare_datasets/1-get-text.py", line 18, in from text.cleaner import clean_text File "/Users/dannyxch/PycharmProjects/GPT-SoVITS/GPT_SoVITS/text/cleaner.py", line 1, in from text.cleaner import clean_text File "/Users/dannyxch/PycharmProjects/GPT-SoVITS/GPT_SoVITS/text/cleaner.py", line 1, in from text import chinese, japanese, cleaned_text_to_sequence, symbols, english from text import chinese, japanese, cleaned_text_to_sequence, symbols, english File "/Users/dannyxch/PycharmProjects/GPT-SoVITS/GPT_SoVITS/text/english.py", line 4, in File "/Users/dannyxch/PycharmProjects/GPT-SoVITS/GPT_SoVITS/text/english.py", line 4, in from g2p_en import G2p from g2p_en import G2p File "/Users/dannyxch/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/g2p_en/init.py", line 1, in File "/Users/dannyxch/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/g2p_en/init.py", line 1, in from .g2p import G2p File "/Users/dannyxch/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/g2p_en/g2p.py", line 26, in from .g2p import G2p File "/Users/dannyxch/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/g2p_en/g2p.py", line 26, in nltk.data.find('corpora/cmudict.zip') File "/Users/dannyxch/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/nltk/data.py", line 542, in find nltk.data.find('corpora/cmudict.zip') File "/Users/dannyxch/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/nltk/data.py", line 542, in find return ZipFilePathPointer(p, zipentry) File "/Users/dannyxch/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/nltk/compat.py", line 41, in _decorator return ZipFilePathPointer(p, zipentry) File "/Users/dannyxch/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/nltk/compat.py", line 41, in _decorator return init_func(*args, kwargs) File "/Users/dannyxch/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/nltk/data.py", line 394, in init return init_func(*args, *kwargs) File "/Users/dannyxch/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/nltk/data.py", line 394, in init zipfile = OpenOnDemandZipFile(os.path.abspath(zipfile)) File "/Users/dannyxch/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/nltk/compat.py", line 41, in _decorator zipfile = OpenOnDemandZipFile(os.path.abspath(zipfile)) File "/Users/dannyxch/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/nltk/compat.py", line 41, in _decorator return init_func(args, kwargs) File "/Users/dannyxch/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/nltk/data.py", line 935, in init return init_func(*args, **kwargs) File "/Users/dannyxch/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/nltk/data.py", line 935, in init zipfile.ZipFile.init(self, filename) zipfile.ZipFile.init(self, filename) File "/Users/dannyxch/anaconda3/envs/GPTSoVits/lib/python3.9/zipfile.py", line 1266, in init File "/Users/dannyxch/anaconda3/envs/GPTSoVits/lib/python3.9/zipfile.py", line 1266, in init self._RealGetContents() File "/Users/dannyxch/anaconda3/envs/GPTSoVits/lib/python3.9/zipfile.py", line 1333, in _RealGetContents self._RealGetContents() File "/Users/dannyxch/anaconda3/envs/GPTSoVits/lib/python3.9/zipfile.py", line 1333, in _RealGetContents raise BadZipFile("File is not a zip file") raise BadZipFile("File is not a zip file") zipfile.BadZipFile: File is not a zip file zipfile.BadZipFile: File is not a zip file Traceback (most recent call last): File "/Users/dannyxch/PycharmProjects/GPT-SoVITS/webui.py", line 580, in open1abc with open(txt_path, "r",encoding="utf8") as f: FileNotFoundError: [Errno 2] No such file or directory: 'logs/xxx/2-name2text-0.txt'

按照教程一步一步安装的,请问有没有人遇到过相同的问题?如何解决呢

XXXXRT666 commented 6 months ago

用搜索找到一个叫做nltk_data的文件夹,该文件夹常见于用户根目录,删除该文件夹

Danny0802 commented 6 months ago

用搜索找到一个叫做nltk_data的文件夹,该文件夹常见于用户根目录,删除该文件夹

解决了!

TouSC commented 6 months ago

删除了这个文件夹并重启了webui,还是报同样的错

TouSC commented 6 months ago

删除了这个文件夹并重启了webui,还是报同样的错

看报错信息是1-get-text.py里from text.cleaner import clean_text找不到路径 复制text文件夹到1-get-text.py同级目录可以解决

hhh315xxx commented 5 months ago

我是重新下载了chinese-roberta-wwm-ext-large模型换上去得以解决,应该是之前模型安装有文件缺失。比如config,和pytorch_model这个文件不对,所以老是报错,可以在huggingface或者镜像[https://hf-mirror.com/hfl/chinese-roberta-wwm-ext-large/tree/main下载正解的模型。而且重试时候,要把对应logs文件夹里原来生成的删除掉,重新生成最好,不删除也会报错

PengJiang520 commented 1 month ago

chinese-roberta-wwm-ext-large /opt/miniconda3/bin/python" GPT_SoVITS/prepare_datasets/1-get-text.py "/opt/miniconda3/bin/python" GPT_SoVITS/prepare_datasets/1-get-text.py [nltk_data] Downloading package averaged_perceptron_tagger to [nltk_data] /Users/mrjp/nltk_data... [nltk_data] Downloading package averaged_perceptron_tagger to [nltk_data] /Users/mrjp/nltk_data... 我一直卡在这里,不知道如何处理