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
instruction
the instruction that failed.
options
the SpeechOptions that were used to make the API request.
underlying
the underlying
Error
returned by the API. -
The Speech API Did not return any data.
Declaration
Swift
case noData(instruction: SpokenInstruction, options: SpeechOptions)
Parameters
instruction
the instruction that failed.
options
the 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
instruction
The instruction that failed.
action
a
SpeechFailureAction
that describes the action attemptedsynthesizer
the speech engine that tried to perform the action.
underlying
the
Error
that 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
playerType
the type of
AVAudioPlayer
that failed to initalize.instruction
The instruction that failed.
synthesizer
The speech engine that attempted the initalization.
underlying
the
Error
that was returned by the system audio service. -
The active
RouteProgress
did not contain a speech locale.Declaration
Swift
case undefinedSpeechLocale(instruction: SpokenInstruction, progress: RouteProgress)
Parameters
instruction
The instruction that failed.
progress
the offending
RouteProgress
that omits the expectedSpeechLocale
.