SDK Reference · Type
STMediaPermission
Identifies operating-system media permissions surfaced by SpeechTiles.
Overview
This identifies a permission the media runtime may need, such as microphone access or speech recognition authorization. A permission request can remain pending while the operating system asks the user. Handle the eventual permission event instead of assuming a pending request was granted.
public enum STMediaPermission: Sendable {
case microphone
case speechRecognition
}
Permission requests are made with STMediaRunner.requestMicrophonePermission and STMediaRunner.requestSpeechRecognitionPermission. When a decision is pending, the eventual result is delivered through the media-event system.
Cases
.microphone— Microphone option..speechRecognition— Speech recognition option.
Swift example
let selection: STMediaPermission = .microphone