Skip to main content

STTModelsProvider

Trait STTModelsProvider 

Source
pub trait STTModelsProvider: Send + Sync {
    // Required method
    fn get_current_model(&self) -> ModelInfo;

    // Provided methods
    fn list_models<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = STTResult<Vec<ModelInfo>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn supported_languages(&self) -> Vec<String> { ... }
}
Expand description

Trait for STT model management capabilities

Required Methods§

Source

fn get_current_model(&self) -> ModelInfo

Get current model information (required)

§Returns

Current model information

Provided Methods§

Source

fn list_models<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = STTResult<Vec<ModelInfo>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List available models (optional)

§Returns

List of available model information

Source

fn supported_languages(&self) -> Vec<String>

Get supported languages

Implementors§