Skip to content
Snippets Groups Projects
Commit c6762962 authored by Andres Marafioti's avatar Andres Marafioti
Browse files

only import local audio streamer if needed

parent de59df29
No related branches found
No related tags found
No related merge requests found
...@@ -37,7 +37,6 @@ from transformers import ( ...@@ -37,7 +37,6 @@ from transformers import (
from parler_tts import ParlerTTSForConditionalGeneration, ParlerTTSStreamer from parler_tts import ParlerTTSForConditionalGeneration, ParlerTTSStreamer
import librosa import librosa
from local_audio_streamer import LocalAudioStreamer
from utils import VADIterator, int2float, next_power_of_2 from utils import VADIterator, int2float, next_power_of_2
# Ensure that the necessary NLTK resources are available # Ensure that the necessary NLTK resources are available
...@@ -746,6 +745,8 @@ def main(): ...@@ -746,6 +745,8 @@ def main():
lm_response_queue = Queue() lm_response_queue = Queue()
if module_kwargs.mode == "local": if module_kwargs.mode == "local":
from local_audio_streamer import LocalAudioStreamer
local_audio_streamer = LocalAudioStreamer( local_audio_streamer = LocalAudioStreamer(
input_queue=recv_audio_chunks_queue, output_queue=send_audio_chunks_queue input_queue=recv_audio_chunks_queue, output_queue=send_audio_chunks_queue
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment