Struct async_openai::Audio
source · pub struct Audio<'c, C: Config> { /* private fields */ }
Expand description
Turn audio into text Related guide: Speech to text
Implementations§
source§impl<'c, C: Config> Audio<'c, C>
impl<'c, C: Config> Audio<'c, C>
pub fn new(client: &'c Client<C>) -> Self
sourcepub async fn transcribe(
&self,
request: CreateTranscriptionRequest
) -> Result<CreateTranscriptionResponse, OpenAIError>
pub async fn transcribe( &self, request: CreateTranscriptionRequest ) -> Result<CreateTranscriptionResponse, 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.
Auto Trait Implementations§
impl<'c, C> !RefUnwindSafe for Audio<'c, C>
impl<'c, C> Send for Audio<'c, C>where C: Sync,
impl<'c, C> Sync for Audio<'c, C>where C: Sync,
impl<'c, C> Unpin for Audio<'c, C>
impl<'c, C> !UnwindSafe for Audio<'c, 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