successfully confirmed audio is k with sox -r 16000 -t f32 /tmp/transcribed.pcm --default-device
parent
4ef419e6c0
commit
b4c9ecb98b
|
|
@ -69,6 +69,7 @@ fn main() {
|
|||
data.iter()
|
||||
.map(|x| *x)
|
||||
.step_by(channels.into())
|
||||
.step_by((cfg.sample_rate().0 / 16000) as usize)
|
||||
.for_each(|x| buffer.push(x));
|
||||
if Instant::now() - last > five_seconds {
|
||||
let result = w.transcribe(&buffer).unwrap();
|
||||
|
|
|
|||
Loading…
Reference in New Issue