Skip to content

Commit f60f0c9

Browse files
committed
make deepgram / gateway the defaults in readme and examples
1 parent efa8a4b commit f60f0c9

14 files changed

Lines changed: 48 additions & 114 deletions

README.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -144,16 +144,13 @@ export default defineAgent({
144144
const session = new voice.AgentSession({
145145
// Speech-to-text (STT) is your agent's ears, turning the user's speech into text that the LLM can understand
146146
// See all available models at https://docs.livekit.io/agents/models/stt/
147-
// stt: new inference.STT({ model: 'assemblyai/universal-streaming:en', language: 'en' }),
148-
stt: 'assemblyai/universal-streaming:en',
147+
stt: new inference.STT({ model: 'deepgram/flux-general', language: 'en' }),
149148
// A Large Language Model (LLM) is your agent's brain, processing user input and generating a response
150149
// See all available models at https://docs.livekit.io/agents/models/llm/
151-
// llm: new inference.LLM({ model: 'openai/gpt-4.1-mini' }),
152-
llm: 'openai/gpt-4.1-mini',
150+
llm: new inference.LLM({ model: 'openai/gpt-4.1-mini' }),
153151
// Text-to-speech (TTS) is your agent's voice, turning the LLM's text into speech that the user can hear
154152
// See all available models as well as voice selections at https://docs.livekit.io/agents/models/tts/
155-
// tts: new inference.TTS({ model: 'cartesia/sonic-2:9626c31c-bec5-4cca-baa8-f8ba9e84c8bc', voice: '9626c31c-bec5-4cca-baa8-f8ba9e84c8bc' }),
156-
tts: 'cartesia/sonic-2:9626c31c-bec5-4cca-baa8-f8ba9e84c8bc',
153+
tts: new inference.TTS({ model: 'cartesia/sonic-3', voice: '9626c31c-bec5-4cca-baa8-f8ba9e84c8bc' }),
157154
// VAD and turn detection are used to determine when the user is speaking and when the agent should respond
158155
// See more at https://docs.livekit.io/agents/build/turns
159156
vad: ctx.proc.userData.vad! as silero.VAD,
@@ -250,9 +247,9 @@ export default defineAgent({
250247

251248
const session = new voice.AgentSession({
252249
vad: ctx.proc.userData.vad! as silero.VAD,
253-
stt: new deepgram.STT(),
254-
llm: new openai.LLM(),
255-
tts: new elevenlabs.TTS(),
250+
stt: new inference.STT({ model: 'deepgram/flux-general', language: 'en' }),
251+
llm: new inference.LLM({ model: 'openai/gpt-4.1-mini' }),
252+
tts: new inference.TTS({ model: 'cartesia/sonic-3', voice: '9626c31c-bec5-4cca-baa8-f8ba9e84c8bc' }),
256253
userData: userdata,
257254
});
258255

examples/src/anam_realtime_agent.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@ import {
77
WorkerOptions,
88
cli,
99
defineAgent,
10+
inference,
1011
voice,
1112
} from '@livekit/agents';
1213
import * as anam from '@livekit/agents-plugin-anam';
13-
import * as deepgram from '@livekit/agents-plugin-deepgram';
14-
import * as elevenlabs from '@livekit/agents-plugin-elevenlabs';
1514
import * as livekit from '@livekit/agents-plugin-livekit';
1615
import * as openai from '@livekit/agents-plugin-openai';
1716
import * as silero from '@livekit/agents-plugin-silero';
@@ -30,8 +29,8 @@ export default defineAgent({
3029

3130
const session = new voice.AgentSession({
3231
vad: ctx.proc.userData.vad! as silero.VAD,
33-
stt: new deepgram.STT(),
34-
tts: new elevenlabs.TTS(),
32+
stt: new inference.STT({ model: 'deepgram/flux-general', language: 'en' }),
33+
tts: new inference.TTS({ model: 'cartesia/sonic-3', voice: '9626c31c-bec5-4cca-baa8-f8ba9e84c8bc' }),
3534
// To use OpenAI Realtime API
3635
llm: new openai.realtime.RealtimeModel({
3736
voice: 'alloy',

examples/src/background_audio.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ export default defineAgent({
4545

4646
const session = new voice.AgentSession({
4747
llm: 'deepseek-ai/deepseek-v3',
48-
stt: 'deepgram/nova-3',
49-
tts: 'cartesia',
48+
stt: 'deepgram/flux-general',
49+
tts: 'cartesia/sonic-3',
5050
});
5151
await session.start({ agent, room: ctx.room });
5252

examples/src/basic_agent.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
WorkerOptions,
88
cli,
99
defineAgent,
10+
inference,
1011
llm,
1112
metrics,
1213
voice,
@@ -42,15 +43,15 @@ export default defineAgent({
4243
// Speech-to-text (STT) is your agent's ears, turning the user's speech into text that the LLM can understand
4344
// See all available models at https://docs.livekit.io/agents/models/stt/
4445
// stt: new inference.STT({ model: 'assemblyai/universal-streaming:en', language: 'en' }),
45-
stt: 'assemblyai/universal-streaming:en',
46+
stt: new inference.STT({ model: 'deepgram/flux-general', language: 'en' }),
4647
// A Large Language Model (LLM) is your agent's brain, processing user input and generating a response
4748
// See all available models at https://docs.livekit.io/agents/models/llm/
4849
// llm: new inference.LLM({ model: 'openai/gpt-4.1-mini' }),
49-
llm: 'openai/gpt-4.1-mini',
50+
llm: new inference.LLM({ model: 'openai/gpt-4.1-mini' }),
5051
// Text-to-speech (TTS) is your agent's voice, turning the LLM's text into speech that the user can hear
5152
// See all available models as well as voice selections at https://docs.livekit.io/agents/models/tts/
5253
// tts: new inference.TTS({ model: 'cartesia/sonic-2:9626c31c-bec5-4cca-baa8-f8ba9e84c8bc', voice: '9626c31c-bec5-4cca-baa8-f8ba9e84c8bc' }),
53-
tts: 'cartesia/sonic-2:9626c31c-bec5-4cca-baa8-f8ba9e84c8bc',
54+
tts: new inference.TTS({ model: 'cartesia/sonic-3', voice: '9626c31c-bec5-4cca-baa8-f8ba9e84c8bc' }),
5455
// VAD and turn detection are used to determine when the user is speaking and when the agent should respond
5556
// See more at https://docs.livekit.io/agents/build/turns
5657
vad: ctx.proc.userData.vad! as silero.VAD,

examples/src/basic_tool_call_agent.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
cli,
99
defineAgent,
1010
llm,
11+
inference,
1112
voice,
1213
} from '@livekit/agents';
1314
import * as livekit from '@livekit/agents-plugin-livekit';
@@ -136,9 +137,9 @@ export default defineAgent({
136137

137138
const session = new voice.AgentSession({
138139
vad,
139-
stt: 'assemblyai/universal-streaming:en',
140-
llm: 'google/gemini-3-flash-preview',
141-
tts: 'cartesia/sonic-2:9626c31c-bec5-4cca-baa8-f8ba9e84c8bc',
140+
stt: new inference.STT({ model: 'deepgram/flux-general', language: 'en' }),
141+
llm: new inference.LLM({ model: 'google/gemini-3-flash-preview' }),
142+
tts: new inference.TTS({ model: 'cartesia/sonic-3', voice: '9626c31c-bec5-4cca-baa8-f8ba9e84c8bc' }),
142143
turnDetection: new livekit.turnDetector.MultilingualModel(),
143144
userData: { number: 0 },
144145
voiceOptions: {

examples/src/cartersia_tts.ts

Lines changed: 0 additions & 62 deletions
This file was deleted.

examples/src/custom_text_handler.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
WorkerOptions,
88
cli,
99
defineAgent,
10+
inference,
1011
voice,
1112
} from '@livekit/agents';
1213
import * as livekit from '@livekit/agents-plugin-livekit';
@@ -51,9 +52,9 @@ export default defineAgent({
5152

5253
const session = new voice.AgentSession({
5354
vad,
54-
stt: 'cartesia/ink-whisper:en',
55-
llm: 'openai/gpt-4.1-mini',
56-
tts: 'cartesia/sonic-2:794f9389-aac1-45b6-b726-9d9369183238',
55+
stt: new inference.STT({ model: 'deepgram/flux-general', language: 'en' }),
56+
llm: new inference.LLM({ model: 'openai/gpt-4.1-mini' }),
57+
tts: new inference.TTS({ model: 'cartesia/sonic-3', voice: '9626c31c-bec5-4cca-baa8-f8ba9e84c8bc' }),
5758
turnDetection: new livekit.turnDetector.MultilingualModel(),
5859
});
5960

examples/src/hedra/hedra_avatar.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,15 @@ export default defineAgent({
3232

3333
const session = new voice.AgentSession({
3434
stt: new inference.STT({
35-
model: 'deepgram/nova-3',
35+
model: 'deepgram/flux-general',
3636
language: 'en',
3737
}),
3838
llm: new inference.LLM({
3939
model: 'openai/gpt-4o-mini',
4040
}),
4141
tts: new inference.TTS({
4242
model: 'cartesia/sonic-3',
43+
voice: '9626c31c-bec5-4cca-baa8-f8ba9e84c8bc',
4344
}),
4445
vad: ctx.proc.userData.vad! as silero.VAD,
4546
turnDetection: new livekit.turnDetector.MultilingualModel(),

examples/src/idle_user_timeout_example.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ import {
1414
cli,
1515
defineAgent,
1616
delay,
17+
inference,
1718
log,
1819
voice,
1920
} from '@livekit/agents';
20-
import * as openai from '@livekit/agents-plugin-openai';
2121
import * as silero from '@livekit/agents-plugin-silero';
2222
import { fileURLToPath } from 'node:url';
2323

@@ -31,9 +31,9 @@ export default defineAgent({
3131

3232
const session = new voice.AgentSession({
3333
vad,
34-
llm: new openai.LLM({ model: 'gpt-4o-mini' }),
35-
stt: 'assemblyai/universal-streaming:en',
36-
tts: 'cartesia/sonic-2:9626c31c-bec5-4cca-baa8-f8ba9e84c8bc',
34+
llm: new inference.LLM({ model: 'openai/gpt-4.1-mini' }),
35+
stt: new inference.STT({ model: 'deepgram/flux-general', language: 'en' }),
36+
tts: new inference.TTS({ model: 'cartesia/sonic-3', voice: '9626c31c-bec5-4cca-baa8-f8ba9e84c8bc' }),
3737

3838
voiceOptions: {
3939
userAwayTimeout: 12.5,

examples/src/lemonslice_realtime_avatar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default defineAgent({
3030

3131
const session = new voice.AgentSession({
3232
stt: new inference.STT({
33-
model: 'assemblyai/universal-streaming',
33+
model: 'deepgram/flux-general',
3434
language: 'en',
3535
}),
3636
llm: new inference.LLM({

0 commit comments

Comments
 (0)