diff --git a/.changeset/grumpy-gorillas-guess.md b/.changeset/grumpy-gorillas-guess.md new file mode 100644 index 000000000..a9d092673 --- /dev/null +++ b/.changeset/grumpy-gorillas-guess.md @@ -0,0 +1,5 @@ +--- +"livekit-agents": patch +--- + +disable preemptive_synthesis by default diff --git a/livekit-agents/livekit/agents/pipeline/pipeline_agent.py b/livekit-agents/livekit/agents/pipeline/pipeline_agent.py index 2715652f5..13bad4106 100644 --- a/livekit-agents/livekit/agents/pipeline/pipeline_agent.py +++ b/livekit-agents/livekit/agents/pipeline/pipeline_agent.py @@ -140,7 +140,7 @@ def __init__( interrupt_speech_duration: float = 0.5, interrupt_min_words: int = 0, min_endpointing_delay: float = 0.5, - preemptive_synthesis: bool = True, + preemptive_synthesis: bool = False, transcription: AgentTranscriptionOptions = AgentTranscriptionOptions(), before_llm_cb: BeforeLLMCallback = _default_before_llm_cb, before_tts_cb: BeforeTTSCallback = _default_before_tts_cb, @@ -433,6 +433,11 @@ def _on_final_transcript(ev: stt.SpeechEvent) -> None: if not new_transcript: return + logger.debug( + "received user transcript", + extra={"user_transcript": new_transcript}, + ) + self._transcribed_text += ( " " if self._transcribed_text else "" ) + new_transcript @@ -586,7 +591,6 @@ async def _synthesize_answer_task( logger.debug( "synthesizing agent reply", extra={ - "user_transcript": handle.user_question, "speech_id": handle.id, "elapsed": elapsed, },