Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

尝试语音唤醒出错 #1

Open
FrostN0v0 opened this issue Mar 22, 2023 · 1 comment
Open

尝试语音唤醒出错 #1

FrostN0v0 opened this issue Mar 22, 2023 · 1 comment

Comments

@FrostN0v0
Copy link

报错如下:
`Traceback (most recent call last):
File "/home/rasp/PycharmProjects/nonebot-plugin-iot/app.py", line 5, in
Terminal.run()
File "/home/rasp/PycharmProjects/nonebot-plugin-iot/venv/lib/python3.9/site-packages/iot/terminal.py", line 27, in run
Pipeline.user_loop()
File "/home/rasp/PycharmProjects/nonebot-plugin-iot/venv/lib/python3.9/site-packages/iot/pipeline.py", line 30, in user_loop
if Context.recorder.awake():
File "/home/rasp/PycharmProjects/nonebot-plugin-iot/venv/lib/python3.9/site-packages/iot/core/hardware/recorder.py", line 42, in awake
speech = LiveSpeech(
File "/home/rasp/PycharmProjects/nonebot-plugin-iot/venv/lib/python3.9/site-packages/pocketsphinx/init.py", line 244, in init
self.ad = sounddevice.RawInputStream(
File "/home/rasp/PycharmProjects/nonebot-plugin-iot/venv/lib/python3.9/site-packages/sounddevice.py", line 1192, in init
_StreamBase.init(self, kind='input', wrap_callback='buffer',
File "/home/rasp/PycharmProjects/nonebot-plugin-iot/venv/lib/python3.9/site-packages/sounddevice.py", line 898, in init
_check(_lib.Pa_OpenStream(self._ptr, iparameters, oparameters,
File "/home/rasp/PycharmProjects/nonebot-plugin-iot/venv/lib/python3.9/site-packages/sounddevice.py", line 2747, in _check
raise PortAudioError(errormsg, err)
sounddevice.PortAudioError: Error opening RawInputStream: Invalid sample rate [PaErrorCode -9997]

进程已结束,退出代码1
`
请问应该如何解决

@littlebutt
Copy link
Owner

根据提示是采样率有问题,这个请访问pocketsphinx官网查看相关的解决方案

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants