Closed joygom closed 1 month ago
related issue (it closed without any solution) https://github.com/myshell-ai/MeloTTS/issues/113
I found the forder name ‘mecab’ and ‘MeCab’ in the docker. And I realize they are same on my mac, because mac filesystem setted case insensitive. I guess this is the reason why making error on mac when try korean on melo-ui. Saddly I can not format my filesystem, and I don’t know how edit code. Otherwise it will be no problem on linux with case sensitive file system maybe..
It is clear, working fine with using case sensitive filesystem on apple silicon. it is useless edit any code of git sources MeloTTS. Melo-ui working perfectly include Korean.
Hello.
V1 and V2 are working fine with any language without only Korean on apple silicon include Melo-ui and demo-notebooks of openvoice. Surly I installed FFmpeg and me cab-ko by brew and I edited some code for working on apple silicon, such as se_extractor.py (cpu, int8) And edited some codes what 'using mps' to 'using cpu' for working Chinese. But I can not figure out how to working Korean. I need to help for working MeloTTS Korean in apple silicon python 3.10.14 (pyenv, virtualenv)
It seems to important thing is hide. I failed find any code about install automatically python-mecab-ko after running Korean on Melo-ui. I don't know why requirements.txt only include mecab-python twice without python-mecab-ko. And I find it is working again, when I install MeloTTS again after uninstall mecab-python3. and I have a questions why it is working even still installed python-mecab-ko.
I appreciate let me how to working Korean of melo-ui on my MacBook. (apple silicon python 3.10.14) another languages working perfectly, I think it is really amazing.
this is error messages when running Korean in Melo-ui with web browser.
최근 텍스트 음성 변환 분야가 급속도로 발전하고 있습니다.
[notice] A new release of pip is available: 23.0.1 -> 24.0 [notice] To update, run: python3.10 -m pip install --upgrade pip you have to install python-mecab-ko. "pip install python-mecab-ko" Traceback (most recent call last): File "/Users/gom/.pyenv/versions/3.10.14/envs/openvoice2/lib/python3.10/site-packages/gradio/queueing.py", line 527, in process_events response = await route_utils.call_process_api( File "/Users/gom/.pyenv/versions/3.10.14/envs/openvoice2/lib/python3.10/site-packages/gradio/route_utils.py", line 270, in call_process_api output = await app.get_blocks().process_api( File "/Users/gom/.pyenv/versions/3.10.14/envs/openvoice2/lib/python3.10/site-packages/gradio/blocks.py", line 1847, in process_api result = await self.call_function( File "/Users/gom/.pyenv/versions/3.10.14/envs/openvoice2/lib/python3.10/site-packages/gradio/blocks.py", line 1433, in call_function prediction = await anyio.to_thread.run_sync( File "/Users/gom/.pyenv/versions/3.10.14/envs/openvoice2/lib/python3.10/site-packages/anyio/to_thread.py", line 56, in run_sync return await get_async_backend().run_sync_in_worker_thread( File "/Users/gom/.pyenv/versions/3.10.14/envs/openvoice2/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 2144, in run_sync_in_worker_thread return await future File "/Users/gom/.pyenv/versions/3.10.14/envs/openvoice2/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 851, in run result = context.run(func, args) File "/Users/gom/.pyenv/versions/3.10.14/envs/openvoice2/lib/python3.10/site-packages/gradio/utils.py", line 788, in wrapper response = f(args, **kwargs) File "/Users/gom/dev/pyenv/3.10.14_OpenVoice2/MeloTTS/melo/app.py", line 33, in synthesize models[language].tts_to_file(text, models[language].hps.data.spk2id[speaker], bio, speed=speed, pbar=progress.tqdm, format='wav') File "/Users/gom/dev/pyenv/3.10.14_OpenVoice2/MeloTTS/melo/api.py", line 100, in tts_to_file bert, ja_bert, phones, tones, lang_ids = utils.get_text_for_tts_infer(t, language, self.hps, device, self.symbol_to_id) File "/Users/gom/dev/pyenv/3.10.14_OpenVoice2/MeloTTS/melo/utils.py", line 23, in get_text_for_tts_infer norm_text, phone, tone, word2ph = clean_text(text, language_str) File "/Users/gom/dev/pyenv/3.10.14_OpenVoice2/MeloTTS/melo/text/cleaner.py", line 12, in clean_text phones, tones, word2ph = language_module.g2p(norm_text) File "/Users/gom/dev/pyenv/3.10.14_OpenVoice2/MeloTTS/melo/text/korean.py", line 122, in g2p phonemes = korean_text_to_phonemes(text) File "/Users/gom/dev/pyenv/3.10.14_OpenVoice2/MeloTTS/melo/text/korean.py", line 69, in korean_text_to_phonemes text = g2p_kr(text) File "/Users/gom/.pyenv/versions/3.10.14/envs/openvoice2/lib/python3.10/site-packages/g2pkk/g2pkk.py", line 129, in call string = annotate(string, self.mecab) File "/Users/gom/.pyenv/versions/3.10.14/envs/openvoice2/lib/python3.10/site-packages/g2pkk/utils.py", line 166, in annotate tokens = mecab.pos(string) AttributeError: 'NoneType' object has no attribute 'pos'
docker is fine working all language include Korean. but really very slow. messages is below.
[notice] A new release of pip is available: 23.0.1 -> 24.0 [notice] To update, run: pip install --upgrade pip pytorch_model.bin: 100%|████████████████████████████████████████████████████████████████████████████████████████████████| 476M/476M [00:41<00:00, 11.4MB/s] Some weights of the model checkpoint at kykim/bert-kor-base were not used when initializing BertForMaskedLM: ['cls.seq_relationship.bias', 'cls.seq_relationship.weight']