update default (#94)

This commit is contained in:
Tina Nguyen
2026-08-11 21:08:26 -04:00
committed by GitHub
parent 7c0af539fe
commit ddc18eb851
3 changed files with 22 additions and 12 deletions
+2
View File
@@ -11,8 +11,10 @@ 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 built on [LiveKit Inference](https://docs.livekit.io/agents/models/inference), providing zero-configuration access to [models](https://docs.livekit.io/agents/models) from top labs - A voice AI pipeline built on [LiveKit Inference](https://docs.livekit.io/agents/models/inference), providing zero-configuration access to [models](https://docs.livekit.io/agents/models) from top labs
- Uses the fast, open-weight Gemma 4 31B model, [hosted by LiveKit](https://docs.livekit.io/agents/models/llm/livekit/) and tuned for optimal performance in voice AI, as the default LLM - Uses the fast, open-weight Gemma 4 31B model, [hosted by LiveKit](https://docs.livekit.io/agents/models/llm/livekit/) and tuned for optimal performance in voice AI, as the default LLM
- Uses Fish Audio S2.1 Pro for TTS, which renders the inline delivery markup that expressive mode relies on
- Supports more than 50 models from OpenAI, Cartesia, Deepgram, and other providers - Supports more than 50 models from OpenAI, Cartesia, Deepgram, and other providers
- Access to a wide range of other models, including [Realtime models](https://docs.livekit.io/agents/models/realtime), through extensive plugin ecosystem - Access to a wide range of other models, including [Realtime models](https://docs.livekit.io/agents/models/realtime), through extensive plugin ecosystem
- Expressive mode, enabled by default: the framework injects the TTS provider's markup guide into the LLM prompt, so the model emits inline delivery tags (emotion, pacing, non-verbal sounds) that the TTS renders and the transcript never shows
- Eval suite based on the LiveKit Agents [testing & evaluation framework](https://docs.livekit.io/agents/start/testing/) - Eval suite based on the LiveKit Agents [testing & evaluation framework](https://docs.livekit.io/agents/start/testing/)
- [LiveKit Turn Detector](https://docs.livekit.io/agents/logic/turns/turn-detector/), an end-of-turn model that listens to the user's audio directly, combining semantic understanding with acoustic cues for state-of-the-art accuracy across 14 languages - [LiveKit Turn Detector](https://docs.livekit.io/agents/logic/turns/turn-detector/), an end-of-turn model that listens to the user's audio directly, combining semantic understanding with acoustic cues for state-of-the-art accuracy across 14 languages
- [Background voice cancellation](https://docs.livekit.io/transport/media/noise-cancellation/) - [Background voice cancellation](https://docs.livekit.io/transport/media/noise-cancellation/)
+1 -1
View File
@@ -9,7 +9,7 @@ description = "Simple voice AI assistant built with LiveKit Agents for Python"
requires-python = ">=3.10, <3.15" requires-python = ">=3.10, <3.15"
dependencies = [ dependencies = [
"livekit-agents>=1.6.1", "livekit-agents>=1.6.9",
"livekit-plugins-ai-coustics~=0.2", "livekit-plugins-ai-coustics~=0.2",
"python-dotenv", "python-dotenv",
] ]
+14 -6
View File
@@ -99,27 +99,35 @@ async def my_agent(ctx: JobContext):
"room": ctx.room.name, "room": ctx.room.name,
} }
# Set up a voice AI pipeline using OpenAI, Cartesia, Deepgram, and the LiveKit turn detector # Set up a voice AI pipeline using AssemblyAI, Fish Audio, 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="deepgram/nova-3", language="multi"), stt=inference.STT(model="assemblyai/universal-3-5-pro", language="en"),
# Text-to-speech (TTS) is your agent's voice, turning the LLM's text into speech that the user can hear # Text-to-speech (TTS) is your agent's voice, turning the LLM's text into speech that the user can hear
# See all available models as well as voice selections at https://docs.livekit.io/agents/models/tts/ # See all available models as well as voice selections at https://docs.livekit.io/agents/models/tts/
tts=inference.TTS( tts=inference.TTS(
model="cartesia/sonic-3", voice="9626c31c-bec5-4cca-baa8-f8ba9e84c8bc" model="fishaudio/s2.1-pro", voice="fa4c9eb3dccc4806b382b40d61c6b10a"
), ),
turn_handling=TurnHandlingOptions(
# The LiveKit turn detector determines when the user is done speaking and the agent should respond. # The LiveKit turn detector determines when the user is done speaking and the agent should respond.
# TurnDetector is an end-of-turn model that listens to the user's audio directly, combining # TurnDetector is an end-of-turn model that listens to the user's audio directly, combining
# semantic understanding with acoustic cues (intonation, pitch, rhythm) for state-of-the-art accuracy. # semantic understanding with acoustic cues (intonation, pitch, rhythm) for state-of-the-art accuracy.
# AgentSession supplies the required VAD automatically. # AgentSession supplies the required VAD automatically.
# See more at https://docs.livekit.io/agents/build/turns # See more at https://docs.livekit.io/agents/build/turns
turn_handling=TurnHandlingOptions(
turn_detection=inference.TurnDetector(), turn_detection=inference.TurnDetector(),
), # Adaptive interruptions use the turn detector to tell a real interruption from a
# backchannel like "mhm" or "right", so the agent keeps talking through the latter.
interruption={"mode": "adaptive"},
# allow the LLM to generate a response while waiting for the end of turn # allow the LLM to generate a response while waiting for the end of turn
# See more at https://docs.livekit.io/agents/build/audio/#preemptive-generation # See more at https://docs.livekit.io/agents/build/audio/#preemptive-generation
preemptive_generation=True, preemptive_generation={"enabled": True},
),
# Expressive mode injects the TTS provider's markup guide into the LLM prompt, so the model
# emits inline delivery tags (emotion, pacing, non-verbal sounds) that the TTS renders and
# the transcript never shows. Requires a TTS model that supports markup, such as the Fish
# Audio model above.
expressive=True,
) )
# Start the session, which initializes the voice pipeline and warms up the models # Start the session, which initializes the voice pipeline and warms up the models