Struct ds_transcriber::StreamSettings
source · [−]pub struct StreamSettings {
pub silence_level: i32,
pub show_amplitudes: bool,
pub pause_length_millis: u32,
}
Expand description
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
sourceimpl StreamSettings
impl StreamSettings
Trait Implementations
sourceimpl Clone for StreamSettings
impl Clone for StreamSettings
sourcefn clone(&self) -> StreamSettings
fn clone(&self) -> StreamSettings
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for StreamSettings
impl Debug for StreamSettings
sourceimpl Default for StreamSettings
impl Default for StreamSettings
impl Copy for StreamSettings
Auto Trait Implementations
impl RefUnwindSafe for StreamSettings
impl Send for StreamSettings
impl Sync for StreamSettings
impl Unpin for StreamSettings
impl UnwindSafe for StreamSettings
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more