Skip to main content

voxora_traits/
lib.rs

1//! Canonical traits and value types for the voxora model-agnostic ASR
2//! bridge.
3//!
4//! This crate is the canonical home of the public API surface. It has
5//! zero runtime dependencies (no `tokio`, no `reqwest`, no `async-trait`
6//! requirement beyond the trait-level use of `async-trait`).
7//!
8//! ## Removed predecessor: `voxora-core`
9//!
10//! `voxora-core` was a thin re-export shim from 0.3.0 to 0.3.1
11//! that allowed downstream code to import the trait surface via
12//! `use voxora_core::*;` while the canonical home was this crate.
13//! The shim was deprecated in 0.3.1 and **removed in 0.4.0**. New
14//! code has always depended, and continues to depend, on
15//! `voxora-traits` directly. See `README.md` → Upgrade guide and
16//! `CHANGELOG.md` → 0.4.0 for the migration recipe.
17//!
18//! ## ASR-specific
19//!
20//! Per operator direction, the design is ASR-specific. The
21//! [`AsrEngine`] trait is purpose-built for automatic speech
22//! recognition. New domains (LLM, vision, multimodal) are out of
23//! scope per the architecture handoff.
24
25#![forbid(unsafe_code)]
26#![warn(missing_docs)]
27
28pub mod engine;
29pub mod error;
30pub mod source;
31pub mod streaming;
32
33pub use engine::{
34    AsrEngine, ModelCapabilities, TranscribeOptions, TranscriptionResult, TranscriptionSegment,
35};
36pub use error::AsrError;
37pub use source::{
38    ModelDescriptor, ModelDir, ModelSource, ModelSourceKind, Quantization, QuantizationPreference,
39    ResolveOptions,
40};
41pub use streaming::{StreamingAsrEngine, StreamingOptions, StreamingResult, StreamingSession};
42
43#[cfg(test)]
44mod tests {
45    #[test]
46    fn public_surface_round_trip() {
47        let _: crate::ModelCapabilities = crate::ModelCapabilities::default();
48    }
49}