From 6a7b0189e134fe2004e76095318c201c31813ad0 Mon Sep 17 00:00:00 2001 From: David Zhao Date: Wed, 5 Feb 2025 22:26:23 -0800 Subject: [PATCH] fix agent transcription could not be disabled (#1448) --- .changeset/five-rats-impress.md | 5 +++++ livekit-agents/livekit/agents/pipeline/agent_output.py | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 .changeset/five-rats-impress.md diff --git a/.changeset/five-rats-impress.md b/.changeset/five-rats-impress.md new file mode 100644 index 000000000..0ff42022e --- /dev/null +++ b/.changeset/five-rats-impress.md @@ -0,0 +1,5 @@ +--- +"livekit-agents": patch +--- + +fix agent transcription could not be disabled diff --git a/livekit-agents/livekit/agents/pipeline/agent_output.py b/livekit-agents/livekit/agents/pipeline/agent_output.py index 14a836ef7..5f10e20bb 100644 --- a/livekit-agents/livekit/agents/pipeline/agent_output.py +++ b/livekit-agents/livekit/agents/pipeline/agent_output.py @@ -131,12 +131,12 @@ def synthesize( ) -> SynthesisHandle: def _before_forward( fwd: agent_transcription.TTSSegmentsForwarder, - transcription: rtc.Transcription, + rtc_transcription: rtc.Transcription, ): if not transcription: - transcription.segments = [] + rtc_transcription.segments = [] - return transcription + return rtc_transcription transcription_fwd = agent_transcription.TTSSegmentsForwarder( room=self._room,