Celianv2 commited on
Commit
5e98e17
·
verified ·
1 Parent(s): 53fdea6

fix audio py

Browse files
Files changed (1) hide show
  1. jericho/main.py +6 -3
jericho/main.py CHANGED
@@ -241,8 +241,8 @@ class RobotAudioStreamer:
241
  SAMPLE_RATE = 16000
242
  CHANNELS = 2
243
  CHUNK_SECONDS = 0.08
244
- QUEUE_AHEAD_SECONDS = 0.20
245
- RESYNC_THRESHOLD_SECONDS = 0.25
246
 
247
  def __init__(self, app: "Jericho"):
248
  self.app = app
@@ -309,7 +309,10 @@ class RobotAudioStreamer:
309
  media.start_playing()
310
  for obj in (media, getattr(media, "audio", None)):
311
  if obj is not None and hasattr(obj, "set_max_output_buffers"):
312
- obj.set_max_output_buffers(3) # limite latence tampons
 
 
 
313
  self.output_started = True
314
  except Exception as exc:
315
  self.audio_available = False
 
241
  SAMPLE_RATE = 16000
242
  CHANNELS = 2
243
  CHUNK_SECONDS = 0.08
244
+ QUEUE_AHEAD_SECONDS = 0.40
245
+ RESYNC_THRESHOLD_SECONDS = 0.50
246
 
247
  def __init__(self, app: "Jericho"):
248
  self.app = app
 
309
  media.start_playing()
310
  for obj in (media, getattr(media, "audio", None)):
311
  if obj is not None and hasattr(obj, "set_max_output_buffers"):
312
+ try:
313
+ obj.set_max_output_buffers(3) # limite latence tampons
314
+ except Exception:
315
+ pass # non bloquant si echec
316
  self.output_started = True
317
  except Exception as exc:
318
  self.audio_available = False