successfully confirmed audio is k with sox -r 16000 -t f32 /tmp/transcribed.pcm --default-device
This commit is contained in:
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user