bored-egg-9547
12/03/2025, 10:29 AMlivekit-agents[silero,turn-detector,google,images,mcp] ~= 1.35
livekit-plugins-noise-cancellation ~= 0.25
Here is my agent code,deploy in livekit cloud.
import copy
import logging
import os
from typing import Any
from dotenv import load_dotenv
from livekit import rtc
from livekit.agents import (
Agent,
AgentServer,
AgentSession,
JobContext,
cli,
mcp,
room_io,
)
from livekit.agents.llm.mcp import MCPTool
from livekit.plugins import google, noise_cancellation
logger = logging.getLogger("agent")
load_dotenv(".env.local")
class VideoAssistant(Agent):
def __init__(self) -> None:
super().__init__(
instructions="You are a helpful voice AI assistant",
llm=google.realtime.RealtimeModel(
model="gemini-2.5-flash-native-audio-preview-09-2025",
voice="Kore",
temperature=0.8,
),
)
server = AgentServer()
@server.rtc_session()
async def my_agent(ctx: JobContext):
ctx.log_context_fields = {
"room": ctx.room.name,
}
session = AgentSession()
await session.start(
agent=VideoAssistant(),
room=ctx.room,
room_options=room_io.RoomOptions(
video_input=True,
audio_input=room_io.AudioInputOptions(
noise_cancellation=lambda params: noise_cancellation.BVCTelephony()
if params.participant.kind == rtc.ParticipantKind.PARTICIPANT_KIND_SIP
else noise_cancellation.BVC(),
),
),
)
await ctx.connect()
await session.generate_reply(instructions="please introduce yourself.")
if __name__ == "__main__":
cli.run_app(server)
My Question
Based on the issues above:
Is there any mistake in my code or configuration?
Or are these limitations/bugs related to the current Gemini Live realtime API integration (latency, turn detection, or TTS stability)?
Any help or guidance would be greatly appreciated!quaint-ambulance-32873
12/03/2025, 10:52 AMbored-egg-9547
12/03/2025, 12:03 PMbored-egg-9547
12/04/2025, 1:59 AMawait session.generate_reply(instructions="please introduce yourself.") is expected to make the AI speak first, but it doesn't work.quaint-ambulance-32873
12/04/2025, 8:53 AMbored-egg-9547
12/04/2025, 11:59 AMbored-egg-9547
12/04/2025, 2:14 PMfresh-hospital-14455
12/05/2025, 7:37 AMgemini-live-2.5-flash-preview performed well with tool calling.bored-egg-9547
12/08/2025, 2:02 AMquaint-ambulance-32873
12/09/2025, 9:56 AMbored-egg-9547
12/10/2025, 2:44 AMquaint-ambulance-32873
12/11/2025, 8:51 PM