hi, trying to use livekit for the first time. this is the code.
import logging
from dotenv import load_dotenv
from livekit import agents
from livekit.agents import Agent, AgentServer, AgentSession, JobContext, room_io
from livekit.plugins import noise_cancellation, silero
load_dotenv()
# Define your agent’s behavior by extending the Agent class
class Assistant(Agent):
def \__init_\_(self) -> None:
super().\__init_\_(
instructions="You are a helpful voice AI assistant.", # System prompt for the LLM
)
server = AgentServer()
# The entrypoint function runs when a participant joins the room
@server.rtc_session()
async def entrypoint(ctx: JobContext):
\# Configure the voice pipeline with STT, LLM, TTS, and VAD providers
session = AgentSession(
stt="assemblyai/universal-streaming:en", # Speech-to-text provider
llm="openai/gpt-4.1-mini", # Language model for responses
tts="cartesia/sonic-3", # Text-to-speech voice
vad=silero.VAD.load(), # Voice activity detection
)
\# Start the session with noise cancellation enabled
await session.start(
agent=Assistant(),
room=ctx.room,
room_options=room_io.RoomOptions(
audio_input=room_io.AudioInputOptions(
noise_cancellation=noise_cancellation.BVC(), # Background voice cancellation
),
),
)
if _name_ == “_main_”:
logging.basicConfig(level=logging.INFO)
agents.cli.run_app(server)
then running this in powershell uv run agent.py download-files
but getting this error AudioBuffer = list[rtc.AudioFrame] | rtc.AudioFrame. any thoughts please? thanks



