wavekat_asr/error.rs
1use thiserror::Error;
2
3/// Errors that can occur during streaming ASR.
4#[derive(Debug, Error)]
5pub enum AsrError {
6 #[error("backend error: {0}")]
7 Backend(String),
8
9 #[error("invalid audio frame: {0}")]
10 InvalidFrame(String),
11
12 #[error("session already finished")]
13 AlreadyFinished,
14
15 #[error("backend not compiled in — enable the matching Cargo feature")]
16 BackendNotEnabled,
17
18 #[error("io: {0}")]
19 Io(#[from] std::io::Error),
20}