diff --git a/TTS/melotts.py b/TTS/melotts.py index 1531bb9f9ed4049f9182ff6a2826c43003127580..70b29f5994202d4309600b8cbe55673917086e14 100644 --- a/TTS/melotts.py +++ b/TTS/melotts.py @@ -1,4 +1,4 @@ -from MeloTTS.melo.api import TTS +from melo.api import TTS import logging from baseHandler import BaseHandler import librosa diff --git a/requirements.txt b/requirements.txt index e36b3d50d29ba133071a8a80c78b68b486f258d3..7f0611a35a1e6671a511aaa2e59f1c716e39da49 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ nltk==3.8.1 parler_tts @ git+https://github.com/huggingface/parler-tts.git -melotts @ git+https://github.com/andimarafioti/MeloTTS.git # made a copy of MeloTTS to have compatible versions of transformers +melotts @ git+https://github.com/andimarafioti/MeloTTS.git#egg=MeloTTS # made a copy of MeloTTS to have compatible versions of transformers torch==2.4.0 sounddevice==0.5.0 lightning-whisper-mlx==0.0.10 diff --git a/s2s_pipeline.py b/s2s_pipeline.py index b08d0f953ca0f4424eb9472d65de74752f857500..14a5e2b79919317cd05c9c78372ae3cd1dbe1428 100644 --- a/s2s_pipeline.py +++ b/s2s_pipeline.py @@ -962,7 +962,7 @@ def main(): ) if module_kwargs.llm != "mlx-lm": logger.warning( - "For macOS users, it is recommended to use mlx-lm." + "For macOS users, it is recommended to use mlx-lm. You can activate it by passing --llm mlx-lm." ) if module_kwargs.tts != "melo": logger.warning( @@ -1068,7 +1068,11 @@ def main(): ) elif module_kwargs.tts == 'melo': - from TTS.melotts import MeloTTSHandler + try: + from TTS.melotts import MeloTTSHandler + except RuntimeError as e: + logger.error(f"Error importing MeloTTSHandler. You might need to run: python -m unidic download") + raise e tts = MeloTTSHandler( stop_event, queue_in=lm_response_queue,