pub struct DesignVoiceRequest<'a> { /* private fields */ }Expand description
A request to design voices from a description, made by SpeechGenerator::design_voice
and sent by awaiting it. It returns previews to listen to.
Implementations§
Source§impl<'a> DesignVoiceRequest<'a>
impl<'a> DesignVoiceRequest<'a>
Sourcepub fn with_text(self, text: impl Into<String>) -> Self
pub fn with_text(self, text: impl Into<String>) -> Self
Sets the text the previews say, for providers that let you choose.
Sourcepub fn with_language(self, language: impl Into<String>) -> Self
pub fn with_language(self, language: impl Into<String>) -> Self
Sets the language of the voice (a BCP-47 code such as pl). Fish Audio and oMLX send it;
ElevenLabs has no such setting and ignores it.
Sourcepub fn with_count(self, count: usize) -> Self
pub fn with_count(self, count: usize) -> Self
Sets how many previews to ask for (1 by default). A provider may return its own number.
Sourcepub fn with_model(self, model: impl Into<String>) -> Self
pub fn with_model(self, model: impl Into<String>) -> Self
Sets the model for this call, instead of the design model of the provider. It does not turn on voice design for a provider without a design model.
Sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
The description of the voice.
Trait Implementations§
Source§impl<'a> Clone for DesignVoiceRequest<'a>
impl<'a> Clone for DesignVoiceRequest<'a>
Source§impl<'a> Debug for DesignVoiceRequest<'a>
impl<'a> Debug for DesignVoiceRequest<'a>
Source§impl<'a> IntoFuture for DesignVoiceRequest<'a>
impl<'a> IntoFuture for DesignVoiceRequest<'a>
Source§type Output = Result<Vec<VoicePreview>, AudioError>
type Output = Result<Vec<VoicePreview>, AudioError>
The output that the future will produce on completion.
Source§type IntoFuture = Pin<Box<dyn Future<Output = <DesignVoiceRequest<'a> as IntoFuture>::Output> + Send + 'a>>
type IntoFuture = Pin<Box<dyn Future<Output = <DesignVoiceRequest<'a> as IntoFuture>::Output> + Send + 'a>>
Which kind of future are we turning this into?
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for DesignVoiceRequest<'a>
impl<'a> !UnwindSafe for DesignVoiceRequest<'a>
impl<'a> Forget for DesignVoiceRequest<'a>
impl<'a> Freeze for DesignVoiceRequest<'a>
impl<'a> Move for DesignVoiceRequest<'a>
impl<'a> Send for DesignVoiceRequest<'a>
impl<'a> Sync for DesignVoiceRequest<'a>
impl<'a> Unpin for DesignVoiceRequest<'a>
impl<'a> UnsafeUnpin for DesignVoiceRequest<'a>
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