Skip to content

Commit 1ded162

Browse files
committed
clean up & remove join delay
1 parent 8a73523 commit 1ded162

2 files changed

Lines changed: 3 additions & 19 deletions

File tree

examples/wakeword_agent_dispatch/.env.example

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,3 @@ LIVEKIT_WAKEWORD_THRESHOLD=0.5
1515
LIVEKIT_WAKEWORD_PREROLL_SECONDS=2.0
1616
LIVEKIT_PRECONNECT_BUFFER_SECONDS=10.0
1717
LIVEKIT_AGENT_WAIT_TIMEOUT=30.0
18-
LIVEKIT_AGENT_JOIN_DELAY_SECONDS=2.0
19-
20-
# Voice pipeline model settings for agent.py
21-
LIVEKIT_AGENT_STT_MODEL=deepgram/nova-3
22-
LIVEKIT_AGENT_LLM_MODEL=openai/gpt-4o-mini
23-
LIVEKIT_AGENT_TTS_MODEL=cartesia/sonic-2
24-
25-
# Provider API keys used by the default voice pipeline models
26-
DEEPGRAM_API_KEY=
27-
OPENAI_API_KEY=
28-
CARTESIA_API_KEY=

examples/wakeword_agent_dispatch/agent.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ def __init__(self) -> None:
2828
"'bye livekit' or otherwise clearly asks to end the conversation, call "
2929
"the end_session tool immediately."
3030
),
31-
stt=os.getenv("LIVEKIT_AGENT_STT_MODEL", "deepgram/nova-3"),
32-
llm=os.getenv("LIVEKIT_AGENT_LLM_MODEL", "openai/gpt-4o-mini"),
33-
tts=os.getenv("LIVEKIT_AGENT_TTS_MODEL", "cartesia/sonic-2"),
31+
stt="deepgram/nova-3",
32+
llm="openai/gpt-4o-mini",
33+
tts="cartesia/sonic-2",
3434
)
3535

3636
@function_tool(name="end_session")
@@ -49,7 +49,6 @@ async def end_session(self, ctx: RunContext) -> None:
4949
async def entrypoint(ctx: JobContext) -> None:
5050
session = AgentSession()
5151
closed = asyncio.get_running_loop().create_future()
52-
join_delay = float(os.getenv("LIVEKIT_AGENT_JOIN_DELAY_SECONDS", "2.0"))
5352
pre_connect_audio_timeout = float(
5453
os.getenv("LIVEKIT_AGENT_PRECONNECT_AUDIO_TIMEOUT_SECONDS", "10.0")
5554
)
@@ -71,10 +70,6 @@ def _on_user_input_transcribed(ev) -> None:
7170
def _on_conversation_item_added(ev) -> None:
7271
logger.info("conversation item added: %s", ev.item)
7372

74-
if join_delay > 0:
75-
logger.info("delaying agent room join by %.1f seconds", join_delay)
76-
await asyncio.sleep(join_delay)
77-
7873
await session.start(
7974
agent=BasicAssistant(),
8075
room=ctx.room,

0 commit comments

Comments
 (0)