Struct async_openai::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<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.