pub struct TranscribeCommand {
pub wav: PathBuf,
pub backend: Option<String>,
pub model: Option<PathBuf>,
pub format: Option<OutputFormatArg>,
pub speaker: Option<String>,
pub threshold: Option<f32>,
pub speaker_model: Option<PathBuf>,
}Expand description
Transcribes a 16 kHz mono WAV file to JSONL or markdown.
Output format defaults to md on a tty and jsonl when stdout is
piped; pass --format to override. The transcriber backend is chosen
by --backend, then OMNI_DEV_VOICE_BACKEND, then the default
("mock" until a real ASR backend lands — see ADR-0032).
Fields§
§wav: PathBufPath to a 16 kHz mono 16-bit PCM WAV file. Use voice capture to
produce one — transcribe does not resample.
backend: Option<String>Transcriber backend (mock, whisper-candle). Defaults to mock;
see ADR-0033 for the whisper-candle runtime choice.
model: Option<PathBuf>Path to a backend-specific model directory. For whisper-candle,
this overrides OMNI_DEV_VOICE_WHISPER_MODEL and the default at
~/.omni-dev/voice/models/whisper-tiny.en/. Ignored by mock.
format: Option<OutputFormatArg>Output format. Defaults to md on a tty, jsonl when piped.
speaker: Option<String>Enrolled speaker to filter on. Drops any Final event whose
segment doesn’t match the enrolled embedding by cosine
similarity at or above --threshold.
threshold: Option<f32>Cosine-similarity threshold for --speaker. Defaults to 0.5;
see DEFAULT_SPEAKER_THRESHOLD.
speaker_model: Option<PathBuf>Path to the wespeaker ONNX model. Overrides the default at
~/.omni-dev/voice/models/wespeaker-en-voxceleb-resnet34-LM/ and
OMNI_DEV_VOICE_SPEAKER_MODEL. Ignored unless --speaker is
set.
Implementations§
Source§impl TranscribeCommand
impl TranscribeCommand
Sourcepub fn execute(self) -> Result<()>
pub fn execute(self) -> Result<()>
Executes the transcribe command.
Thin shim around Self::run: locks stdout and resolves the
effective format from --format plus tty auto-detection, then
delegates to the writer-generic helper. The split keeps stdout-
locking and tty-detection out of the testable business logic.
Trait Implementations§
Source§impl Args for TranscribeCommand
impl Args for TranscribeCommand
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl CommandFactory for TranscribeCommand
impl CommandFactory for TranscribeCommand
Source§impl FromArgMatches for TranscribeCommand
impl FromArgMatches for TranscribeCommand
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Parser for TranscribeCommand
impl Parser for TranscribeCommand
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Auto Trait Implementations§
impl Freeze for TranscribeCommand
impl RefUnwindSafe for TranscribeCommand
impl Send for TranscribeCommand
impl Sync for TranscribeCommand
impl Unpin for TranscribeCommand
impl UnsafeUnpin for TranscribeCommand
impl UnwindSafe for TranscribeCommand
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
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>
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