Struct LocalWhisperProvider
pub struct LocalWhisperProvider { /* private fields */ }Implementations§
Source§impl LocalWhisperProvider
impl LocalWhisperProvider
Sourcepub fn from_config(
alias: &str,
config: &LocalWhisperConfig,
) -> Result<LocalWhisperProvider, Error>
pub fn from_config( alias: &str, config: &LocalWhisperConfig, ) -> Result<LocalWhisperProvider, Error>
Build from config. Fails if url is empty, if url is not a valid
HTTP/HTTPS URL (scheme must be http or https), if max_audio_bytes
is zero, or if timeout_secs is zero.
bearer_token is optional: absent, empty, or whitespace-only all mean
“send no Authorization header”, which is what a loopback whisper.cpp
server expects.
Sourcepub fn from_typed_config(
alias: &str,
cfg: &LocalWhisperTranscriptionProviderConfig,
) -> Result<LocalWhisperProvider, Error>
pub fn from_typed_config( alias: &str, cfg: &LocalWhisperTranscriptionProviderConfig, ) -> Result<LocalWhisperProvider, Error>
Build from a typed [providers.transcription.local_whisper.<alias>] entry.
Delegates validation to from_config via a bridge — the typed config
uses uri instead of url but is otherwise identical.
Trait Implementations§
Source§impl Attributable for LocalWhisperProvider
impl Attributable for LocalWhisperProvider
fn role(&self) -> Role
fn alias(&self) -> &str
Source§fn tool_provenance(&self) -> ToolProvenance
fn tool_provenance(&self) -> ToolProvenance
Classifies whether a tool implementation is first-party native code or
an extension. The conservative default prevents a new wrapper from
inheriting native presentation privileges accidentally.
Source§impl TranscriptionProvider for LocalWhisperProvider
impl TranscriptionProvider for LocalWhisperProvider
Source§fn transcribe<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
audio_data: &'life1 [u8],
file_name: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
LocalWhisperProvider: 'async_trait,
fn transcribe<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
audio_data: &'life1 [u8],
file_name: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
LocalWhisperProvider: 'async_trait,
Transcribe raw audio bytes.
file_name includes the extension for
format detection (e.g. “voice.ogg”).Source§fn supported_formats(&self) -> Vec<String>
fn supported_formats(&self) -> Vec<String>
List of supported audio file extensions.
Auto Trait Implementations§
impl Freeze for LocalWhisperProvider
impl RefUnwindSafe for LocalWhisperProvider
impl Send for LocalWhisperProvider
impl Sync for LocalWhisperProvider
impl Unpin for LocalWhisperProvider
impl UnsafeUnpin for LocalWhisperProvider
impl UnwindSafe for LocalWhisperProvider
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more