Open DuQingChen opened 1 year ago
同问
在 MoeGoe_GUI 仓库直接复制该文件到 Lib\site-packates\opencc\clib\share\opencc\
目录还是报错
Traceback (most recent call last):
File "E:\Code\Python\blivedm\main\Blivedm\handlers.py", line 120, in handle
await callback(self, client, command)
File "sample.py", line 71, in _on_danmaku
audio_file = load_moegoe(text)
File "E:\Code\Python\blivedm\main\MoeGoe\MoeGoe.py", line 106, in load_moegoe
stn_tst = get_text(input_text, moegoe_hps_ms, cleaned=cleaned)
File "E:\Code\Python\blivedm\main\MoeGoe\MoeGoe.py", line 25, in get_text
text_norm = text_to_sequence(input_text, hps.symbols, hps.data.text_cleaners)
File "E:\Code\Python\blivedm\main\MoeGoe\text\__init__.py", line 18, in text_to_sequence
clean_text = _clean_text(text, cleaner_names)
File "E:\Code\Python\blivedm\main\MoeGoe\text\__init__.py", line 32, in _clean_text
text = cleaner(text)
File "E:\Code\Python\blivedm\main\MoeGoe\text\cleaners.py", line 119, in shanghainese_cleaners
text = shanghainese_to_ipa(text)
File "E:\Code\Python\blivedm\main\MoeGoe\text\shanghainese.py", line 56, in shanghainese_to_ipa
text = converter.convert(text).replace('-','').replace('$',' ')
File "E:\Code\Python\blivedm\python-3.7.9\Lib\site-packages\opencc\__init__.py", line 87, in convert
retv_i = libopencc.opencc_convert_utf8(self._od, text, len(text))
OSError: exception: access violation reading 0xFFFFFFFFFFFFFFFF
在 MoeGoe_GUI 仓库直接复制该文件到
Lib\site-packates\opencc\clib\share\opencc\
目录还是报错Traceback (most recent call last): File "E:\Code\Python\blivedm\main\Blivedm\handlers.py", line 120, in handle await callback(self, client, command) File "sample.py", line 71, in _on_danmaku audio_file = load_moegoe(text) File "E:\Code\Python\blivedm\main\MoeGoe\MoeGoe.py", line 106, in load_moegoe stn_tst = get_text(input_text, moegoe_hps_ms, cleaned=cleaned) File "E:\Code\Python\blivedm\main\MoeGoe\MoeGoe.py", line 25, in get_text text_norm = text_to_sequence(input_text, hps.symbols, hps.data.text_cleaners) File "E:\Code\Python\blivedm\main\MoeGoe\text\__init__.py", line 18, in text_to_sequence clean_text = _clean_text(text, cleaner_names) File "E:\Code\Python\blivedm\main\MoeGoe\text\__init__.py", line 32, in _clean_text text = cleaner(text) File "E:\Code\Python\blivedm\main\MoeGoe\text\cleaners.py", line 119, in shanghainese_cleaners text = shanghainese_to_ipa(text) File "E:\Code\Python\blivedm\main\MoeGoe\text\shanghainese.py", line 56, in shanghainese_to_ipa text = converter.convert(text).replace('-','').replace('$',' ') File "E:\Code\Python\blivedm\python-3.7.9\Lib\site-packages\opencc\__init__.py", line 87, in convert retv_i = libopencc.opencc_convert_utf8(self._od, text, len(text)) OSError: exception: access violation reading 0xFFFFFFFFFFFFFFFF
找到解决办法了 在HuggingFace下载chinese_dialect_lexicons 分别修改text目录下shanghainese.py、cantonese.py对opencc的引用
RuntimeError : opencc/clib/share/opencc/zaonhe.json not found or not accessible. can you share zaonhe.json ? ♫♪˙‿˙♫♪