pub struct StreamSettings {
pub silence_level: i32,
pub show_amplitudes: bool,
pub pause_length_millis: u32,
}
Expand description
Transcription workers
§Example
Creates preferences for the configuration of the audio stream and transcription.
use std::env::args;
use ds_transcriber::model::instance_model;
if let Some(model_dir_str) = args().nth(1) {
let mut model = instance_model(&model_dir_str, None)?;
let mut config = ds_transcriber::StreamSettings::default();
}
Fields§
§silence_level: i32
value used for pause detection, a pause is detected when the amplitude is less than this
show_amplitudes: bool
show the amplitude values on stdout (helps you to find your silence level)
pause_length_millis: u32
seconds of silence indicating end of speech
Implementations§
Trait Implementations§
Source§impl Clone for StreamSettings
impl Clone for StreamSettings
Source§fn clone(&self) -> StreamSettings
fn clone(&self) -> StreamSettings
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for StreamSettings
impl Debug for StreamSettings
Source§impl Default for StreamSettings
impl Default for StreamSettings
impl Copy for StreamSettings
Auto Trait Implementations§
impl Freeze for StreamSettings
impl RefUnwindSafe for StreamSettings
impl Send for StreamSettings
impl Sync for StreamSettings
impl Unpin for StreamSettings
impl UnwindSafe for StreamSettings
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