We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a3dd19e commit b9ee589Copy full SHA for b9ee589
examples/record.rs
@@ -14,8 +14,8 @@ use std::time::Instant;
14
use vad_rs::{Normalizer, Vad, VadStatus};
15
16
// Options
17
-static MIN_SPEECH_DUR: Lazy<usize> = Lazy::new(|| 200); // 0.6s
18
-static MIN_SILENCE_DUR: Lazy<usize> = Lazy::new(|| 500); // 1s
+static MIN_SPEECH_DUR: Lazy<usize> = Lazy::new(|| 700); // 0.6s
+static MIN_SILENCE_DUR: Lazy<usize> = Lazy::new(|| 700);
19
20
// Vad
21
static VAD_BUF: Lazy<Mutex<AllocRingBuffer<f32>>> =
@@ -80,7 +80,7 @@ fn main() -> Result<()> {
80
81
// Loudness normalization
82
83
- let normalizer = Normalizer::new();
+ let normalizer = Normalizer::new(config.channels().into(), config.sample_rate().0);
84
*NORMALIZER.lock().unwrap() = Some(normalizer);
85
86
let stream = match config.sample_format() {
0 commit comments