freddyaboulton HF Staff commited on
Commit
6d10a72
·
verified ·
1 Parent(s): b61dd28

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -90,7 +90,7 @@ class GeminiHandler(AsyncAudioVideoStreamHandler):
90
  self.video_queue.put_nowait(frame)
91
 
92
  async def video_emit(self):
93
- frame = await wait_for_item(self.video_queue)
94
  if frame is not None:
95
  return frame
96
  else:
@@ -104,9 +104,7 @@ class GeminiHandler(AsyncAudioVideoStreamHandler):
104
  await self.session.send(input=audio_message)
105
 
106
  async def emit(self):
107
- array = await wait_for_item(self.audio_queue)
108
- if array is not None:
109
- return (self.output_sample_rate, array)
110
 
111
  async def shutdown(self) -> None:
112
  if self.session:
 
90
  self.video_queue.put_nowait(frame)
91
 
92
  async def video_emit(self):
93
+ frame = await self.video_queue.get()
94
  if frame is not None:
95
  return frame
96
  else:
 
104
  await self.session.send(input=audio_message)
105
 
106
  async def emit(self):
107
+ return await self.audio_queue.get()
 
 
108
 
109
  async def shutdown(self) -> None:
110
  if self.session: