pub struct OpenAiVoice {
pub caching_enabled: Option<bool>,
pub provider: ProviderTrue,
pub voice_id: OpenAiVoiceVoiceId,
pub model: Option<ModelTrue>,
pub instructions: Option<String>,
pub speed: Option<f64>,
pub chunk_plan: Option<ChunkPlan>,
pub fallback_plan: Option<FallbackPlan>,
}
Fields§
§caching_enabled: Option<bool>
This is the flag to toggle voice caching for the assistant.
provider: ProviderTrue
This is the voice provider that will be used.
voice_id: OpenAiVoiceVoiceId
§model: Option<ModelTrue>
This is the model that will be used for text-to-speech.
instructions: Option<String>
This is a prompt that allows you to control the voice of your generated audio. Does not work with ‘tts-1’ or ‘tts-1-hd’ models.
speed: Option<f64>
This is the speed multiplier that will be used.
chunk_plan: Option<ChunkPlan>
This is the plan for chunking the model output before it is sent to the voice provider.
fallback_plan: Option<FallbackPlan>
This is the plan for voice provider fallbacks in the event that the primary voice provider fails.
Implementations§
Source§impl OpenAiVoice
impl OpenAiVoice
pub fn new(provider: ProviderTrue, voice_id: OpenAiVoiceVoiceId) -> OpenAiVoice
Trait Implementations§
Source§impl Clone for OpenAiVoice
impl Clone for OpenAiVoice
Source§fn clone(&self) -> OpenAiVoice
fn clone(&self) -> OpenAiVoice
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for OpenAiVoice
impl Debug for OpenAiVoice
Source§impl Default for OpenAiVoice
impl Default for OpenAiVoice
Source§fn default() -> OpenAiVoice
fn default() -> OpenAiVoice
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for OpenAiVoice
impl<'de> Deserialize<'de> for OpenAiVoice
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for OpenAiVoice
impl PartialEq for OpenAiVoice
Source§impl Serialize for OpenAiVoice
impl Serialize for OpenAiVoice
impl StructuralPartialEq for OpenAiVoice
Auto Trait Implementations§
impl Freeze for OpenAiVoice
impl RefUnwindSafe for OpenAiVoice
impl Send for OpenAiVoice
impl Sync for OpenAiVoice
impl Unpin for OpenAiVoice
impl UnwindSafe for OpenAiVoice
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more