pub struct GenerateSpeech { /* private fields */ }Expand description
Builder returned by generate_speech; .await runs the call.
Implementations§
Source§impl GenerateSpeech
impl GenerateSpeech
Sourcepub fn output_format(self, output_format: impl Into<String>) -> Self
pub fn output_format(self, output_format: impl Into<String>) -> Self
Output format (mp3, wav, …).
Sourcepub fn instructions(self, instructions: impl Into<String>) -> Self
pub fn instructions(self, instructions: impl Into<String>) -> Self
Style instructions.
Source§impl GenerateSpeech
impl GenerateSpeech
Sourcepub fn header(self, name: &str, value: &str) -> Self
pub fn header(self, name: &str, value: &str) -> Self
Adds one request header; invalid names or values are ignored.
Sourcepub fn provider_options(self, options: ProviderOptions) -> Self
pub fn provider_options(self, options: ProviderOptions) -> Self
Sets the provider-specific options.
Sourcepub fn provider_option(
self,
provider: impl Into<String>,
options: JsonObject,
) -> Self
pub fn provider_option( self, provider: impl Into<String>, options: JsonObject, ) -> Self
Sets the options of one provider.
Sourcepub fn cancellation(self, token: CancellationToken) -> Self
pub fn cancellation(self, token: CancellationToken) -> Self
Sets the cancellation token.
Sourcepub fn telemetry(self, options: TelemetryOptions) -> Self
pub fn telemetry(self, options: TelemetryOptions) -> Self
Sets the telemetry options.
Source§impl GenerateSpeech
impl GenerateSpeech
Sourcepub fn retry(self, policy: RetryPolicy) -> Self
pub fn retry(self, policy: RetryPolicy) -> Self
Sets the retry policy (default: two retries).
Sourcepub fn max_retries(self, max_retries: u32) -> Self
pub fn max_retries(self, max_retries: u32) -> Self
Sets the number of retries of the default policy.
Trait Implementations§
Source§impl Debug for GenerateSpeech
impl Debug for GenerateSpeech
Source§impl IntoFuture for GenerateSpeech
impl IntoFuture for GenerateSpeech
Source§type Output = Result<GenerateSpeechResult, Error>
type Output = Result<GenerateSpeechResult, Error>
The output that the future will produce on completion.
Source§type IntoFuture = Pin<Box<dyn Future<Output = <GenerateSpeech as IntoFuture>::Output> + Send>>
type IntoFuture = Pin<Box<dyn Future<Output = <GenerateSpeech as IntoFuture>::Output> + Send>>
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 !RefUnwindSafe for GenerateSpeech
impl !UnwindSafe for GenerateSpeech
impl Freeze for GenerateSpeech
impl Send for GenerateSpeech
impl Sync for GenerateSpeech
impl Unpin for GenerateSpeech
impl UnsafeUnpin for GenerateSpeech
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