From cb48b916cf15b0805a6460862c7141dac33e41eb Mon Sep 17 00:00:00 2001 From: Andres Marafioti <andimarafioti@gmail.com> Date: Thu, 22 Aug 2024 19:33:35 +0200 Subject: [PATCH] create requirements_mac as a hot fix for linux users --- requirements.txt | 4 +--- requirements_mac.txt | 7 +++++++ s2s_pipeline.py | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 requirements_mac.txt diff --git a/requirements.txt b/requirements.txt index 24ba643..b4a5a0e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,6 +2,4 @@ nltk==3.9.1 parler_tts @ git+https://github.com/huggingface/parler-tts.git 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 -mlx-lm>=0.14.0 \ No newline at end of file +sounddevice==0.5.0 \ No newline at end of file diff --git a/requirements_mac.txt b/requirements_mac.txt new file mode 100644 index 0000000..24ba643 --- /dev/null +++ b/requirements_mac.txt @@ -0,0 +1,7 @@ +nltk==3.9.1 +parler_tts @ git+https://github.com/huggingface/parler-tts.git +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 +mlx-lm>=0.14.0 \ No newline at end of file diff --git a/s2s_pipeline.py b/s2s_pipeline.py index 675ef13..4f5b14b 100644 --- a/s2s_pipeline.py +++ b/s2s_pipeline.py @@ -10,7 +10,6 @@ from threading import Event, Thread from time import perf_counter from typing import Optional from sys import platform -from LLM.mlx_lm import MLXLanguageModelHandler from arguments_classes.language_model_arguments import LanguageModelHandlerArguments from arguments_classes.module_arguments import ModuleArguments from arguments_classes.parler_tts_arguments import ParlerTTSHandlerArguments @@ -19,7 +18,6 @@ from arguments_classes.socket_sender_arguments import SocketSenderArguments from arguments_classes.vad_arguments import VADHandlerArguments from arguments_classes.whisper_stt_arguments import WhisperSTTHandlerArguments from baseHandler import BaseHandler -from STT.lightning_whisper_mlx_handler import LightningWhisperSTTHandler from arguments_classes.melo_tts_arguments import MeloTTSHandlerArguments import numpy as np import torch @@ -780,6 +778,7 @@ def main(): setup_kwargs=vars(whisper_stt_handler_kwargs), ) elif module_kwargs.stt == "whisper-mlx": + from STT.lightning_whisper_mlx_handler import LightningWhisperSTTHandler stt = LightningWhisperSTTHandler( stop_event, queue_in=spoken_prompt_queue, @@ -796,6 +795,7 @@ def main(): setup_kwargs=vars(language_model_handler_kwargs), ) elif module_kwargs.llm == "mlx-lm": + from LLM.mlx_lm import MLXLanguageModelHandler lm = MLXLanguageModelHandler( stop_event, queue_in=text_prompt_queue, -- GitLab