Struct ds_transcriber::transcriber::StreamSettings [−][src]
pub struct StreamSettings {
pub silence_level: i32,
pub model_dir_str: String,
pub show_amplitudes: bool,
pub pause_length: f32,
}Expand description
Example
Creates preferences for the configuration of the audio stream and transcription.
let model_path = args().nth(1).expect("Please specify model dir"); let config = ds_transcriber::transcriber::StreamSettings { //value used for pause detection, a pause is detected when the amplitude is less than this silence_level: 200, // the directory of the deep speech model model_dir_str: model_path, // show the amplitude values on stdout (helps you to find your silence level) show_amplitudes: true, // seconds of silence indicating end of speech pause_length: 2.0, };
Fields
silence_level: i32model_dir_str: Stringshow_amplitudes: boolpause_length: f32