SttProvider

Trait SttProvider 

Source
pub trait SttProvider: Send + Sync {
    // Required methods
    fn provider_id(&self) -> &'static str;
    fn transcribe_file<'life0, 'life1, 'async_trait>(
        &'life0 self,
        audio_path: &'life1 Path,
    ) -> Pin<Box<dyn Future<Output = Result<TranscriptionResult, AppError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
}
Expand description

Unified STT interface (async).

Provider implementations must be Send + Sync so they can be used behind a Box<dyn SttProvider> across async boundaries.

Required Methods§

Source

fn provider_id(&self) -> &'static str

Returns a stable provider id for logs/telemetry.

Source

fn transcribe_file<'life0, 'life1, 'async_trait>( &'life0 self, audio_path: &'life1 Path, ) -> Pin<Box<dyn Future<Output = Result<TranscriptionResult, AppError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Transcribe an audio file into text.

Implementors§