Speech

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

abdullah4ai Updated 11 repo stars

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-developer-toolkit commit da8cce3f48

Frequently asked questions

npx get-skill add abdullah4ai/speech-2