Closed Kashouryo closed 1 year ago
I tried to use Python 3.10 venv on an Ubuntu 20.04 server and encountered the same problem.
(venv310) root@ubuntu:~/git/vits/MoeGoe# python MoeGoe.py
Path of a VITS model: /root/git/vits/cn/m.pth
Path of a config file: /root/git/vits/cn/conf.json
TTS or VC? (t/v):t
Text to read: HelloWorld!
Traceback (most recent call last):
File "/root/git/vits/MoeGoe/MoeGoe.py", line 152, in <module>
stn_tst = get_text(text, hps_ms, cleaned=cleaned)
File "/root/git/vits/MoeGoe/MoeGoe.py", line 26, in get_text
text_norm = text_to_sequence(text, hps.symbols, hps.data.text_cleaners)
File "/root/git/vits/MoeGoe/text/__init__.py", line 17, in text_to_sequence
clean_text = _clean_text(text, cleaner_names)
File "/root/git/vits/MoeGoe/text/__init__.py", line 31, in _clean_text
text = cleaner(text)
File "/root/git/vits/MoeGoe/text/cleaners.py", line 36, in zh_ja_mixture_cleaners
from text.mandarin import chinese_to_romaji
File "/root/git/vits/MoeGoe/text/mandarin.py", line 10, in <module>
jieba.set_dictionary(os.path.dirname(sys.argv[0])+'/jieba/dict.txt')
File "/root/git/vits/MoeGoe/venv310/lib/python3.10/site-packages/jieba/__init__.py", line 513, in set_dictionary
raise Exception("jieba: file does not exist: " + abs_path)
Exception: jieba: file does not exist: /jieba/dict.txt
(venv310) root@ubuntu:~/git/vits/MoeGoe#
我也是出现这个问题
Traceback (most recent call last):
File "MoeGoe.py", line 152, in
text文件夹里mandarin里读取dict的命令改为 def get_parent_directory_path(): abs_path = os.path.abspath(file) parent_dir_path = os.path.dirname(os.path.dirname(abs_path)) return parent_dir_path
logging.getLogger('jieba').setLevel(logging.WARNING) jieba.set_dictionary(get_parent_directory_path()+'\jieba\dict.txt') jieba.initialize()
我写一下我的解决方法吧, text文件夹里mandarin里读取dict的命令改为: logging.getLogger('jieba').setLevel(logging.WARNING) jieba.set_dictionary(os.getcwd()+'/jieba/dict.txt') jieba.initialize()