Community-maintained Agent Skills for complete Swift and Apple-platform app delivery.
72
90%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Medium
Suggest reviewing before use
Convert live speech and prerecorded audio to text. Targets modern on-device SpeechAnalyzer (iOS 26+) and legacy SFSpeechRecognizer (iOS 10+).
Add NSSpeechRecognitionUsageDescription and NSMicrophoneUsageDescription to Info.plist. Request speech and microphone authorization before starting recording:
import Speech
import AVFAudio
func requestPermissions() async -> Bool {
let speechAuthorized = await withCheckedContinuation { continuation in
SFSpeechRecognizer.requestAuthorization { status in
continuation.resume(returning: status == .authorized)
}
}
guard speechAuthorized else { return false }
return await AVAudioApplication.requestRecordPermission()
}SpeechAnalyzer delivers modular, asynchronous streaming transcription using SpeechTranscriber:
import Speech
final class LiveTranscriber {
private var analyzer: SpeechAnalyzer?
private var transcriber: SpeechTranscriber?
func startTranscribing(format: AVAudioFormat) async throws {
let transcriber = SpeechTranscriber(locale: Locale(identifier: "en-US"), preset: .transcription)
let analyzer = SpeechAnalyzer(modules: [transcriber])
self.transcriber = transcriber
self.analyzer = analyzer
Task {
for try await result in transcriber.results {
let text = result.text
if result.isFinal {
print("Committed: \(text)")
} else {
print("Partial: \(text)")
}
}
}
try await analyzer.start(inputFormat: format)
}
func appendAudio(buffer: AVAudioPCMBuffer) {
analyzer?.append(buffer)
}
func stop() async throws {
try await analyzer?.finish()
}
}For audio file transcription and backward compatibility:
func transcribeFile(url: URL) async throws -> String {
guard let recognizer = SFSpeechRecognizer(locale: Locale(identifier: "en-US")),
recognizer.isAvailable else {
throw SpeechError.unavailable
}
let request = SFSpeechURLRecognitionRequest(url: url)
request.requiresOnDeviceRecognition = true
return try await withCheckedThrowingContinuation { continuation in
recognizer.recognitionTask(with: request) { result, error in
if let error {
continuation.resume(throwing: error)
} else if let result, result.isFinal {
continuation.resume(returning: result.bestTranscription.formattedString)
}
}
}
}Check asset installation or download language packs before recognition:
let status = await AssetInventory.status(for: .transcription, locale: Locale(identifier: "en-US"))
if status != .installed {
try await AssetInventory.download(for: .transcription, locale: Locale(identifier: "en-US"))
}NSMicrophoneUsageDescription crashes immediately when accessing AVAudioEngine.result.isFinal is true.requiresOnDeviceRecognition is true, ensure model assets are installed via AssetInventory.AVAudioEngine keeps the microphone indicator active in the status bar.NSSpeechRecognitionUsageDescription and NSMicrophoneUsageDescription present in Info.plistSpeechAnalyzer (iOS 26+) used for modern streaming pipelines.tessl-plugin
skills
accessorysetupkit
references
activitykit
adattributionkit
references
alarmkit
references
app-clips
app-intents
app-store-optimization
app-store-review
apple-on-device-ai
appmigrationkit
audioaccessorykit
references
authentication
references
avfoundation-audio
references
avkit
background-processing
references
browserenginekit
callkit
references
carplay
cloudkit
contacts-framework
references
core-bluetooth
references
core-data
core-haptics
references
core-motion
references
core-nfc
references
coreml
references
cryptokit
cryptotokenkit
debugging-instruments
device-integrity
references
energykit
references
eventkit
family-controls
references
financekit
focus-engine
gamekit
git-branching-workflow
references
healthkit
references
homekit
references
ios-accessibility
ios-app-workflow
references
ios-ettrace-performance
ios-localization
ios-memgraph-analysis
ios-networking
ios-simulator
references
metrickit
references
musickit
references
natural-language
paperkit
references
passkit
references
pdfkit
pencilkit
references
permissionkit
references
photokit
push-notifications
quicklook
references
realitykit
references
relevancekit
references
scenekit
sensorkit
shazamkit
references
speech-recognition
references
spritekit
storekit
swift-api-design-guidelines
swift-architecture
references
swift-charts
swift-codable
references
swift-code-review
swift-concurrency
swift-formatstyle
references
swift-language
swift-security
references
swift-testing
swiftdata
swiftlint
swiftui-animation
swiftui-gestures
references
swiftui-layout-components
swiftui-liquid-glass
references
swiftui-patterns
swiftui-performance
swiftui-responsive-layout
swiftui-uikit-interop
swiftui-webkit
tabletopkit
tipkit
vision-framework
weatherkit
references