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.97k stars 472 forks source link

Python API BUG #123

Closed wukonggeo closed 1 month ago

wukonggeo commented 1 month ago

CMD>melo "Text to read" output.wav Traceback (most recent call last): File "D:\conda\envs\tts\lib\site-packages\MeCab__init.py", line 133, in init super(Tagger, self).init__(args) RuntimeError

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "\?\D:\conda\envs\tts\Scripts\melo-script.py", line 33, in sys.exit(load_entry_point('melotts', 'console_scripts', 'melo')()) File "D:\conda\envs\tts\lib\site-packages\click\core.py", line 1157, in call return self.main(args, kwargs) File "D:\conda\envs\tts\lib\site-packages\click\core.py", line 1078, in main rv = self.invoke(ctx) File "D:\conda\envs\tts\lib\site-packages\click\core.py", line 1434, in invoke return ctx.invoke(self.callback, ctx.params) File "D:\conda\envs\tts\lib\site-packages\click\core.py", line 783, in invoke return __callback(args, **kwargs) File "c:\users\user\downloads\openai\tts\melotts-main\melo\main.py", line 28, in main from melo.api import TTS File "c:\users\user\downloads\openai\tts\melotts-main\melo\api.py", line 13, in from . import utils File "c:\users\user\downloads\openai\tts\melotts-main\melo\utils.py", line 13, in from melo.text.cleaner import clean_text File "c:\users\user\downloads\openai\tts\melotts-main\melo\text\cleaner.py", line 1, in from . import chinese, japanese, english, chinese_mix, korean, french, spanish File "c:\users\user\downloads\openai\tts\melotts-main\melo\text\japanese.py", line 367, in _TAGGER = MeCab.Tagger() File "D:\conda\envs\tts\lib\site-packages\MeCab__init.py", line 135, in init__ raise RuntimeError(error_info(rawargs)) from ee RuntimeError:

Failed initializing MeCab. Please see the README for possible solutions:

https://github.com/SamuraiT/mecab-python3#common-issues

If you are still having trouble, please file an issue here, and include the ERROR DETAILS below:

https://github.com/SamuraiT/mecab-python3/issues

issueを英語で書く必要はありません。

------------------- ERROR DETAILS ------------------------ arguments: [ifs] no such file or directory: D:\conda\envs\tts\lib\site-packages\unidic\dicdir\mecabrc

MANGOMONKEY9 commented 1 month ago

The error occurs as it could not initialise the mecab library, which usually arises from the inability to locate the dictionary configuration or the files itself.

try running this in your terminal before running the code again

python -m unidic download
wukonggeo commented 1 month ago

The error occurs as it could not initialise the mecab library, which usually arises from the inability to locate the dictionary configuration or the files itself.

try running this in your terminal before running the code again

python -m unidic download

Thank you very much for your reply. The problem has been solved . I hope the official can add these frequently asked questions to the FAQ.