simplify the join, no need for END_STREAM

This commit is contained in:
Moishe Lettvin
2024-01-09 06:12:24 -05:00
parent 534a4e2fa1
commit 20a9c6a938
3 changed files with 45 additions and 8 deletions

View File

@@ -43,11 +43,8 @@ async def main(room_url):
transport.output_queue.put(OutputQueueFrame(FrameType.AUDIO_FRAME, audio))
current_text = ""
# Put an "end stream" item on the queue, which will cause it to shut down when it's processed
# all the audio.
transport.output_queue.put(OutputQueueFrame(FrameType.END_STREAM, None))
# wait for the output queue to be empty, then leave the meeting
transport.output_queue.join()
transport.stop()
await transport.run()