From 802cebdd0c095320405c097c9dec396b38d99949 Mon Sep 17 00:00:00 2001 From: Topherhindman Date: Tue, 7 Apr 2026 15:47:56 -0700 Subject: [PATCH] Upgrade LLM model from GPT-4.1 to GPT-5.2 and aicoustics (#58) * Upgrade LLM model from GPT-4.1 to GPT-5.2 * Switch noise cancellation to ai-coustics QUAIL_VF_L --- pyproject.toml | 1 + src/agent.py | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index e3aeb6a..13315ce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,6 +10,7 @@ requires-python = ">=3.10, <3.15" dependencies = [ "livekit-agents[silero,turn-detector]~=1.4", + "livekit-plugins-ai-coustics", "livekit-plugins-noise-cancellation~=0.2", "python-dotenv", ] diff --git a/src/agent.py b/src/agent.py index fbc807a..605fc39 100644 --- a/src/agent.py +++ b/src/agent.py @@ -12,7 +12,7 @@ from livekit.agents import ( inference, room_io, ) -from livekit.plugins import noise_cancellation, silero +from livekit.plugins import ai_coustics, noise_cancellation, silero from livekit.plugins.turn_detector.multilingual import MultilingualModel logger = logging.getLogger("agent") @@ -72,7 +72,7 @@ async def my_agent(ctx: JobContext): 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 # 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-5.2-chat-latest"), # 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/ tts=inference.TTS( @@ -115,7 +115,9 @@ async def my_agent(ctx: JobContext): noise_cancellation.BVCTelephony() if params.participant.kind == rtc.ParticipantKind.PARTICIPANT_KIND_SIP - else noise_cancellation.BVC() + else ai_coustics.audio_enhancement( + model=ai_coustics.EnhancerModel.QUAIL_VF_L + ) ), ), ),