google: support Live Avatar video output for Gemini 3.8 Live (avatar_config, VIDEO modality)
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 22/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- gcp, python
- 領域
- ai, audio-video-rtc
調査の方向性
Start with the Google realtime plugin's RealtimeModel, _build_connect_config, and _handle_server_content, which currently send every inline_data part to audio_ch as PCM. The design is still open: the maintainers asked whether avatar support belongs in a plugin-level AvatarSession or in core generations, and whether it should be Vertex-only. Settle those questions in #7843 before writing code. Done would mean MP4 fragments are demuxed and routed by mime type, with unit tests covering decode, routing and interrupt flush.
索引モデルが issue の本文から書いたものです。
説明
Feature Type
Would make my life easier
Feature Description
Gemini 3.8 Live on Vertex AI (Gemini Enterprise Agent Platform) went GA with Live Avatar on 2026-09-24. With response_modalities=["VIDEO"] and an avatar_config in the setup message, the model returns a lip-synced 24 FPS talking-head stream along with its speech. google-genai already ships the types (types.AvatarConfig, types.CustomizedAvatar, LiveConnectConfig.avatar_config).
livekit-plugins-google can't use it today:
RealtimeModelhas noavatar_configoption, and_build_connect_confignever sets it._handle_server_contenttreats everypart.inline_dataas 24 kHz PCM and pushes it toaudio_ch. In avatar mode,inline_dataholds fragmented MP4 (H.264 video plus AAC-LC audio), so the agent plays noise.
Proposed shape, following the in-process avatar plugins (bithuman, which uses QueueAudioOutput + AvatarRunner + a VideoGenerator):
from livekit.plugins import google
llm = google.realtime.RealtimeModel(
model="gemini-3.8-live",
vertexai=True,
voice="Puck",
avatar=google.realtime.LiveAvatarOptions(avatar_name="Ben"),
)
session = AgentSession(llm=llm)
avatar = google.realtime.AvatarSession()
await avatar.start(session, room=ctx.room)
await session.start(agent=MyAgent(), room=ctx.room)
RealtimeModel(avatar=...)setsavatar_configand theVIDEOmodality, and routesinline_databymime_type. MP4 fragments are demuxed with PyAV, whichlivekit-agentsalready depends on. Decoded audio still goes throughaudio_ch, so transcription, interruption, truncation, and metrics behave as they do today. Decoded video frames go to a per-generation video queue.AvatarSession.start()installs aQueueAudioOutputassession.output.audioand runs anAvatarRunnerwith aVideoGenerator. The generator pairs each audio frame it receives with the video frames for the same media time, and the runner publishes both tracks throughrtc.AVSynchronizer.clear_buffer()on interruption drops the queued video.- No changes to
livekit-agentscore.
Questions for maintainers before we open a PR:
- Is the
AvatarSessionin the Google plugin the shape you want, or would you rather add a generic video path toRealtimeModelgenerations in core? - Should avatar mode be Vertex-only? Google documents it for Agent Platform, but
google-genaialso mapsavatar_configon the Gemini API path. We'd raise a clear error when the API doesn't support it, rather than guess.
We're willing to implement it, add unit tests that feed recorded MP4 fragments (decode, routing, interrupt flush), and add an example under examples/.
Workarounds / Alternatives
- Subclassing
RealtimeSessionand overriding the private_build_connect_configand_handle_server_contentmethods. That breaks on any refactor of those methods. - A third-party avatar vendor (Tavus, Hedra, and others) fed by the agent's audio. That adds a second vendor and more latency, when the model already renders the avatar.
What the stream looks like
We ran two probe sessions against gemini-3.8-live on Vertex (us-central1, google-genai 2.31.0, avatar "Ben", voice "Puck"):
- Every
inline_datapart isvideo/mp4. No separate PCM is sent. Audio is only inside the MP4. - One init segment (
ftyp+moov) per session, thenmoof/mdatfragments: about 24 video fragments per second (one frame each) and about 24 AAC fragments per second, in separate fragments. - Video: H.264, 704x1280, 24 FPS, about 8.2 Mbps at default
video_bitrate_bps. Audio: AAC-LC, 24 kHz mono, 128 kbps. - The stream is continuous and server-paced in real time for the whole session. While the model is listening it sends idle frames with silent audio, and there is no new init segment per turn.
- Interruption is handled by the server. Barging in mid-sentence produced
interruptedandturn_completeabout 1 s after speech start. The speech stopped in the stream, and the video continued as idle frames. - Output and input transcription work in
VIDEOmode.usage_metadata.response_tokens_detailsreports aVIDEOmodality (about 6,200 tokens per second of speech, matching the published rate).
Because the stream is continuous rather than per generation, the generator has to emit the server's idle frames between generations and play speech frames in step with the audio that AgentSession plays. We'd like your view on keeping that sync inside the plugin's VideoGenerator.
Additional Context
- Docs: https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/live-api/configure-live-avatars
- GA announcement: https://cloud.google.com/blog/products/ai-machine-learning/gemini-3-8-live-with-live-avatar-is-now-generally-available
- Related: #3237 (interrupt errors with avatar + Gemini realtime)
- 主要言語
- Python
- スター
- 14.6k
- フォーク
- 3.9k
- 平均マージ
- 3日 1時間
- マージ済み PR(30日)
- 166
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
livekit/agents のほかの issue
-
Agent state stays "speaking" after a realtime reply in sessions without audio output対応中かも @Luke-salinero が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
Assistant markup is stripped from chat history when expressive mode is off対応中かも @ShivamSharma43 が 9 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
docs: openai.LLM vs openai.responses.LLM for HTTP OpenAI-compat hosts再び着手できるかも @AbarnaaSree が 48 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
livekit/agents#7022 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Google LLM plugin leaves Gemini thinking tokens out of completion_tokens対応中かも @ninglinLiu が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 38/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
cellrishi-code/claude-skills-atlas#165 ·
メンテナーはふだん 1 日以内に返信
-
bug confirmed issue
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
open-webui/open-webui#32635 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Filters: ?field:ne=null matches NULL rows instead of non-NULL ones対応中かも @rshdhere が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Netflix/metaflow-service#504 ·
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
gke-labs/kube-agents#3394 ·
メンテナーはふだん 1 日以内に返信
-
A2A audit timestamps end in +00:00Z (invalid ISO 8601)対応中かも @O1sumitkumar が今日担当しました。 オープンbug good first issue help wanted python
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信