跳到主要內容
AI News HubLIVE
來源內容 · 翻譯待補全1 分鐘閱讀

待翻譯:Augment Your LiveKit Agent with Modal GPUs

文章摘要

AI 服務暫時不可用,以下為來源摘要,待恢復後補全翻譯:How to run a LiveKit video avatar with open-weights models on Modal GPUs, using Sticky Sessions for container affinity.

來源Modal Blog作者: Ben Shababo
待翻譯:Augment Your LiveKit Agent with Modal GPUs
回報錯誤

更正管道尚未開通,可先複製下方文章資訊留存。

查看更正說明
直接讀正文

AI 服務暫時不可用,以下為來源正文,待恢復後補全翻譯。

LiveKit and their Agents SDK are a popular choice for implementing WebRTC-based audio-video applications. In this article, we share how you can use open-weights models or custom ones running on Modal alongside LiveKit agents. We’ll use BitHuman’s open weights Expression Video Avatar, voiced by Qwen3-TTS, to create a clone of Modal’s GPU Enjoyer in Residence, Charles Frye. Running a LiveKit Video Avatar with Sticky Sessions A common pattern with audio-video applications is using custom models as plug-and-play components. Increasingly so, we’ve seen users power video avatars and replace proprietary model APIs with open weights models (or self-hosted proprietary models) using Modal’s serverless GPUs. LiveKit Agents already supply an avatar interface, and we’ll use their BitHuman integration which comes prepackaged as a self-hosted GPU container. The container exposes a /launch endpoint which runs the avatar and joins the LiveKit room. For low-latency HTTP communication between the endpoint and external clients, we expose the endpoint using a Modal Server. However, the endpoint returns as soon as the avatar joins, which contends with how Servers scale by in-flight requests. Recently, we released Sticky Sessions, a first-class primitive for guaranteeing strong container affinity. This allows WebSocket connections to reconnect to the same container, where a client can start one or more sessions on a Server container. I.e., we can start and end the session from the client-side, and Modal will hold that Session’s slot on the container as if there was a running request. When a participant joins a room, the LiveKit agent starts a Sticky Session, joins the room, and calls the /launch endpoint using the session token. Cold starts are hidden by GPU snapshots, where otherwise we’d have to reload gigabytes of model weights onto the Server. When the call is complete, the agent ends the session. See the full code here. Get started now See the LiveKit Agent SDK and Modal docs for more information.

展開要點與分析

文章情報

工程師進階

要點

  • AI 服務暫時不可用,系統已先保留來源內容與降級後設資料。
  • How to run a LiveKit video avatar with open-weights models on Modal GPUs, using Sticky Sessions for container affinity.

要點與分析由自動化流程生成,可能有誤,請結合原始來源核實。