Speech

Speech recognition: SFSpeechRecognizer, live and file-based recognition, permissions. Use when implementing app features related to speech.

abdullah4ai da8cce3 587 B Updated

File contents

Speech

SPEECH RECOGNITION:

  • import Speech; SFSpeechRecognizer()
  • Requires NSSpeechRecognitionUsageDescription + NSMicrophoneUsageDescription (add CONFIG_CHANGES)
  • SFSpeechRecognizer.requestAuthorization() for permission
  • On-device: SFSpeechRecognizer(locale:), set requiresOnDeviceRecognition = true
  • Live: SFSpeechAudioBufferRecognitionRequest + AVAudioEngine
  • File: SFSpeechURLRecognitionRequest(url:)

abdullah4ai/apple-dev-docs/tree/main/swiftship/internal/skills/data/features/speech commit da8cce3f48

Frequently asked questions

npx skillmds@latest add abdullah4ai/speech