Trait AudioTranscriber Copy item path Source pub trait AudioTranscriber {
type Error : Error + Send + Sync + 'static;
// Required method
fn transcribe (
&self,
audio: &[u8 ],
) -> impl Stream <Item = Result <String , Self::Error >> + Send ;
}Expand description Transcribes audio to text.
§ Example
ⓘ use aither::AudioTranscriber;
use futures_core::Stream;
struct MyTranscriber;
impl AudioTranscriber for MyTranscriber {
fn transcribe(& self , audio: & [u8]) -> impl Stream<Item = String> + Send {
futures_lite::stream::iter(vec! ["Hello world" .to_string()])
}
}The error type returned by this transcriber.
Transcribes audio data to text.
Returns a Stream of transcribed text chunks. Transcription can fail
part-way through, so each chunk is fallible rather than silently
returning a partial transcript.
This trait is not dyn compatible .
In older versions of Rust, dyn compatibility was called "object safety".