Skip to main content

SpeechModel

Trait SpeechModel 

Source
pub trait SpeechModel:
    Send
    + Sync
    + 'static {
    // Required methods
    fn provider(&self) -> &ProviderId;
    fn model_id(&self) -> &ModelId;
    fn do_generate(
        &self,
        options: SpeechOptions,
    ) -> impl Future<Output = Result<SpeechResult, ProviderError>> + Send;
}
Expand description

A model that synthesizes speech from text.

Required Methods§

Source

fn provider(&self) -> &ProviderId

Provider identifier.

Source

fn model_id(&self) -> &ModelId

Model identifier.

Source

fn do_generate( &self, options: SpeechOptions, ) -> impl Future<Output = Result<SpeechResult, ProviderError>> + Send

Synthesizes options.text.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§