alphacep / alphacep/vosk-api

test_microphone.py returning "Input overflow" for raspberry pi-4

未关闭
#1,003 8 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Jupyter Notebook
星标
15.1k
派生
1.8k
PR 合并指标
30 天内没有已合并 PR

描述

testing out the [test_microphone.py](https://github.com/alphacep/vosk-api/blob/master/python/example/test_microphone.py) example on a raspberry pi. I'm getting "Input overflow" at every iteration of my stream. I see online that people have ran into this issue when [using PyAudio](https://stackoverflow.com/questions/10733903/pyaudio-input-overflowed) but this example is using sounddevice. Any ideas on what's going on and how to fix it?

```
$ pip show vosk
Name: vosk
Version: 0.3.42

$ ./test_microphone.py
LOG (VoskAPI:ReadDataFiles():model.cc:213) Decoding params beam=10 max-active=3000 lattice-beam=2
LOG (VoskAPI:ReadDataFiles():model.cc:216) Silence phones 1:2:3:4:5:6:7:8:9:10
LOG (VoskAPI:RemoveOrphanNodes():nnet-nnet.cc:948) Removed 0 orphan nodes.
LOG (VoskAPI:RemoveOrphanComponents():nnet-nnet.cc:847) Removing 0 orphan components.
LOG (VoskAPI:ReadDataFiles():model.cc:248) Loading i-vector extractor from /home/pi/.cache/vosk/vosk-model-small-en-us-0.15/ivector/final.ie
LOG (VoskAPI:ComputeDerivedVars():ivector-extractor.cc:183) Computing derived variables for iVector extractor
LOG (VoskAPI:ComputeDerivedVars():ivector-extractor.cc:204) Done.
LOG (VoskAPI:ReadDataFiles():model.cc:282) Loading HCL and G from /home/pi/.cache/vosk/vosk-model-small-en-us-0.15/graph/HCLr.fst /home/pi/.cache/vosk/vosk-model-small-en-us-0.15/graph/Gr.fst
LOG (VoskAPI:ReadDataFiles():model.cc:303) Loading winfo /home/pi/.cache/vosk/vosk-model-small-en-us-0.15/graph/phones/word_boundary.int
################################################################################
Press Ctrl+C to stop the recording
################################################################################
{
"partial" : ""
}
input overflow
{
"partial" : ""
}
input overflow
{
"partial" : ""
}
input overflow
{
"partial" : ""
}

```

running print(sounddevice.query_device()) returns the following:
```
> 0 USB PnP Audio Device: Audio (hw:0,0), ALSA (1 in, 0 out)
1 USB2.0 Device: Audio (hw:1,0), ALSA (0 in, 2 out)
2 sysdefault, ALSA (0 in, 128 out)
3 front, ALSA (0 in, 2 out)
4 surround40, ALSA (0 in, 2 out)
5 iec958, ALSA (0 in, 2 out)
6 spdif, ALSA (0 in, 2 out)
7 lavrate, ALSA (0 in, 128 out)
8 samplerate, ALSA (0 in, 128 out)
9 speexrate, ALSA (0 in, 128 out)
10 a52, ALSA (0 in, 6 out)
11 upmix, ALSA (0 in, 8 out)
12 vdownmix, ALSA (0 in, 6 out)
13 dmix, ALSA (0 in, 2 out)
< 14 default, ALSA (0 in, 2 out)
```

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。