Skip to content

Commit c04c808

Browse files
authored
Merge pull request #29 from livekit-examples/bcherry/sonic-3
Use sonic-3 by default
2 parents cd59007 + d80ee18 commit c04c808

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/agent.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
RoomInputOptions,
1111
WorkerOptions,
1212
cli,
13+
inference,
1314
metrics,
1415
)
1516
from livekit.plugins import noise_cancellation, silero
@@ -62,13 +63,15 @@ async def entrypoint(ctx: JobContext):
6263
session = AgentSession(
6364
# Speech-to-text (STT) is your agent's ears, turning the user's speech into text that the LLM can understand
6465
# See all available models at https://docs.livekit.io/agents/models/stt/
65-
stt="assemblyai/universal-streaming:en",
66+
stt=inference.STT(model="assemblyai/universal-streaming", language="en"),
6667
# A Large Language Model (LLM) is your agent's brain, processing user input and generating a response
6768
# See all available models at https://docs.livekit.io/agents/models/llm/
68-
llm="openai/gpt-4.1-mini",
69+
llm=inference.LLM(model="openai/gpt-4.1-mini"),
6970
# Text-to-speech (TTS) is your agent's voice, turning the LLM's text into speech that the user can hear
7071
# See all available models as well as voice selections at https://docs.livekit.io/agents/models/tts/
71-
tts="cartesia/sonic-2:9626c31c-bec5-4cca-baa8-f8ba9e84c8bc",
72+
tts=inference.TTS(
73+
model="cartesia/sonic-3", voice="9626c31c-bec5-4cca-baa8-f8ba9e84c8bc"
74+
),
7275
# VAD and turn detection are used to determine when the user is speaking and when the agent should respond
7376
# See more at https://docs.livekit.io/agents/build/turns
7477
turn_detection=MultilingualModel(),

0 commit comments

Comments
 (0)