speech-recognition
Transcribe speech to text using Apple's Speech framework. Use when implementing live microphone transcription with AVAudioEngine, recognizing recorded audio files, handling speech and microphone authorization, choosing on-device vs server-backed SFSpeechRecognizer behavior, or adopting SpeechAnalyzer, SpeechTranscriber, DictationTranscriber, AssetInventory, and async result streams on iOS 26+.
Security Assessment
About speech-recognition
The speech-recognition skill provides comprehensive integration with Apple's Speech framework for converting spoken audio into text on iOS platforms. It addresses the critical need for applications requiring voice input, audio transcription, and speech-to-text functionality. This skill handles both modern iOS 26+ implementations using SpeechAnalyzer and SpeechTranscriber, as well as legacy support for iOS 10+ using SFSpeechRecognizer, ensuring broad compatibility across device generations.
The skill encompasses complete transcription workflows including live microphone capture with AVAudioEngine, pre-recorded audio file recognition, and proper authorization handling for speech and microphone permissions. It supports both on-device and server-backed recognition modes, allowing developers to balance privacy, performance, and locale coverage. Key features include time-indexed transcripts for playback synchronization, progressive transcription for real-time UI updates, model asset management through AssetInventory, and async result streams for modern Swift concurrency patterns.
This skill is designed for iOS developers building voice-enabled applications such as note-taking apps, accessibility tools, transcription services, voice command interfaces, and any application requiring speech input. It focuses exclusively on speech-to-text conversion and audio capture mechanics, with clear boundaries directing developers to other skills for post-transcription tasks like language analysis, sentiment detection, summarization, or audio playback UI implementation.
FAQ
What's the difference between SpeechAnalyzer and SFSpeechRecognizer?
SpeechAnalyzer is the modern iOS 26+ API offering better support for long-form recordings, time-indexed transcripts, and fully on-device processing. SFSpeechRecognizer is the older iOS 10+ API that remains useful for broader iOS version support, server-backed locale coverage, and existing callback-based implementations.
Can I perform speech recognition completely offline?
Yes, using on-device recognition with SpeechTranscriber on iOS 26+ or SFSpeechRecognizer's requiresOnDeviceRecognition property. However, on-device support depends on device capabilities and installed language assets. Server-backed recognition offers broader locale coverage but requires network connectivity.
What permissions do I need for speech recognition?
You need both speech recognition authorization and microphone authorization for live transcription. Pre-recorded audio file recognition only requires speech recognition authorization. The skill covers proper authorization handling for both scenarios.
How do I handle multiple languages or check locale support?
For iOS 26+, use SpeechTranscriber.supportedLocale(equivalentTo:) to check specific locale support and installedLocales/supportedLocales to discover available languages. For SFSpeechRecognizer, create an instance with the desired locale and verify it's not nil to confirm availability.
What should I do when SpeechTranscriber is unavailable?
The skill recommends falling back to DictationTranscriber when SpeechTranscriber isn't available for the current device or locale, provided dictation-compatible support meets your requirements. Always check isAvailable before attempting to create a session.
Install speech-recognition
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
dpearson2699/swift-ios-skills