#[non_exhaustive]pub enum AsrError {
ModelNotFound(String),
Unsupported(&'static str),
InvalidInput(String),
AudioIo {
path: PathBuf,
source: Error,
},
Inference(String),
Config(String),
Network {
url: String,
message: String,
source: Option<Box<dyn Error + Send + Sync>>,
},
}Expand description
All errors a voxora engine or model source may return.
#[non_exhaustive] so we can add variants in future minor releases
without breaking downstream match arms.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ModelNotFound(String)
The requested model could not be located by any known source.
Unsupported(&'static str)
The requested operation is not supported by this engine / source.
InvalidInput(String)
Caller-supplied input was rejected (bad audio format, unknown language code, out-of-range parameter, …).
AudioIo
Audio file I/O failed.
Inference(String)
The inference pass failed inside the engine (numerical error, shape mismatch, OOM, …).
Config(String)
The model or runtime configuration is invalid.
Network
Network failure while acquiring a model (DNS, TCP, TLS, HTTP transport, timeout, non-success status, or auth challenge).
The voxora-traits crate stays offline-pure (no reqwest, no
tokio); this variant only carries a String URL, a String
message, and an optional boxed std::error::Error. The actual
network code lives in voxora-hf.
Implementations§
Trait Implementations§
Source§impl Error for AsrError
impl Error for AsrError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()