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()
|
data.iter()
|
||||||
.map(|x| *x)
|
.map(|x| *x)
|
||||||
.step_by(channels.into())
|
.step_by(channels.into())
|
||||||
|
.step_by((cfg.sample_rate().0 / 16000) as usize)
|
||||||
.for_each(|x| buffer.push(x));
|
.for_each(|x| buffer.push(x));
|
||||||
if Instant::now() - last > five_seconds {
|
if Instant::now() - last > five_seconds {
|
||||||
let result = w.transcribe(&buffer).unwrap();
|
let result = w.transcribe(&buffer).unwrap();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue