From 9126a3fe24602166dcd5396482b0f58e1ed09ba1 Mon Sep 17 00:00:00 2001 From: Shayne Parmelee Date: Thu, 15 Oct 2026 14:24:00 -0400 Subject: [PATCH] Use LiveKit Inference for the realtime example --- README.md | 2 +- src/agent.py | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 83dfb86..2af16e9 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ The starter includes: - The default LLM is Gemma 4 31B, an open-weight model [hosted by LiveKit](https://docs.livekit.io/agents/models/llm/livekit/) and tuned for voice AI. - The default TTS is [Fish Audio S2.1 Pro](https://docs.livekit.io/agents/models/tts/fishaudio/), an expressive and cost-effective voice. - More than 50 other models are available from OpenAI, Cartesia, Deepgram, and other providers. - - [Realtime models](https://docs.livekit.io/agents/models/realtime/) and many others are available through the [plugin ecosystem](https://docs.livekit.io/agents/models/#plugins). + - [Realtime models](https://docs.livekit.io/agents/models/realtime/) such as OpenAI GPT-Live. Many other models are available through the [plugin ecosystem](https://docs.livekit.io/agents/models/#plugins). - [Expressive mode](https://docs.livekit.io/agents/models/tts/expressive/), on by default, so your agent's voice carries emotion and pacing that fit the conversation. - [Keyterms](https://docs.livekit.io/agents/models/stt/keyterms/), on by default, so speech recognition gets your names, brands, and jargon right, including names it picks up during the conversation, like a caller's. - [LiveKit Turn Detector](https://docs.livekit.io/agents/logic/turns/turn-detector/), which knows when the user has finished speaking, in 14 languages. diff --git a/src/agent.py b/src/agent.py index fd2a28b..13f9baf 100644 --- a/src/agent.py +++ b/src/agent.py @@ -30,11 +30,8 @@ def __init__(self) -> None: # with a realtime model and remove the STT/TTS from the AgentSession # (Note: This is for OpenAI GPT-Live, the recommended speech-to-speech # model. For other providers, see https://docs.livekit.io/agents/models/realtime/) - # 1. Install livekit-agents[openai] - # 2. Set OPENAI_API_KEY in .env.local - # 3. Add `from livekit.plugins import openai` to the top of this file - # 4. Replace the llm argument with: - # llm=openai.realtime.GPTLiveModel(voice="marin"), + # Replace the llm argument with the model's LiveKit Inference ID: + # llm="openai/gpt-live-1", instructions=textwrap.dedent( """\ You are a friendly, reliable voice assistant that answers questions, explains topics, and completes tasks with available tools.