#[non_exhaustive]pub struct AudioModel {
pub id: String,
pub name: String,
pub description: Option<String>,
pub speech: bool,
pub dialogue: bool,
pub voice_design: bool,
}Expand description
A model of a speech provider and what it can do.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: StringName of the model in the API.
name: StringDisplay name.
description: Option<String>Description.
speech: boolWhether the model speaks single texts.
dialogue: boolWhether the model speaks dialogues.
voice_design: boolWhether the model designs voices.
Implementations§
Source§impl AudioModel
impl AudioModel
Sourcepub fn new(id: impl Into<String>, name: impl Into<String>) -> Self
pub fn new(id: impl Into<String>, name: impl Into<String>) -> Self
Creates a speech model with its ID and display name.
Sourcepub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
Sets the description.
Sourcepub fn with_speech(self, speech: bool) -> Self
pub fn with_speech(self, speech: bool) -> Self
Sets whether the model speaks single texts.
Sourcepub fn with_dialogue(self, dialogue: bool) -> Self
pub fn with_dialogue(self, dialogue: bool) -> Self
Sets whether the model speaks dialogues.
Sourcepub fn with_voice_design(self, voice_design: bool) -> Self
pub fn with_voice_design(self, voice_design: bool) -> Self
Sets whether the model designs voices.
Trait Implementations§
Source§impl Clone for AudioModel
impl Clone for AudioModel
Source§impl Debug for AudioModel
impl Debug for AudioModel
impl Eq for AudioModel
Source§impl PartialEq for AudioModel
impl PartialEq for AudioModel
impl StructuralPartialEq for AudioModel
Auto Trait Implementations§
impl Forget for AudioModel
impl Freeze for AudioModel
impl Move for AudioModel
impl RefUnwindSafe for AudioModel
impl Send for AudioModel
impl Sync for AudioModel
impl Unpin for AudioModel
impl UnsafeUnpin for AudioModel
impl UnwindSafe for AudioModel
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.