SpeechError
public enum SpeechError : LocalizedError
A error type returned when encountering errors in the speech engine.
-
The Speech API Did not successfully return a response.
Declaration
Swift
case apiError(instruction: SpokenInstruction, options: SpeechOptions, underlying: Error?)Parameters
instructionthe instruction that failed.
optionsthe SpeechOptions that were used to make the API request.
underlyingthe underlying
Errorreturned by the API. -
The Speech API Did not return any data.
Declaration
Swift
case noData(instruction: SpokenInstruction, options: SpeechOptions)Parameters
instructionthe instruction that failed.
optionsthe SpeechOptions that were used to make the API request.
-
The speech engine was unable to perform an action on the system audio service.
Declaration
Swift
case unableToControlAudio(instruction: SpokenInstruction?, action: SpeechFailureAction, synthesizer: Any?, underlying: Error?)Parameters
instructionThe instruction that failed.
actiona
SpeechFailureActionthat describes the action attemptedsynthesizerthe speech engine that tried to perform the action.
underlyingthe
Errorthat was optrionally returned by the audio service. -
The speech engine was unable to initalize an audio player.
Declaration
Swift
case unableToInitializePlayer(playerType: AVAudioPlayer.Type, instruction: SpokenInstruction, synthesizer: Any?, underlying: Error)Parameters
playerTypethe type of
AVAudioPlayerthat failed to initalize.instructionThe instruction that failed.
synthesizerThe speech engine that attempted the initalization.
underlyingthe
Errorthat was returned by the system audio service. -
The active
RouteProgressdid not contain a speech locale.Declaration
Swift
case undefinedSpeechLocale(instruction: SpokenInstruction, progress: RouteProgress)Parameters
instructionThe instruction that failed.
progressthe offending
RouteProgressthat omits the expectedSpeechLocale.
Install in Dash
SpeechError Enumeration Reference