Struct async_openai_wasm::Audio
source · pub struct Audio<'c> { /* private fields */ }
Expand description
Turn audio into text Related guide: Speech to text
Implementations§
source§impl<'c> Audio<'c>
impl<'c> Audio<'c>
pub fn new(client: &'c Client) -> Self
sourcepub async fn transcribe(
&self,
request: CreateTranscriptionRequest
) -> Result<CreateTranscriptionResponseJson, OpenAIError>
pub async fn transcribe( &self, request: CreateTranscriptionRequest ) -> Result<CreateTranscriptionResponseJson, OpenAIError>
Transcribes audio into the input language.
sourcepub async fn transcribe_verbose_json(
&self,
request: CreateTranscriptionRequest
) -> Result<CreateTranscriptionResponseVerboseJson, OpenAIError>
pub async fn transcribe_verbose_json( &self, request: CreateTranscriptionRequest ) -> Result<CreateTranscriptionResponseVerboseJson, OpenAIError>
Transcribes audio into the input language.
sourcepub async fn transcribe_raw(
&self,
request: CreateTranscriptionRequest
) -> Result<Bytes, OpenAIError>
pub async fn transcribe_raw( &self, request: CreateTranscriptionRequest ) -> Result<Bytes, OpenAIError>
Transcribes audio into the input language.
sourcepub async fn translate(
&self,
request: CreateTranslationRequest
) -> Result<CreateTranslationResponse, OpenAIError>
pub async fn translate( &self, request: CreateTranslationRequest ) -> Result<CreateTranslationResponse, OpenAIError>
Translates audio into into English.
sourcepub async fn speech(
&self,
request: CreateSpeechRequest
) -> Result<CreateSpeechResponse, OpenAIError>
pub async fn speech( &self, request: CreateSpeechRequest ) -> Result<CreateSpeechResponse, OpenAIError>
Generates audio from the input text.
Auto Trait Implementations§
impl<'c> Freeze for Audio<'c>
impl<'c> !RefUnwindSafe for Audio<'c>
impl<'c> !Send for Audio<'c>
impl<'c> !Sync for Audio<'c>
impl<'c> Unpin for Audio<'c>
impl<'c> !UnwindSafe for Audio<'c>
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