pub enum VoicePortError {
NotInitialised,
AlreadyActive,
NotActive,
NotFound(String),
LoadError(String),
DownloadError(String),
Internal(String),
Unimplemented(String),
}Expand description
Errors returned by VoicePipelinePort operations.
These map deterministically to GuiError variants, which in turn map to
HTTP status codes via the existing From<GuiError> for HttpError impl.
Variants§
NotInitialised
The voice pipeline has not been initialised yet (no model loaded).
AlreadyActive
The pipeline is already in an active streaming state.
NotActive
The pipeline is initialised (models loaded) but has not been started.
The caller should POST to /api/voice/start before calling audio I/O
operations. Maps to HTTP 409 Conflict.
NotFound(String)
A requested resource (model, device) was not found.
LoadError(String)
A model failed to load (model file corrupt, incompatible format, etc.).
DownloadError(String)
A model download failed (network, disk, archive extraction).
Internal(String)
Unexpected internal error.
Unimplemented(String)
Feature not yet implemented.
Maps to HTTP 400 Bad Request via GuiError::ValidationFailed. 400 is
intentionally preferred over 501 here because the error is actionable
— the caller should change the request (e.g. switch from VAD to PTT
mode) rather than interpret it as a transient server-side gap.