SDK Reference · Type
STResult
The common result type returned by SpeechTiles Andamento media and conversation APIs.
Overview
Public operations return this result to report immediate acceptance, rejection, or an error condition. In asynchronous operations, success usually means the request was accepted, not that playback, recording, or recognition has finished. Observe the corresponding media event or completion callback for final status.
STResult is a string-backed, Sendable enum. Its cases are grouped by functional area so callers can distinguish initialization/state errors, permission results, playback/recording failures, synthesis and recognition errors, audio-environment conditions, and conversation-level results.
For asynchronous media APIs, .success means the request was accepted at the synchronous API boundary. Subsequent runtime completion is communicated through STMediaEvent.
See the Results guide for the complete behavioral model.
Purpose and usage
Check the immediate result of a request. For asynchronous media operations, `.success` indicates acceptance, not completion; observe the corresponding event.
Swift example
let result = STMediaRunner.shared.initialize()
if result != .success {
// Handle the initialization error.
}
Where this type is used
Result Cases
The following are all public cases in the supplied STResult.swift source, grouped by the source declarations. Case names are exact. Explanations are descriptive; precise recovery behavior depends on the API returning the case.
General
| Case |
Meaning |
.success |
The request succeeded or was accepted. For asynchronous operations, this does not guarantee completion. |
.internalError |
An internal failure was reported. |
.notImplemented |
The requested functionality is not implemented. |
.jsonError |
Reports a json error condition. |
.fileNotFound |
A required file could not be found. |
Permissions
| Case |
Meaning |
.permissionGranted |
Reports a permission granted condition. |
.permissionDenied |
Reports a permission denied condition. |
.permissionRestricted |
Reports a permission restricted condition. |
.permissionPending |
Permission decision has not yet completed. |
Media Runner
| Case |
Meaning |
.mediaRunnerNotValid |
Reports a media runner not valid condition. |
.audioPlayerNotInitialized |
Reports a audio player not initialized condition. |
.audioRecorderNotInitialized |
Reports a audio recorder not initialized condition. |
Audio Segments
| Case |
Meaning |
.audioSegmentNotValid |
Reports a audio segment not valid condition. |
.audioSegmentAudioFormatNotSupported |
Reports a audio segment audio format not supported condition. |
Audio Playback
| Case |
Meaning |
.audioPlayerNotIdle |
Reports a audio player not idle condition. |
.audioPlayerIdle |
Reports a audio player idle condition. |
.audioPlayerStopping |
Reports a audio player stopping condition. |
.audioPlayerPaused |
Reports a audio player paused condition. |
.audioPlayerNotPaused |
Reports a audio player not paused condition. |
.audioPlaybackFailed |
Reports a audio playback failed condition. |
.audioEngineStartFailed |
Reports a audio engine start failed condition. |
.audioPlaybackReachedEnd |
Reports a audio playback reached end condition. |
.audioPlaybackRateOutsideRange |
Reports a audio playback rate outside range condition. |
.audioPlaybackPitchOutsideRange |
Reports a audio playback pitch outside range condition. |
.audioPlaybackVolumeOutsideRange |
Reports a audio playback volume outside range condition. |
.textLocationNotFound |
Reports a text location not found condition. |
Speech Synthesis
| Case |
Meaning |
.ssVoiceNotFound |
Reports a speech synthesis voice not found condition. |
.ssEngineNotValid |
Reports a speech synthesis engine not valid condition. |
.ssEngineNotActive |
Reports a speech synthesis engine not active condition. |
.ssEngineOfflineRecordingMode |
Reports a speech synthesis engine offline recording mode condition. |
.ssmlTextNotValid |
Reports a ssml text not valid condition. |
.ssTextFileNotValid |
Reports a speech synthesis text file not valid condition. |
.ssAliasesReadFailed |
Reports a speech synthesis aliases read failed condition. |
.ssAliasesFileReadFailed |
Reports a speech synthesis aliases file read failed condition. |
.ssPhonemesReadFailed |
Reports a speech synthesis phonemes read failed condition. |
.ssPhonemesFileReadFailed |
Reports a speech synthesis phonemes file read failed condition. |
.ssEngineNotIdle |
Reports a speech synthesis engine not idle condition. |
.ssEngineIdle |
Reports a speech synthesis engine idle condition. |
.ssEngineStopping |
Reports a speech synthesis engine stopping condition. |
Speech Recognition
| Case |
Meaning |
.srEngineNotValid |
Reports a speech recognition engine not valid condition. |
.srEngineNotAvailable |
Reports a speech recognition engine not available condition. |
.srEngineStartFailed |
Reports a speech recognition engine start failed condition. |
.srEngineLanguageNotSupported |
Reports a speech recognition engine language not supported condition. |
.srTaskNotSpecified |
Reports a speech recognition task not specified condition. |
.srEngineNotIdle |
Reports a speech recognition engine not idle condition. |
.srEngineIdle |
Reports a speech recognition engine idle condition. |
.srEngineStopping |
Reports a speech recognition engine stopping condition. |
.srEngineStateNotAvailable |
Reports a speech recognition engine state not available condition. |
.srOnDeviceRecognitionNotSupported |
Reports a speech recognition on device recognition not supported condition. |
Audio Recording
| Case |
Meaning |
.audioRecorderNotIdle |
Reports a audio recorder not idle condition. |
.audioRecorderIdle |
Reports a audio recorder idle condition. |
.audioRecorderStopping |
Reports a audio recorder stopping condition. |
.audioDeviceFormatNotValid |
Reports a audio device format not valid condition. |
.recordAudioSourceFileTypeNotValid |
Reports a record audio source file type not valid condition. |
.recordAudioSourceFileOpenFailed |
Reports a record audio source file open failed condition. |
.recordAudioFilePathNotValid |
Reports a record audio file path not valid condition. |
.recordAudioDestinationNotSpecified |
Reports a record audio destination not specified condition. |
.recordAudioFileTypeNotValid |
Reports a record audio file type not valid condition. |
.recordAudioFormatNotValid |
Reports a record audio format not valid condition. |
.recordAudioWriteFailed |
Reports a record audio write failed condition. |
Audio Environment
| Case |
Meaning |
.audioEnvironmentError |
Reports a audio environment error condition. |
.audioEnvironmentInsufficientPriority |
Reports a audio environment insufficient priority condition. |
.audioEnvironmentAudioProcessingNotAvailable |
Reports a audio environment audio processing not available condition. |
.audioEnvironmentRouteChangeFailed |
Reports a audio environment route change failed condition. |
.conversationalModeTransitionInProgress |
Reports a conversational mode transition in progress condition. |
.conversationalModeEnableFailed |
Reports a conversational mode enable failed condition. |
.conversationalModeDisableFailed |
Reports a conversational mode disable failed condition. |
.audioFunctionRequiresForeground |
Reports a audio function requires foreground condition. |
Conversation Lifecycle
| Case |
Meaning |
.conversationPaused |
Reports a conversation paused condition. |
.conversationIdle |
Reports a conversation idle condition. |
.conversationStopping |
Reports a conversation stopping condition. |
.conversationAudioProcessingUnavailable |
Reports a conversation audio processing unavailable condition. |
.conversationNotPaused |
Reports a conversation not paused condition. |
.conversationNotInitialized |
Reports a conversation not initialized condition. |
.conversationNotIdle |
Reports a conversation not idle condition. |
.conversationNotActive |
Reports a conversation not active condition. |
Conversation Structure
| Case |
Meaning |
.conversationStartBoundaryNotFound |
Reports a conversation start boundary not found condition. |
.conversationEndBoundaryNotFound |
Reports a conversation end boundary not found condition. |
.conversationModuleTypeNotValid |
Reports a conversation module type not valid condition. |
.conversationModuleIDNotFound |
Reports a conversation module idnot found condition. |
Conversation Prompts
| Case |
Meaning |
.promptIDNotFound |
Reports a prompt idnot found condition. |
.promptCollectionLoadFailed |
Reports a prompt collection load failed condition. |
.conversationPromptNotValid |
Reports a conversation prompt not valid condition. |
.recordAudioPromptIDNotValid |
Reports a record audio prompt idnot valid condition. |
Conversation Audio Dialog
| Case |
Meaning |
.audioDialogAlreadyStarted |
Reports a audio dialog already started condition. |
.recognizeAudioSaveUtterancePathNotValid |
Reports a recognize audio save utterance path not valid condition. |
.recognizeAudioTaskParamsNotValid |
Reports a recognize audio task params not valid condition. |
Conversation Audio Listener
| Case |
Meaning |
.audioListenerAlreadyStarted |
Reports a audio listener already started condition. |
.audioListenerFinished |
Reports a audio listener finished condition. |
.conversationModuleNotAudioListener |
Reports a conversation module not audio listener condition. |
Conversation Resource Locations
| Case |
Meaning |
.playAudioLocationNotValid |
Reports a play audio location not valid condition. |
.playTextLocationNotValid |
Reports a play text location not valid condition. |
.recordAudioLocationNotValid |
Reports a record audio location not valid condition. |
.srFilesLocationNotValid |
Reports a speech recognition files location not valid condition. |
.ssFilesLocationNotValid |
Reports a speech synthesis files location not valid condition. |
.conversationsLocationNotValid |
Reports a conversations location not valid condition. |
See Also