pub struct AudioClient { /* private fields */ }👎Deprecated since 2.0.0:
The OpenAI direct clients are deprecated; use the Session API instead (AudioSession::new(&model)).
Expand description
Client for OpenAI-compatible audio transcription backed by a local model.
Implementations§
Source§impl AudioClient
impl AudioClient
Sourcepub fn language(self, lang: impl Into<String>) -> Self
pub fn language(self, lang: impl Into<String>) -> Self
Set the language hint for transcription.
Sourcepub fn temperature(self, v: f64) -> Self
pub fn temperature(self, v: f64) -> Self
Set the sampling temperature.
Sourcepub async fn transcribe(
&self,
audio_file_path: impl AsRef<Path>,
) -> Result<AudioTranscriptionResponse, FoundryLocalError>
pub async fn transcribe( &self, audio_file_path: impl AsRef<Path>, ) -> Result<AudioTranscriptionResponse, FoundryLocalError>
Transcribe an audio file.
Sourcepub async fn transcribe_streaming(
&self,
audio_file_path: impl AsRef<Path>,
) -> Result<AudioTranscriptionStream, FoundryLocalError>
pub async fn transcribe_streaming( &self, audio_file_path: impl AsRef<Path>, ) -> Result<AudioTranscriptionStream, FoundryLocalError>
Transcribe an audio file with streaming results, returning an
AudioTranscriptionStream.
Sourcepub fn create_live_transcription_session(&self) -> LiveAudioTranscriptionSession
👎Deprecated since 2.0.0: The OpenAI direct clients are deprecated; use AudioSession::new(&model) with streaming instead.
pub fn create_live_transcription_session(&self) -> LiveAudioTranscriptionSession
The OpenAI direct clients are deprecated; use AudioSession::new(&model) with streaming instead.
Create a LiveAudioTranscriptionSession for real-time audio
streaming transcription.
Auto Trait Implementations§
impl Freeze for AudioClient
impl RefUnwindSafe for AudioClient
impl Send for AudioClient
impl Sync for AudioClient
impl Unpin for AudioClient
impl UnsafeUnpin for AudioClient
impl UnwindSafe for AudioClient
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