Use deepgram (#46)

* Use deepgram

* Switch Deepgram STT to nova-3 multi
This commit is contained in:
Ben Cherry
2026-02-03 15:58:03 -08:00
committed by GitHub
parent 45eb65bcf9
commit b66728d81f
2 changed files with 9 additions and 6 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ A complete starter project for building voice AI apps with [LiveKit Agents for P
The starter project includes: The starter project includes:
- A simple voice AI assistant, ready for extension and customization - A simple voice AI assistant, ready for extension and customization
- A voice AI pipeline with [models](https://docs.livekit.io/agents/models) from OpenAI, Cartesia, and AssemblyAI served through LiveKit Cloud - A voice AI pipeline with [models](https://docs.livekit.io/agents/models) from OpenAI, Cartesia, and Deepgram served through LiveKit Cloud
- 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) - 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)
- Eval suite based on the LiveKit Agents [testing & evaluation framework](https://docs.livekit.io/agents/build/testing/) - Eval suite based on the LiveKit Agents [testing & evaluation framework](https://docs.livekit.io/agents/build/testing/)
- [LiveKit Turn Detector](https://docs.livekit.io/agents/build/turns/turn-detector/) for contextually-aware speaker detection, with multilingual support - [LiveKit Turn Detector](https://docs.livekit.io/agents/build/turns/turn-detector/) for contextually-aware speaker detection, with multilingual support
+8 -5
View File
@@ -65,11 +65,11 @@ async def my_agent(ctx: JobContext):
"room": ctx.room.name, "room": ctx.room.name,
} }
# Set up a voice AI pipeline using OpenAI, Cartesia, AssemblyAI, and the LiveKit turn detector # Set up a voice AI pipeline using OpenAI, Cartesia, Deepgram, and the LiveKit turn detector
session = AgentSession( session = AgentSession(
# Speech-to-text (STT) is your agent's ears, turning the user's speech into text that the LLM can understand # Speech-to-text (STT) is your agent's ears, turning the user's speech into text that the LLM can understand
# See all available models at https://docs.livekit.io/agents/models/stt/ # See all available models at https://docs.livekit.io/agents/models/stt/
stt=inference.STT(model="assemblyai/universal-streaming", language="en"), stt=inference.STT(model="deepgram/nova-3", language="multi"),
# A Large Language Model (LLM) is your agent's brain, processing user input and generating a response # A Large Language Model (LLM) is your agent's brain, processing user input and generating a response
# See all available models at https://docs.livekit.io/agents/models/llm/ # See all available models at https://docs.livekit.io/agents/models/llm/
llm=inference.LLM(model="openai/gpt-4.1-mini"), llm=inference.LLM(model="openai/gpt-4.1-mini"),
@@ -111,9 +111,12 @@ async def my_agent(ctx: JobContext):
room=ctx.room, room=ctx.room,
room_options=room_io.RoomOptions( room_options=room_io.RoomOptions(
audio_input=room_io.AudioInputOptions( audio_input=room_io.AudioInputOptions(
noise_cancellation=lambda params: noise_cancellation.BVCTelephony() noise_cancellation=lambda params: (
if params.participant.kind == rtc.ParticipantKind.PARTICIPANT_KIND_SIP noise_cancellation.BVCTelephony()
else noise_cancellation.BVC(), if params.participant.kind
== rtc.ParticipantKind.PARTICIPANT_KIND_SIP
else noise_cancellation.BVC()
),
), ),
), ),
) )