技巧

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

精选理由

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

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

图片来源 · Philipp Schmid
正文

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

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

注册LangSmithGoogleADKLivePlugin即可启用。

原文 · 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]

产业坐标与信源核验

本条情报归属 AITOP「技巧」核心栏目,重点聚焦北美前沿实验室与硅谷科技巨头。在跨区域产业观察坐标中,该动态直接关联「AI 开发者工具链、Coding Agent 与工程化实践」研究主线,反映出当前技术演进与商业落地的最新风向。涉及核心实体与技术议题包括:Gemini Live、LangChain、LangSmith、语音代理,读者可通过下方标签进入对应专题页查阅历史脉络与关联对比。

信源核验说明:本文原始线索采编自「Philipp Schmid」(@_philschmid),经 AITOP 多维评分管线结构化提炼。

发现摘要或翻译有误? 告诉我们