Skip to content

Commit 8283a5a

Browse files
authored
Update LemonSlice integration to use wait_playback_start (#5655)
1 parent 193eb86 commit 8283a5a

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

  • examples/avatar_agents/lemonslice
  • livekit-plugins/livekit-plugins-lemonslice/livekit/plugins/lemonslice

examples/avatar_agents/lemonslice/agent_worker.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,15 @@
33

44
from dotenv import load_dotenv
55

6-
from livekit.agents import Agent, AgentServer, AgentSession, JobContext, cli, inference
6+
from livekit.agents import (
7+
Agent,
8+
AgentServer,
9+
AgentSession,
10+
JobContext,
11+
TurnHandlingOptions,
12+
cli,
13+
inference,
14+
)
715
from livekit.plugins import lemonslice
816

917
logger = logging.getLogger("lemonslice-avatar-example")
@@ -21,7 +29,11 @@ async def entrypoint(ctx: JobContext):
2129
stt=inference.STT("deepgram/nova-3"),
2230
llm=inference.LLM("google/gemini-2.5-flash"),
2331
tts=inference.TTS("cartesia/sonic-3"),
24-
resume_false_interruption=False,
32+
turn_handling=TurnHandlingOptions(
33+
interruption={
34+
"resume_false_interruption": False,
35+
},
36+
),
2537
)
2638

2739
lemonslice_image_url = os.getenv("LEMONSLICE_IMAGE_URL")

livekit-plugins/livekit-plugins-lemonslice/livekit/plugins/lemonslice/avatar.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ async def start( # type: ignore[override]
112112
sample_rate=SAMPLE_RATE,
113113
wait_remote_track=rtc.TrackKind.KIND_VIDEO,
114114
clear_buffer_timeout=None,
115+
wait_playback_start=True,
115116
)
116117

117118
return session_id

0 commit comments

Comments
 (0)