Struct ds_transcriber::transcriber::StreamSettings [−][src]
pub struct StreamSettings<'a> {
pub silence_level: i32,
pub model: &'a mut Model,
pub show_amplitudes: bool,
pub pause_length: f32,
}Expand description
Example
Creates preferences for the configuration of the audio stream and transcription.
let model_dir_str = args().nth(1).expect("Please specify model dir"); let mut ds_model = DeepSpeechModel::instantiate_from(model_dir_str); let model = ds_model.model(); let mut config = ds_transcriber::transcriber::StreamSettings { //value used for pause detection, a pause is detected when the amplitude is less than this silence_level: 200, // takes a reference of the model we instantiated earlier model, // show the amplitude values on stdout (helps you to find your silence level) show_amplitudes: true, // seconds of silence indicating end of speech (begin transcribe when pause_length is grater than....) pause_length: 2.0, };
Fields
silence_level: i32model: &'a mut Modelshow_amplitudes: boolpause_length: f32