pub trait AudioGenerationClient {
type AudioGenerationModel: AudioGenerationModel<Client = Self>;
// Provided method
fn audio_generation_model(
&self,
model: impl Into<String>,
) -> 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§
Sourcetype AudioGenerationModel: AudioGenerationModel<Client = Self>
type AudioGenerationModel: AudioGenerationModel<Client = Self>
The AudioGenerationModel used by the Client
Provided Methods§
Sourcefn audio_generation_model(
&self,
model: impl Into<String>,
) -> Self::AudioGenerationModel
fn audio_generation_model( &self, model: impl Into<String>, ) -> 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.