pub struct Transcribe { /* private fields */ }Expand description
Builder returned by transcribe; .await runs the call.
Implementations§
Source§impl Transcribe
impl Transcribe
Sourcepub fn media_type(self, media_type: impl Into<MediaType>) -> Self
pub fn media_type(self, media_type: impl Into<MediaType>) -> Self
Overrides the detected media type of the audio.
Sourcepub fn download(self, download: Arc<dyn DownloadFn>) -> Self
pub fn download(self, download: Arc<dyn DownloadFn>) -> Self
Sets the function used to fetch AudioInput::Url.
Source§impl Transcribe
impl Transcribe
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 Transcribe
impl Transcribe
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 Transcribe
impl Debug for Transcribe
Source§impl IntoFuture for Transcribe
impl IntoFuture for Transcribe
Source§type Output = Result<TranscribeResult, Error>
type Output = Result<TranscribeResult, Error>
The output that the future will produce on completion.
Source§type IntoFuture = Pin<Box<dyn Future<Output = <Transcribe as IntoFuture>::Output> + Send>>
type IntoFuture = Pin<Box<dyn Future<Output = <Transcribe 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 !Freeze for Transcribe
impl !RefUnwindSafe for Transcribe
impl !UnwindSafe for Transcribe
impl Send for Transcribe
impl Sync for Transcribe
impl Unpin for Transcribe
impl UnsafeUnpin for Transcribe
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