message static method
Human-readable label for a rac_result_t.
Strings are built at codegen time rather than from ProtobufEnum names, which a build can strip with --define=protobuf.omit_enum_names=true.
Implementation
static String message(int code) {
switch (code) {
case success:
return 'Success';
case errorNotInitialized:
return 'Not initialized';
case errorAlreadyInitialized:
return 'Already initialized';
case errorInitializationFailed:
return 'Initialization failed';
case errorInvalidConfiguration:
return 'Invalid configuration';
case errorInvalidApiKey:
return 'Invalid API key';
case errorEnvironmentMismatch:
return 'Environment mismatch';
case errorInvalidParameter:
return 'Invalid parameter';
case errorModelNotFound:
return 'Model not found';
case errorModelLoadFailed:
return 'Model load failed';
case errorModelValidationFailed:
return 'Model validation failed';
case errorModelIncompatible:
return 'Model incompatible';
case errorInvalidModelFormat:
return 'Invalid model format';
case errorModelStorageCorrupted:
return 'Model storage corrupted';
case errorModelNotLoaded:
return 'Model not loaded';
case errorGenerationFailed:
return 'Generation failed';
case errorGenerationTimeout:
return 'Generation timeout';
case errorContextTooLong:
return 'Context too long';
case errorTokenLimitExceeded:
return 'Token limit exceeded';
case errorCostLimitExceeded:
return 'Cost limit exceeded';
case errorInferenceFailed:
return 'Inference failed';
case errorGenerationCancelled:
return 'Generation cancelled';
case errorNetworkUnavailable:
return 'Network unavailable';
case errorNetworkError:
return 'Network error';
case errorRequestFailed:
return 'Request failed';
case errorDownloadFailed:
return 'Download failed';
case errorServerError:
return 'Server error';
case errorTimeout:
return 'Timeout';
case errorInvalidResponse:
return 'Invalid response';
case errorHttpError:
return 'HTTP error';
case errorConnectionLost:
return 'Connection lost';
case errorPartialDownload:
return 'Partial download';
case errorHttpRequestFailed:
return 'HTTP request failed';
case errorHttpNotSupported:
return 'HTTP not supported';
case errorInsufficientStorage:
return 'Insufficient storage';
case errorStorageFull:
return 'Storage full';
case errorStorageError:
return 'Storage error';
case errorFileNotFound:
return 'File not found';
case errorFileReadFailed:
return 'File read failed';
case errorFileWriteFailed:
return 'File write failed';
case errorPermissionDenied:
return 'Permission denied';
case errorDeleteFailed:
return 'Delete failed';
case errorMoveFailed:
return 'Move failed';
case errorDirectoryCreationFailed:
return 'Directory creation failed';
case errorDirectoryNotFound:
return 'Directory not found';
case errorInvalidPath:
return 'Invalid path';
case errorInvalidFileName:
return 'Invalid file name';
case errorTempFileCreationFailed:
return 'Temp file creation failed';
case errorHardwareUnsupported:
return 'Hardware unsupported';
case errorInsufficientMemory:
return 'Insufficient memory';
case errorComponentNotReady:
return 'Component not ready';
case errorInvalidState:
return 'Invalid state';
case errorServiceNotAvailable:
return 'Service not available';
case errorServiceBusy:
return 'Service busy';
case errorProcessingFailed:
return 'Processing failed';
case errorStartFailed:
return 'Start failed';
case errorNotSupported:
return 'Not supported';
case errorValidationFailed:
return 'Validation failed';
case errorInvalidInput:
return 'Invalid input';
case errorInvalidFormat:
return 'Invalid format';
case errorEmptyInput:
return 'Empty input';
case errorTextTooLong:
return 'Text too long';
case errorInvalidSsml:
return 'Invalid ssml';
case errorInvalidSpeakingRate:
return 'Invalid speaking rate';
case errorInvalidPitch:
return 'Invalid pitch';
case errorInvalidVolume:
return 'Invalid volume';
case errorInvalidArgument:
return 'Invalid argument';
case errorNullPointer:
return 'Null pointer';
case errorBufferTooSmall:
return 'Buffer too small';
case errorOutputTruncated:
return 'Output truncated';
case errorAudioFormatNotSupported:
return 'Audio format not supported';
case errorAudioSessionFailed:
return 'Audio session failed';
case errorMicrophonePermissionDenied:
return 'Microphone permission denied';
case errorInsufficientAudioData:
return 'Insufficient audio data';
case errorEmptyAudioBuffer:
return 'Empty audio buffer';
case errorAudioSessionActivationFailed:
return 'Audio session activation failed';
case errorLanguageNotSupported:
return 'Language not supported';
case errorVoiceNotAvailable:
return 'Voice not available';
case errorStreamingNotSupported:
return 'Streaming not supported';
case errorStreamCancelled:
return 'Stream cancelled';
case errorAuthenticationFailed:
return 'Authentication failed';
case errorUnauthorized:
return 'Unauthorized';
case errorForbidden:
return 'Forbidden';
case errorKeychainError:
return 'Keychain error';
case errorEncodingError:
return 'Encoding error';
case errorDecodingError:
return 'Decoding error';
case errorSecureStorageFailed:
return 'Secure storage failed';
case errorExtractionFailed:
return 'Extraction failed';
case errorChecksumMismatch:
return 'Checksum mismatch';
case errorUnsupportedArchive:
return 'Unsupported archive';
case errorCalibrationFailed:
return 'Calibration failed';
case errorCalibrationTimeout:
return 'Calibration timeout';
case errorCancelled:
return 'Cancelled';
case errorModuleNotFound:
return 'Module not found';
case errorModuleAlreadyRegistered:
return 'Module already registered';
case errorModuleLoadFailed:
return 'Module load failed';
case errorServiceNotFound:
return 'Service not found';
case errorServiceAlreadyRegistered:
return 'Service already registered';
case errorServiceCreateFailed:
return 'Service create failed';
case errorCapabilityNotFound:
return 'Capability not found';
case errorProviderNotFound:
return 'Provider not found';
case errorNoCapableProvider:
return 'No capable provider';
case errorNotFound:
return 'Not found';
case errorAdapterNotSet:
return 'Adapter not set';
case errorBackendNotFound:
return 'Backend not found';
case errorBackendNotReady:
return 'Backend not ready';
case errorBackendInitFailed:
return 'Backend init failed';
case errorBackendBusy:
return 'Backend busy';
case errorBackendUnavailable:
return 'Backend unavailable';
case errorRuntimeUnavailable:
return 'Runtime unavailable';
case errorBackendError:
return 'Backend error';
case errorInvalidHandle:
return 'Invalid handle';
case errorEventInvalidCategory:
return 'Event invalid category';
case errorEventSubscriptionFailed:
return 'Event subscription failed';
case errorEventPublishFailed:
return 'Event publish failed';
case errorNotImplemented:
return 'Not implemented';
case errorFeatureNotAvailable:
return 'Feature not available';
case errorFrameworkNotAvailable:
return 'Framework not available';
case errorUnsupportedModality:
return 'Unsupported modality';
case errorUnknown:
return 'Unknown';
case errorInternal:
return 'Internal';
case errorAbiVersionMismatch:
return 'ABI version mismatch';
case errorCapabilityUnsupported:
return 'Capability unsupported';
case errorPluginDuplicate:
return 'Plugin duplicate';
case errorPluginLoadFailed:
return 'Plugin load failed';
case errorPluginBusy:
return 'Plugin busy';
case errorWasmLoadFailed:
return 'WASM load failed';
case errorWasmNotLoaded:
return 'WASM not loaded';
case errorWasmCallbackError:
return 'WASM callback error';
case errorWasmMemoryError:
return 'WASM memory error';
default:
return 'Unknown error (code: $code)';
}
}