How to use SpeechAnalyzer
Asked on 06/11/2025
1 search
To use the SpeechAnalyzer, you can follow these steps as outlined in the session "Bring advanced speech-to-text to your app with SpeechAnalyzer":
-
Initialize the SpeechAnalyzer: The SpeechAnalyzer API consists of the SpeechAnalyzer class, which manages an analysis session. You can add a module class to the session to perform specific types of analysis, such as transcription.
-
Configure the Speech Transcriber: Set up your speech transcriber by initializing it with a locale object and the necessary options. The locale's language code corresponds to the language in which you want to receive transcription. You can configure options like audio time range to sync text playback with audio.
-
Ensure the Model is Present: Check if the Speech Transcriber supports transcription for the desired language and whether the language is downloaded and installed. If not, you can request to download the necessary model assets.
-
Handle the Results: The SpeechAnalyzer works asynchronously, allowing you to add audio as it becomes available and process results independently. You can handle both volatile (real-time guesses) and finalized results, with volatile results being replaced by finalized ones when they become available.
-
Live Transcription: You can build a live transcription feature by setting up the SpeechAnalyzer with a transcriber module, passing audio buffers to the analyzer, and handling the transcription results in real-time.
For a detailed demonstration, you can watch the session Bring advanced speech-to-text to your app with SpeechAnalyzer (02:41).

Bring advanced speech-to-text to your app with SpeechAnalyzer
Discover the new SpeechAnalyzer API for speech to text. We’ll learn about the Swift API and its capabilities, which power features in Notes, Voice Memos, Journal, and more. We’ll dive into details about how speech to text works and how SpeechAnalyzer and SpeechTranscriber can enable you to create exciting, performant features. And you’ll learn how to incorporate SpeechAnalyzer and live transcription into your app with a code-along.

Discover machine learning & AI frameworks on Apple platforms
Tour the latest updates to machine learning and AI frameworks available on Apple platforms. Whether you are an app developer ready to tap into Apple Intelligence, an ML engineer optimizing models for on-device deployment, or an AI enthusiast exploring the frontier of what is possible, we’ll offer guidance to help select the right tools for your needs.

What’s new in visionOS 26
Explore exciting new features in visionOS 26. Discover enhanced volumetric APIs and learn how you can combine the power of SwiftUI, RealityKit and ARKit. Find out how you can build more engaging apps and games using faster hand tracking and input from spatial accessories. Get a sneak peek at updates to SharePlay, Compositor Services, immersive media, spatial web, Enterprise APIs, and much more.