pub trait AudioGenerationClient: ProviderClient + Clone {
type AudioGenerationModel: AudioGenerationModel;
// Required method
fn audio_generation_model(&self, model: &str) -> Self::AudioGenerationModel;
}
Expand description
A provider client with audio generation capabilities. Clone is required for conversions between client types.
Required Associated Types§
Sourcetype AudioGenerationModel: AudioGenerationModel
type AudioGenerationModel: AudioGenerationModel
The AudioGenerationModel used by the Client
Required Methods§
Sourcefn audio_generation_model(&self, model: &str) -> Self::AudioGenerationModel
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.