andito HF staff commited on
Commit
13a1a62
1 Parent(s): effc345

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. audio_streaming_client.py +3 -2
  2. handler.py +1 -1
audio_streaming_client.py CHANGED
@@ -55,8 +55,9 @@ class AudioStreamingClient:
55
  buffer = b''
56
  while not self.stop_event.is_set():
57
  if self.session_state != "processing" and not self.send_queue.empty():
58
- chunk = self.send_queue.get().tobytes()
59
- buffer += chunk
 
60
  if len(buffer) >= self.args.chunk_size * 2: # * 2 because of int16
61
  self.send_request(buffer)
62
  buffer = b''
 
55
  buffer = b''
56
  while not self.stop_event.is_set():
57
  if self.session_state != "processing" and not self.send_queue.empty():
58
+ while not self.send_queue.empty(): # Clear the send_queue
59
+ chunk = self.send_queue.get().tobytes()
60
+ buffer += chunk
61
  if len(buffer) >= self.args.chunk_size * 2: # * 2 because of int16
62
  self.send_request(buffer)
63
  buffer = b''
handler.py CHANGED
@@ -23,7 +23,7 @@ class EndpointHandler:
23
  self.parler_tts_handler_kwargs,
24
  self.melo_tts_handler_kwargs,
25
  self.chat_tts_handler_kwargs,
26
- ) = get_default_arguments(mode='none', log_level='DEBUG', lm_model_name='meta-llama/Meta-Llama-3.1-8B-Instruct', tts_model_name='ylacombe/parler-tiny-v1-jenny')
27
 
28
  setup_logger(self.module_kwargs.log_level)
29
 
 
23
  self.parler_tts_handler_kwargs,
24
  self.melo_tts_handler_kwargs,
25
  self.chat_tts_handler_kwargs,
26
+ ) = get_default_arguments(mode='none', log_level='DEBUG', lm_model_name='meta-llama/Meta-Llama-3.1-8B-Instruct', tts_compile_mode='default', stt_compile_mode='reduce-overhead', tts_model_name='ylacombe/parler-tiny-v1-jenny')
27
 
28
  setup_logger(self.module_kwargs.log_level)
29