← ClaudeAtlas

speech-recognitionlisted

Transcribe speech to text using the Speech framework. Use when implementing live microphone transcription with AVAudioEngine, recognizing pre-recorded audio files, configuring on-device vs server-based recognition, handling authorization flows, or adopting the new SpeechAnalyzer API (iOS 26+) for modern async/await speech-to-text.
dpearson2699/swift-ios-skills · ★ 730 · Data & Documents · score 80
Install: claude install-skill dpearson2699/swift-ios-skills
# Speech Recognition Transcribe live and pre-recorded audio to text using Apple's Speech framework. Covers `SFSpeechRecognizer` (iOS 10+) and the new `SpeechAnalyzer` API (iOS 26+). ## Contents - [SpeechAnalyzer (iOS 26+)](#speechanalyzer-ios-26) - [SFSpeechRecognizer Setup](#sfspeechrecognizer-setup) - [Authorization](#authorization) - [Live Microphone Transcription](#live-microphone-transcription) - [Pre-Recorded Audio File Recognition](#pre-recorded-audio-file-recognition) - [On-Device vs Server Recognition](#on-device-vs-server-recognition) - [Handling Results](#handling-results) - [Common Mistakes](#common-mistakes) - [Review Checklist](#review-checklist) - [References](#references) ## SpeechAnalyzer (iOS 26+) `SpeechAnalyzer` is an actor-based API introduced in iOS 26 that replaces `SFSpeechRecognizer` for new projects. It uses Swift concurrency, `AsyncSequence` for results, and supports modular analysis via `SpeechTranscriber`. ### Basic transcription with SpeechAnalyzer ```swift import Speech // 1. Create a transcriber module guard let locale = SpeechTranscriber.supportedLocale( equivalentTo: Locale.current ) else { return } let transcriber = SpeechTranscriber(locale: locale, preset: .offlineTranscription) // 2. Ensure assets are installed if let request = try await AssetInventory.assetInstallationRequest( supporting: [transcriber] ) { try await request.downloadAndInstall() } // 3. Create input stream and analyzer let (inputSequence, inputBuilder