how much lowest latency can we get using livekit ?...
# ask-ai
r
how much lowest latency can we get using livekit ? minimum ?
t
Thanks for reaching out, Av. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
LiveKit can achieve super low latency—down to *under 100ms*—when set up with the right configurations and infrastructure tweaks. This is thanks to LiveKit Cloud's global edge network and multi-home architecture, which help cut down delays by routing media through private backbone connections. If you have any specific use cases or deployment plans in mind, just let me know! I’d be happy to offer some personalized tips to help you get the best possible latency. Sources: README.md | Announcing LiveKit Cloud | README.md | README.md | Live Conversations with AI using ChatGPT and WebRTC
r
wow superb . how ro archive that level latency ?
t
To help you get sub-100ms latency with LiveKit, here are some friendly tips: • Use LiveKit Cloud: It’s got a global edge network and multi-home setup that smartly routes your data to cut down delays. • Optimize Network Connections: For control devices, wired Ethernet connections work best, and for mobile units, using the latest WiFi standards (WiFi 6/7) can really help keep local network delays low. • Deploy Close to Users: Make sure your users connect to the edge server that’s geographically nearest to them — this can shave off some valuable milliseconds. • Minimize Public Internet Usage: Whenever you can, route media through private backbone connections to dodge the usual public internet slowdowns. • Streamline Processing: Try to cut down processing delays at every step by tuning your hardware and software setups. If you want a hand putting these into practice or have any specific questions about your deployment, just give me a shout—I’m here to help!
r
what TTS,STT,LLM you suggest archive that level latency
t
If you're aiming for low latency in TTS (Text-to-Speech), STT (Speech-to-Text), and LLM (Large Language Model) inference, here are some friendly recommendations based on LiveKit's performance benchmarks: • STT: Try using whisper-large-v3-turbo, which showed an STT latency of about 800ms. • LLM: Go for llama-3.3-70b-versatile, which reached a time-to-first-token (TTFT) latency around 200ms. • TTS: Consider playai-tts, with a TTS latency near 350ms. These components were tested in optimized pipelines and work really well with LiveKit's infrastructure. If you have any specific needs or want a hand setting these up, just give me a shout—I'm here to help!
r
load_dotenv(override=True) instructions = ( "You are a helpful voice AI assistant." ) class Assistant(Agent): def __init__(self) -> None: super().__init__(instructions=instructions) async def entrypoint(ctx: agents.JobContext): session = AgentSession( llm=openai.realtime.RealtimeModel(model="gpt-4o-mini-realtime-preview",modalities=["text"]), tts=openai.TTS( model="tts-1", voice="ash", ), ) await session.start( room=ctx.room, agent=Assistant(), room_input_options=RoomInputOptions( # For telephony applications, use
BVCTelephony
instead for best results noise_cancellation=noise_cancellation.BVC(), ), ) if name == "__main__": agents.cli.run_app(agents.WorkerOptions(entrypoint_fnc=entrypoint,port=1100)) this is my current code. i run only cli version. how archive that level latency
t
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!
r
ok got it . what STT,LLM,TTS services you recomend for me archive less than 1 second latency ?