how to use the Speech framework
Asked on 06/18/2025
1 search
To use the Speech framework, particularly the new Speech Analyzer API introduced in iOS 26, you can follow these steps:
-
Initialize the Speech Analyzer: The Speech Analyzer class manages an analysis session. You can add a module class to the session to perform a specific type of analysis, such as transcription.
-
Add a Transcriber Module: By adding a transcriber module to the session, you create a transcription session that performs speech-to-text processing. You pass audio buffers to the analyzer instance, which then routes them through the transcriber and its Speech to Text model.
-
Handle Asynchronous Processing: The model predicts the text that corresponds to the spoken audio and returns that text, along with some metadata, to your application. This process works asynchronously, allowing your application to add audio as it becomes available and process results independently.
-
Use Swift's Async Sequences: Swift's async sequences help buffer and decouple the input and results, making the process efficient and responsive.
For a detailed demonstration, you can watch the session Bring advanced speech-to-text to your app with SpeechAnalyzer (02:41) where the Speech Analyzer API is discussed in depth.

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.

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.

Explore machine learning on Apple platforms
Get started with an overview of machine learning frameworks on Apple platforms. Whether you’re implementing your first ML model, or an ML expert, we’ll offer guidance to help you select the right framework for your app’s needs.