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

Create a new configuration for a mic stream

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.