# speech-recognition

A skill that walks your agent through speech-to-text on Apple's Speech framework, from live microphone capture to recognizing recorded files.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 3700 installs · ★ 1237
- Author: dpearson2699
- License: LicenseRef-Unknown · policy=link-only · description only; the file stays with the author
- Source: https://github.com/dpearson2699/swift-ios-skills/tree/HEAD/skills/speech-recognition/SKILL.md
- Updated: 2026-07-31
- HTML: https://affpapa.org/en/nevibecode/skills/speech-recognition

## What it does

This skill covers speech recognition in iOS apps: microphone capture with `AVAudioEngine`, recognition of pre-recorded audio files, permission handling, and result processing. Your agent gets working patterns instead of guessing at the API.

Two paths are documented. On iOS 26+ you use `SpeechAnalyzer` with `SpeechTranscriber` and `DictationTranscriber` — locale availability checks, asset installation through `AssetInventory`, and async result streams. For iOS 10+ targets there is `SFSpeechRecognizer` with callbacks. A separate section explains when on-device recognition beats the server-backed route, plus a checklist of common mistakes.

You need `NSSpeechRecognitionUsageDescription` and `NSMicrophoneUsageDescription` in `Info.plist` before anything runs — without those keys the system blocks both speech and microphone access. Text analysis after transcription is out of scope: language identification, sentiment, embeddings and translation go to other skills, as does audio playback UI. If your project already configures `AVAudioSession` itself, expect to adapt the templates, because the sample category setup will overwrite yours.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill speech-recognition -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/speech-recognition/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/speech-recognition/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill speech-recognition -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/speech-recognition/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill speech-recognition -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/speech-recognition/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install dpearson2699/swift-ios-skills speech-recognition
```

2. **Manually: put the files in place**
- File: `.github/skills/speech-recognition/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill speech-recognition -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/dpearson2699/swift-ios-skills --path skills/speech-recognition
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/speech-recognition/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill speech-recognition -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/dpearson2699/swift-ios-skills/tree/HEAD/skills/speech-recognition/SKILL.md

## When to use it
- build live microphone transcription on `AVAudioEngine`
- recognize an audio file recorded earlier
- request speech and microphone permissions with the right `Info.plist` keys
- decide between on-device and server recognition for a given locale
- migrate from `SFSpeechRecognizer` to `SpeechAnalyzer` on iOS 26+

## Example prompts
- Help me set up live microphone transcription with `AVAudioEngine` and `SFSpeechRecognizer`
- How do I request speech recognition and microphone permissions on iOS?
- Move this transcription code to `SpeechAnalyzer` and `SpeechTranscriber` for iOS 26+

## Similar
- [axiom-media](https://affpapa.org/en/nevibecode/skills/axiom-media.md) — skill · 1300 installs
- [iphone-duo-camera](https://affpapa.org/en/nevibecode/skills/iphone-duo-camera.md) — skill · 500 installs
- [axiom-ai](https://affpapa.org/en/nevibecode/skills/axiom-ai.md) — skill · 1100 installs
- [apple-intelligence](https://affpapa.org/en/nevibecode/skills/apple-intelligence.md) — skill · 516 installs
- [xcode-project-setup](https://affpapa.org/en/nevibecode/skills/xcode-project-setup.md) — skill · 130700 installs
- [expo-migrate-module](https://affpapa.org/en/nevibecode/skills/expo-migrate-module.md) — skill · 19400 installs

From the same set: [dpearson2699/swift-ios-skills](https://affpapa.org/en/nevibecode/by/dpearson2699/swift-ios-skills.md) — 86 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
