speech-to-text

Implement on-device speech-to-text dictation in visionOS apps using SFSpeechRecognizer or SpeechAnalyzer.

Updated Jun 8, 2026
One-click install
npx skills add https://github.com/likw99/agent-plugins --skill speech-to-text-likw99
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: speech-to-text
Source: https://github.com/likw99/agent-plugins/tree/main/plugins/build-visionos-apps/skills/speech-to-text
Command: npx skills add https://github.com/likw99/agent-plugins --skill speech-to-text-likw99

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Adding voice dictation to a visionOS app requires choosing the right Apple speech API for your deployment target, configuring microphone and speech permissions correctly, and avoiding common crashes like touching AVAudioEngine's input node before the audio session is active. ## Core Features & Use Cases - API selection by deployment target: Uses SFSpeechRecognizer with AVAudioEngine for targets below visionOS 26, and SpeechAnalyzer with SpeechTranscriber for visionOS 26+, with availability gating. - Permissions and lifecycle guidance: Covers the mandatory NSMicrophoneUsageDescription and NSSpeechRecognitionUsageDescription Info.plist keys, runtime authorization requests, and clean stop/teardown of the audio engine. - Use Case: Add a mic button next to a SwiftUI prompt field so users can speak a 3D model description, with partial transcription results streaming live into the text field. ## Quick Start Use the speech-to-text skill to add a mic button to my SwiftUI prompt field that streams dictated text into the field on visionOS.

Frequently Asked Questions about speech-to-text

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add speech-to-text dictation to a visionOS app?▼

Use SFSpeechRecognizer with AVAudioEngine for deployment targets below visionOS 26, or SpeechAnalyzer with SpeechTranscriber on visionOS 26+. Add the microphone and speech recognition usage strings to Info.plist, request both permissions, then stream partial transcription results into your text field.

SFSpeechRecognizer vs SpeechAnalyzer: which should I use?▼

Choose by deployment target: SFSpeechRecognizer works on visionOS 1.0+ and is the broadly compatible default, while SpeechAnalyzer with SpeechTranscriber is faster and better for long-form transcription but requires visionOS 26+. Gate the modern API with #available(visionOS 26, *).

Why does installTap crash with NSException on AVAudioEngine?▼

The crash happens when you access engine.inputNode before activating AVAudioSession, leaving the input node without a valid hardware format. Configure and activate the audio session first, and pass nil as the tap format instead of outputFormat(forBus:).

What Info.plist keys are required for speech recognition on visionOS?▼

You need NSMicrophoneUsageDescription and NSSpeechRecognitionUsageDescription. Accessing the microphone or speech APIs without these strings crashes the app, and you must also request both authorizations at runtime before starting capture.

Does SpeechTranscriber work on older visionOS versions?▼

No, SpeechTranscriber and SpeechAnalyzer are only available on visionOS 26 and later. For earlier targets, use SFSpeechRecognizer as the fallback branch, and check SpeechTranscriber.supportedLocales plus install model assets before first use.