transport(base_output): push audio downstream

This commit is contained in:
Aleix Conchillo Flaqué
2024-08-05 14:00:09 -07:00
parent d4979f5e64
commit 881248cbd6
2 changed files with 6 additions and 0 deletions

View File

@@ -203,6 +203,7 @@ class BaseOutputTransport(FrameProcessor):
frame = await self._sink_queue.get()
if isinstance(frame, AudioRawFrame):
await self.write_raw_audio_frames(frame.audio)
await self._internal_push_frame(frame)
await self.push_frame(BotSpeakingFrame(), FrameDirection.UPSTREAM)
elif isinstance(frame, ImageRawFrame):
await self._set_camera_image(frame)
@@ -329,6 +330,7 @@ class BaseOutputTransport(FrameProcessor):
try:
frame = await self._audio_out_queue.get()
await self.write_raw_audio_frames(frame.audio)
await self._internal_push_frame(frame)
await self.push_frame(BotSpeakingFrame(), FrameDirection.UPSTREAM)
except asyncio.CancelledError:
break