Skip to content

Commit

Permalink
voiceassistant: fix mark_audio_segment_end with no audio data (#719)
Browse files Browse the repository at this point in the history
  • Loading branch information
theomonnom authored Sep 8, 2024
1 parent fcea4ce commit bee84ba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/weak-meals-film.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"livekit-agents": patch
---

voiceassistant: fix mark_audio_segment_end with no audio data
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ async def _read_generated_audio_task():

handle._buf_ch.send_nowait(audio.frame)

if handle._tr_fwd and not handle._tr_fwd.closed:
if handle._tr_fwd and not handle._tr_fwd.closed and not first_frame:
handle._tr_fwd.mark_audio_segment_end()

@utils.log_exceptions(logger=logger)
Expand Down

0 comments on commit bee84ba

Please sign in to comment.