Skip to content

Commit

Permalink
Merge branch 'livekit:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-purplefish authored Oct 9, 2024
2 parents 9a1c5c5 + 22027a0 commit 24c3604
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/grumpy-gorillas-guess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"livekit-agents": patch
---

disable preemptive_synthesis by default
8 changes: 6 additions & 2 deletions livekit-agents/livekit/agents/pipeline/pipeline_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
},
Expand Down

0 comments on commit 24c3604

Please sign in to comment.