2026年11月10日
今天,我们在 Google AI Edge Gallery 中推出设备端自动语音识别 (ASR) 和语音合成 (TTS) 能力。在手机上与 AI 交互时,语音往往是最自然的方式。最近在紧凑语音架构方面的进展现已使得完全在设备端运行精准的多语言 ASR 和高表现力 TTS 模型成为可能,所有这些都只需极小的内存占用、低延迟,并且可完全离线运行。通过将这类轻量级语音模型与设备端小型语言模型(SLM)(例如 Gemini Nano 和 Gemma 4)结合使用,开发者可以构建出能够在用户说话时实时流式转录并就地合成自然语音回复的应用程序。
此次发布汇聚了谷歌系统语音模型和开源权重大模型生态的重大进展:
- Android:借助 ML Kit 获得更快、更准确的系统语音模型:依托谷歌最新的设备端语音模型,ML Kit 能够以 10 倍实时速度实现覆盖 100 多种语言的极高精度多语言转录。配合一款仅需约 100 毫秒即可开口的少量步骤扩散 TTS 模型,能以高达 50 倍实时速度合成 24 kHz 音频。两款模型均已集成至操作系统,APK 体积增加 0 MB。
- Web、桌面及更多平台:借助 MediaPipe Tasks 和 LiteRT 实现跨平台、开源权重的语音能力:针对跨平台应用,我们优化了新型 .litertlm 模型语音捆绑包,包括 Parakeet-TDT 0.6B、PocketTTS 100M、Kokoro-82M 和 Phonon 31M。它们在紧凑的内存占用下可实现实时流式转录和低延迟语音合成,并与设备端 SLM 并行流畅运行且互不产生算力争用。
接下来,我们将探讨这一本地语音管线如何驱动全新的 XR(扩展现实)语言教师展示应用、升级 Google AI Edge Gallery 中的 AI Chat,以及你今天如何使用这些 API 和模型进行开发。
在旅行中学习语言往往发生在真实世界中,可能是在地铁站、喧闹的市场或海外等地,Wi-Fi 和漫游数据可能并不可用。为了展示视觉、语言和语音模型如何在你的手机上完全本地协作、无需网络连接,我们在 Google AI Edge Gallery 中构建了 XR Language Teacher 展示应用。只需将摄像头对准一个陌生的物品或菜单,问一句"那是什么?我要怎么点单?",即可立即听到用你自己的语言给出的解释,并同步播放地道的当地语言表达。
链接到 YouTube 视频(仅当 JS 禁用时可见)
- 实时视觉定位与流式语音输入:将摄像头对准路牌、菜单或物体,出声提问。设备端 ASR 会将你口述的问题实时流式传输,并与相机帧一起发送给 Android 设备上的 Gemini Nano —或其他平台上的 Gemma 4—在一次调用中完成处理。
- 用于双语 TTS 代码切换的结构化输出:借助结构化输出模式,模型会以你的母语解释场景,同时将外语短语单独标记,使得 TTS 管线能够在句子中途无缝地从母语切换到目标语言的发音和口音,屏幕旁还配有词汇卡片。
当推理在配对的手机本地运行时,同样的体验也能在手机端独立使用,并可自然地扩展到免提智能眼镜。想了解我们如何将 Language Teacher 适配至智能眼镜,请参阅我们在 Android Dev Summit 上的最新演讲:与 Gemini Nano 一起为智能穿戴设备打造音频优先体验。
除了 XR Language Teacher 的展示之外,我们还将语音识别(ASR)和文本转语音(TTS)功能直接集成到了 Google AI Edge Gallery 的主 AI Chat 特性中,让 Gemma 4 等端侧小语言模型在移动时也能拥有自然的离线语音交互界面。
AI Chat 语音输入 + 输出的视频
- 模型管理中的 ASR 和 TTS 设置:在一个统一界面中挑选可用的 ASR/TTS 语音管道、预设音色以及已下载的语言包。
- 朗读播放并实时高亮句子:开启“自动播放 TTS”或点击任意回复旁的扬声器按钮,即可唤起悬浮 TTS 栏,实时高亮当前播报的句子;点击任一句子可直接跳转。
- 聊天语音输出的参考实现:我们的开源代码展示了如何去除 Markdown 语法、跳过代码片段和表格等非朗读区块,并在句子级别调度合成任务,从而避免 LLM Token 生成期间产生算力和内存竞争。
虽然 Gemma 4 等多模态模型可以直接处理音频输入,但我们仍提供模块化方案,通过级联语言模型并使用独立轻量级语音模型来优化延迟并提升灵活性。根据目标设备和模型需求的不同,我们在 GitHub 上公开的开源代码会为你分别推荐基于 ML Kit 针对 Android 的优化方案,以及兼顾跨平台覆盖与开放模型支持的 MediaPipe Tasks 和 LiteRT 方案。
对于针对Android设备开发的开发者,ML Kit的生成式AI语音识别和文本转语音API提供了开箱即用的标准化、平台集成路径。底层语音模型通过AICore和Google的设备端语音服务进行管理,开发者无需管理模型下载或担心APK体积膨胀即可获得生产级质量。您的应用还将自动受益于NPU和TPU后端(如有可用)的硬件加速,以及无缝的后台模型更新。
- ML Kit生成式AI语音识别API:在用户说话时实时流式传输部分和最终转录结果,支持来自设备内置麦克风或外部音频流(如智能眼镜)的音频输入。我们最新的设备端ASR技术进步实现了超过100种语言的极高准确度多语言识别(在FLEURS基准上达到8.0%至9.0%的词错误率),同时语音转录速度比被转录的实时音频快10倍(每3秒语音约300毫秒),并将端到端语音翻译等待时间缩短35%至44%。
- ML Kit生成式AI文本转语音API:由在NPU上加速的紧凑少步扩散模型驱动,设备端TTS可在约100毫秒内开始发声,以24 kHz采样率在8种表现力声音和21种地区配置下生成自然语音,速度最高可达实时速度的50倍。它在仅约500毫秒内合成27秒段落,相比传统自回归TTS模型,可将设备功耗降低超过50%,并包含内置的听觉图标支持。
将语音识别(ASR)和语音合成(TTS)集成到跨平台应用中通常需要处理底层音频帧结构、语音活动检测(VAD)以及复杂的解码管道。MediaPipe Task 通过在 iOS、macOS、Windows、Linux 和 Web 平台上提供统一且开箱即用的 ASR 和 TTS API 来简化这一流程,将手动预处理、音频流路由和平台特定的音频管理抽象为简单易用的高层接口:
- **MediaPipe 语音识别(ASR)任务**:自动处理音频帧结构、可配置的语音活动检测(VAD)和解码。支持实时流式传输、完整句子批处理和混合转录模式(在用户说话时实时显示单词,并在说话结束后精炼整个句子),并可开箱即用展示 Parakeet-TDT 0.6B 等开源权重模型。立即在浏览器中尝试!
- **MediaPipe 语音合成(TTS)任务**:提供开箱即用的合成界面,支持语音选择和低延迟流式音频输出,并能开箱即用展示开源权重模型,包括 PocketTTS 100M 和 Kokoro-82M 等多语言模型,以及 Phonon 31M 等超轻量级英语模型,在大多数设备和平台上可实现亚 100ms 的首个音频时间(TTFA)。立即在浏览器中尝试!
从底层来看,ML Kit 和 MediaPipe Tasks 均依托于 Google 的高性能设备端 AI 推理基础设施 LiteRT 提供支持。需要更细粒度控制语音处理流程或采用自定义模型架构的跨平台应用同样可以直接在其之上构建。
语音模型通常依赖多个子图和辅助组件,例如用于自动语音识别(ASR)的编码器/解码器子图和词法器,或用于文本转语音(TTS)的音素化词典、语音嵌入和声码器。每个模型所需的所有组件都被打包为单个 .litertlm 文件以便轻松部署。该应用自带开箱即用的 .litertlm 模型,包括 Parakeet-TDT-0.6B-v3(多语言 ASR)、PocketTTS 100M(多语言 TTS)、Phonon 31M(超轻量级英语 TTS)以及 Kokoro-82M(多语言 TTS)。除此之外,拥有超过 10K+ 关注者的活跃 Hugging Face LiteRT Community 提供了日益丰富的开源权重模型目录,涵盖用于 ASR 的 Whisper、Qwen3-ASR 和 Moonshine,以及用于 TTS 的 Qwen3-TTS 和 Matcha。对于寻求自定义实现或支持更多开源语音模型的开发人员,LiteRT 提供了丰富的高质量多模态模型示例以帮助您快速上手,后续还将持续推出更多内容。
引入本地语音管道将使端侧 SLMs 超越基于键盘的聊天界面,实现自然且以语音优先的交互体验——无论身在何处均可完全离线运行。目前,所有尝试这些体验或将其集成到您自有应用的构建模块均已可用:
- 体验全新语音功能:在 Android 和 iOS 上下载最新的 Google AI Edge Gallery 应用,在自己的设备上试用 XR Language Teacher 和语音驱动的 AI Chat。
- 探索并适配开源代码:查看 Google AI Edge Gallery GitHub 仓库中的参考实现,或引导您常用的编码代理(如 Google Antigravity)指向我们的 GitHub 仓库,即可快速为自有应用适配流式 ASR、双语 TTS 语码转换及句子同步播放管道。
- 开始使用 ML Kit、MediaPipe Tasks 和 LiteRT 构建:查阅面向 Android 集成的 ML Kit GenAI 语音识别文档,了解 MediaPipe Tasks 的即用型跨平台 API,或按照 LiteRT 开发者指南操作,并从 Hugging Face LiteRT 社区下载开箱即用的 .litertlm 模型包。在 Google Cloud 开发者设备平台上,于 200 多台真实物理设备上测试并基准评估您的端侧语音管道。
- 观看 Android Dev Summit 会议视频:查看我们的 Android Dev Summit 会议录像,了解 Language Teacher 如何适配智能眼镜,并从管道构建中获取更多工程技巧。
我们要向对本项目作出重要贡献的贡献者们致以特别感谢:
Alice Zheng、Ajay Dudani、Alex Kanaukou、Amy Zeppenfeld、Byungchul Kim、Cheng Yang、Chintan Parikh、Chris Parsons、Cormac Brick、David Chou、Dong Chen、Geonsun Lee、Glenn Cameron、Hriday Chhabria、Ian Ballantyne、Ireneu Pla、James O'Donnell、Jamieson Pryor、Jason Poon、Jenn Lee、Jianing Wei、Jing Jin、Jingxiao Zheng、Jingyu Shi、Karthik Thirumalai、Kristen Wright、Lu Wang、Marius Kintel、Matthias Grundmann、Miao Wang、Mogan Shieh、Na Li、Paul Hsia、Qiumin Xu、Ravi Shankar、Rishika Sinha、Ronald Wotzlaw、Sachin Kotwani、Sandeep Patil、Sebastian Schmidt、Shao-Fu Shih、Shuangfeng Li、Suril Shah、Tiger Souvannakoumane、Tzu-Ping Chen、Weiyi Wang、Wentao Tu、Yang Yang、Yi-Chun Kuo、Yishuang Pang、Yu-che Liu、Yu-hui Chen、Yuling Liang、Zhihao Yang、Zichuan Wei。
本文由 AI图鉴自动抓取并翻译,版权归原作者所有;如需查看原文请点下方链接。
NOV. 10, 2026
Today, we are introducing on-device Automatic Speech Recognition (ASR) and Text-to-Speech (TTS) capabilities in Google AI Edge Gallery. Voice is often the most natural way to interact with AI on phones and wearables. Recent advances in compact speech architectures now make it possible to run accurate, multilingual ASR and expressive TTS models entirely on device, all within a small memory footprint, with low latency, and completely offline. By pairing these lightweight speech models with on-device small language models (SLMs) like Gemini Nano and Gemma 4, developers can build apps that stream live transcriptions as the user speaks and synthesize natural spoken replies locally.
This release brings together major advancements across both Google’s system speech models and the open-weight ecosystem:
- Android: faster, more accurate system speech models with ML Kit: Powered by Google’s latest on-device speech models, ML Kit delivers incredibly accurate multilingual transcription across 100+ languages at 10x real-time speed. It is paired with a few-step diffusion TTS model that begins speaking in just ~100 ms and synthesizes 24 kHz audio at up to 50x real-time speed. Both models are integrated into the OS, adding 0 MB to your APK.
- Web, Desktop and Beyond: cross-platform, open-weight speech with MediaPipe Tasks and LiteRT: For cross-platform apps, we optimized new .litertlm model speech bundles, including Parakeet-TDT 0.6B, PocketTTS 100M, Kokoro-82M, and Phonon 31M. They deliver real-time streaming transcription and low-latency speech synthesis in a compact memory footprint, and run smoothly alongside on-device SLMs without compute contention.
Below, we’ll explore how this local voice pipeline powers the new XR (Extended Reality) Language Teacher showcase, upgrades AI Chat in Google AI Edge Gallery, and how you can build with these APIs and models today.
Learning a language while traveling happens in the real world, often in underground stations, busy markets, or abroad where Wi-Fi and roaming data may not be available. To show how vision, language, and speech models can work together 100% locally on your phone with no network connection needed, we built the XR Language Teacher showcase in Google AI Edge Gallery. Simply point your camera at an unfamiliar object or menu, ask "What is that, and how do I ask for one?", and immediately hear an explanation in your language alongside authentic pronunciation in the local language.
Link to Youtube Video (visible only when JS is disabled)
- Live visual grounding and streaming voice input: Point your camera at a street sign, menu, or object and ask a question aloud. On-device ASR streams your spoken question in real time alongside the camera frame to Gemini Nano on Android devices —or Gemma 4 across other platforms—in a single pass.
- Structured outputs for bilingual TTS code-switching: Using a structured output schema, the model explains the scene in your own language while tagging foreign-language phrases separately, allowing the TTS pipeline to seamlessly switch voices and accents mid-sentence from your mother tongue to the target language alongside an on-screen vocabulary card.
With inference running locally on a paired phone, the same experience works standalone on a phone and extends naturally to hands-free smart glasses. To see how we adapted Language Teacher for intelligent glasses check out our recent talk at Android Dev Summit: Building Audio-First Experiences for Intelligent Eyewear with Gemini Nano.
Beyond the XR Language Teacher showcase, we also built ASR and TTS directly into Google AI Edge Gallery’s main AI Chat feature, giving on-device SLMs like Gemini Nano and Gemma 4 a natural, offline voice interface while on the go.
Video of AI Chat Voice input + output
- ASR and TTS settings in Model Management: Choose between available ASR and TTS pipelines, preset voices, and downloaded language packs in one central place.
- Read-aloud playback with live sentence highlighting: Turn on “Auto-play TTS” or tap the speaker button on any response to launch a floating TTS bar that highlights each spoken sentence in real time, with the ability to jump to any sentence by tapping it.
- Reference implementation for chat voice outputs: Our open-source codebase demonstrates how to strip Markdown syntax, skip non-spoken blocks like code snippets and tables, and schedule synthesis at the sentence level to avoid compute and memory contention during LLM token generation.
While multimodal models like Gemma 4 can process audio inputs directly, we provide a modular solution for cascading language models with separate, lightweight voice models for latency optimization and flexibility. Depending on your target devices and model requirements, our open-source code on GitHub shows you the optimized and recommended solution for Android using ML Kit, as well as MediaPipe Tasks and LiteRT for cross-platform coverage and open model support.
For developers building for Android devices, ML Kit’s GenAI Speech Recognition and Text-to-Speech APIs provide a standardized, platform-integrated path out of the box. With the underlying speech models managed through AICore and Google’s on-device speech services, developers get production-grade quality without having to manage model downloads or worry about APK size bloat. Your app also benefits automatically from hardware acceleration across NPU and TPU backends (when available) and seamless background model updates.
- ML Kit GenAI Speech Recognition API: Streams live partial and final transcriptions as the user speaks, accepting audio from either the built-in device microphone or external audio streams such as smart glasses. Our latest on-device ASR advancements deliver incredibly accurate multilingual recognition across 100+ languages (reaching 8.0% to 9.0% Word Error Rate on FLEURS) while transcribing speech 10x faster than the real time audio being transcribed (~300 ms per 3 seconds of speech) and cutting end-to-end speech translation wait times by 35% to 44%.
- ML Kit GenAI Text-to-Speech API: Powered by a compact, few-step diffusion model accelerated on NPU, the on-device TTS begins speaking in ~100 ms and generates natural 24 kHz speech across 8 expressive voices and 21 locales at up to 50x real-time speed. It synthesizes a 27-second paragraph in just ~500 ms while cutting active device power by over 50% compared to traditional autoregressive TTS models, and includes built-in earcon support.
Integrating ASR and TTS into cross-platform applications usually requires handling low-level audio framing, Voice Activity Detection (VAD), and complex decoding pipelines. MediaPipe Task simplifies this by providing unified, turnkey ASR and TTS APIs across iOS, macOS, Windows, Linux, and Web that abstract away manual pre-processing, audio stream routing, and platform-specific audio management into simple, high-level interfaces:
- MediaPipe Speech Recognition (ASR) Task: Automatically handles audio framing, configurable Voice Activity Detection (VAD), and decoding. It supports real-time streaming, full-sentence batch, and hybrid transcription modes (streaming live words as the user speaks and refining the full sentence once speech ends), and showcases open-weight models like Parakeet-TDT 0.6B out of the box. Try it now directly in the browser!
- MediaPipe Text-to-Speech (TTS) Task: Provides a turnkey synthesis interface with voice selection and low-latency streaming audio output, showcasing open-weight models out of the box, including multilingual models like PocketTTS 100M and Kokoro-82M, as well as ultra-lightweight English models like Phonon 31M with sub-100ms Time-to-First-Audio (TTFA) on most devices and platforms. Try it now directly in the browser!
Under the hood, ML Kit and MediaPipe Tasks are powered by LiteRT, Google’s high-performance on-device AI inference infrastructure. Cross-platform applications requiring even more fine-grained control over speech processing or custom model architectures can also build on it directly.
Speech models often rely on multiple subgraphs and auxiliary assets, such as encoder/decoder subgraphs and tokenizers for ASR, or phonemizer dictionaries, voice embeddings, and vocoders for TTS. All required components for each model are packaged into a single .litertlm file for easy deployment. The app ships with ready-to-use .litertlm models, including Parakeet-TDT-0.6B-v3 (multilingual ASR), PocketTTS 100M (multilingual TTS), Phonon 31M (ultra-lightweight English TTS), and Kokoro-82M (multilingual TTS). Beyond these, the vibrant Hugging Face LiteRT Community with over 10K+ followers offers a growing catalog of open-weight models, like Whisper, Qwen3-ASR and Moonshine for ASR, or Qwen3-TTS and Matcha for TTS. For developers seeking custom implementations or support for additional open-weight voice models, LiteRT provides a rich set of multimodal model examples to help you get started, with more on the way.
Adding a local voice pipeline takes on-device SLMs beyond typing-based chat interfaces, enabling natural, voice-first interactions that work anywhere, completely offline. All the building blocks to try these experiences or integrate them into your own apps are available today:
- Experience the new voice features: Download the latest Google AI Edge Gallery app on Android and iOS to try XR Language Teacher and voice-enabled AI Chat on your own device.
- Explore and adapt the open-source code: Check out the reference implementation in the Google AI Edge Gallery GitHub repository, or point your favorite coding agent, such as Google Antigravity, at our GitHub repo to quickly adapt the streaming ASR, bilingual TTS code-switching, and sentence-synchronized playback pipeline for your own app.
- Start building with ML Kit, MediaPipe Tasks, and LiteRT: Explore the ML Kit GenAI Speech Recognition documentation for Android integrations, MediaPipe Tasks for turnkey cross-platform APIs, or follow the LiteRT developer guide and download ready-to-run .litertlm bundles from the Hugging Face LiteRT Community. Test and benchmark your on-device voice pipelines across 200+ real physical devices in Google Cloud’s Developer Device Platform.
- Watch the Android Dev Summit session: Check out our Android Dev Summit session recording to see how Language Teacher is adapted for intelligent eyewear and learn more engineering tips from building the pipeline.
We'd like to extend a special thanks to our significant contributors for their work on this project:
Alice Zheng, Ajay Dudani, Alex Kanaukou, Amy Zeppenfeld, Byungchul Kim, Cheng Yang, Chintan Parikh, Chris Parsons, Cormac Brick, David Chou, Dong Chen, Geonsun Lee, Glenn Cameron, Hriday Chhabria, Ian Ballantyne, Ireneu Pla, James O’Donnell, Jamieson Pryor, Jason Poon, Jenn Lee, Jianing Wei, Jing Jin, Jingxiao Zheng, Jingyu Shi, Karthik Thirumalai, Kristen Wright, Lu Wang, Marius Kintel, Matthias Grundmann, Miao Wang, Mogan Shieh, Na Li, Paul Hsia, Qiumin Xu, Ravi Shankar, Rishika Sinha, Ronald Wotzlaw, Sachin Kotwani, Sandeep Patil, Sebastian Schmidt, Shao-Fu Shih, Shuangfeng Li, Suril Shah, Tiger Souvannakoumane, Tzu-Ping Chen, Weiyi Wang, Wentao Tu, Yang Yang, Yi-Chun Kuo, Yishuang Pang, Yu-che Liu, Yu-hui Chen, Yuling Liang, Zhihao Yang, Zichuan Wei.
Auto-fetched and translated by AI Atlas. All rights belong to the original author.