Skip to main content

Transcriber

Trait Transcriber 

Source
pub trait Transcriber: Send + Sync {
    // Required methods
    fn transcribe<'life0, 'life1, 'async_trait>(
        &'life0 self,
        audio: &'life1 [u8],
    ) -> Pin<Box<dyn Future<Output = Result<Transcript, TranscribeError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn transcribe_with_config<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        audio: &'life1 [u8],
        config: &'life2 TranscriptConfig,
    ) -> Pin<Box<dyn Future<Output = Result<Transcript, TranscribeError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn name(&self) -> &str;
}
Expand description

Core trait for audio transcription backends.

Required Methods§

Source

fn transcribe<'life0, 'life1, 'async_trait>( &'life0 self, audio: &'life1 [u8], ) -> Pin<Box<dyn Future<Output = Result<Transcript, TranscribeError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Transcribe audio bytes into text.

Source

fn transcribe_with_config<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, audio: &'life1 [u8], config: &'life2 TranscriptConfig, ) -> Pin<Box<dyn Future<Output = Result<Transcript, TranscribeError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Transcribe with explicit configuration.

Source

fn name(&self) -> &str

Name of this transcriber backend.

Implementors§