AudioGenerationClient

Trait AudioGenerationClient 

Source
pub trait AudioGenerationClient: ProviderClient + Clone {
    type AudioGenerationModel: AudioGenerationModel;

    // Required method
    fn audio_generation_model(&self, model: &str) -> Self::AudioGenerationModel;
}
Available on crate feature audio only.
Expand description

A provider client with audio generation capabilities. Clone is required for conversions between client types.

Required Associated Types§

Source

type AudioGenerationModel: AudioGenerationModel

The AudioGenerationModel used by the Client

Required Methods§

Source

fn audio_generation_model(&self, model: &str) -> Self::AudioGenerationModel

Create an audio generation model with the given name.

§Example
use rig::providers::openai::{Client, self};

// Initialize the OpenAI client
let openai = Client::new("your-open-ai-api-key");

let tts = openai.audio_generation_model(openai::TTS_1);

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T> AudioGenerationClient for rig::providers::azure::Client<T>
where T: HttpClientExt + Clone + Default + Debug + Send + 'static,

Source§

impl<T> AudioGenerationClient for rig::providers::hyperbolic::Client<T>
where T: HttpClientExt + Clone + Default + Debug + Send + 'static,

Available on crate feature image only.
Source§

impl<T> AudioGenerationClient for rig::providers::openai::client::Client<T>
where T: HttpClientExt + Clone + Debug + Send + Default + 'static,