Skip to content

Commit b66728d

Browse files
authored
Use deepgram (#46)
* Use deepgram * Switch Deepgram STT to nova-3 multi
1 parent 45eb65b commit b66728d

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ A complete starter project for building voice AI apps with [LiveKit Agents for P
99
The starter project includes:
1010

1111
- A simple voice AI assistant, ready for extension and customization
12-
- A voice AI pipeline with [models](https://docs.livekit.io/agents/models) from OpenAI, Cartesia, and AssemblyAI served through LiveKit Cloud
12+
- A voice AI pipeline with [models](https://docs.livekit.io/agents/models) from OpenAI, Cartesia, and Deepgram served through LiveKit Cloud
1313
- Easily integrate your preferred [LLM](https://docs.livekit.io/agents/models/llm/), [STT](https://docs.livekit.io/agents/models/stt/), and [TTS](https://docs.livekit.io/agents/models/tts/) instead, or swap to a realtime model like the [OpenAI Realtime API](https://docs.livekit.io/agents/models/realtime/openai)
1414
- Eval suite based on the LiveKit Agents [testing & evaluation framework](https://docs.livekit.io/agents/build/testing/)
1515
- [LiveKit Turn Detector](https://docs.livekit.io/agents/build/turns/turn-detector/) for contextually-aware speaker detection, with multilingual support

src/agent.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ async def my_agent(ctx: JobContext):
6565
"room": ctx.room.name,
6666
}
6767

68-
# Set up a voice AI pipeline using OpenAI, Cartesia, AssemblyAI, and the LiveKit turn detector
68+
# Set up a voice AI pipeline using OpenAI, Cartesia, Deepgram, and the LiveKit turn detector
6969
session = AgentSession(
7070
# Speech-to-text (STT) is your agent's ears, turning the user's speech into text that the LLM can understand
7171
# See all available models at https://docs.livekit.io/agents/models/stt/
72-
stt=inference.STT(model="assemblyai/universal-streaming", language="en"),
72+
stt=inference.STT(model="deepgram/nova-3", language="multi"),
7373
# A Large Language Model (LLM) is your agent's brain, processing user input and generating a response
7474
# See all available models at https://docs.livekit.io/agents/models/llm/
7575
llm=inference.LLM(model="openai/gpt-4.1-mini"),
@@ -111,9 +111,12 @@ async def my_agent(ctx: JobContext):
111111
room=ctx.room,
112112
room_options=room_io.RoomOptions(
113113
audio_input=room_io.AudioInputOptions(
114-
noise_cancellation=lambda params: noise_cancellation.BVCTelephony()
115-
if params.participant.kind == rtc.ParticipantKind.PARTICIPANT_KIND_SIP
116-
else noise_cancellation.BVC(),
114+
noise_cancellation=lambda params: (
115+
noise_cancellation.BVCTelephony()
116+
if params.participant.kind
117+
== rtc.ParticipantKind.PARTICIPANT_KIND_SIP
118+
else noise_cancellation.BVC()
119+
),
117120
),
118121
),
119122
)

0 commit comments

Comments
 (0)