How-to

用LangChain追踪Gemini Live语音代理的speech-to-speech循环

Why we picked it

谷歌这个新集成让你用LangChain看清Gemini Live语音交互的每一步,连1.29秒的天气查询都能追踪,调试超方便。

Google DeepMind的Gemini Live实时语音代理现在可在LangChain中追踪speech-to-speech循环。

Image · Philipp Schmid
Body

Speaker回调钩子只捕捉中断事件前用户听到的精确音频。时间线高亮用户语音(蓝色)和Gemini响应(橙色),以及耗时1.

29秒的城市天气查询等自定义工具执行。使用元数据区分常规文本token与原生Gemini音频token,便于精确计算用量。

注册LangSmithGoogleADKLivePlugin即可启用。

Original · Philipp Schmid

If you are building real-time voice agents with @GoogleDeepMind Gemini Live, you can now trace your speech-to-speech agent loops directly in @LangChain ! - Speaker callback hooks capture only the exact audio your user heard before an interrupted event. - Live timeline highlighting user speech in blue, Gemini responses in orange, and custom tool executions (like a 1.29s city weather lookup). - Usage metadata separates regular text tokens from native Gemini audio tokens so you always know your exact usage footprint. To try it out. In your Google ADK agent, register LangSmithGoogleADKLivePlugin and done. [Video Demo by Caroline di Vittorio]

Industry Coordinates & Source Verification

This report is categorized under AITOP's "How-to" desk, focusing on US frontier AI labs and Silicon Valley technology leaders. Within our cross-regional analytical framework, it directly maps to AI developer toolchains, coding agents, and engineering workflows. Key entities and technical topics under continuous tracking include Gemini Live, LangChain, LangSmith, voice agents.

Source attribution: curated from Philipp Schmid (@_philschmid).