我需要一些关于Raspberry Pi 3型号B上的Google智能助理的帮助。我已经按照教程完成了一切。最后我试着用它来开始:
(env) pi@raspberrypi:~ $ python -m googlesamples.assistant.grpc.pushtotalk
但后来我得到了:
INFO:root:Connecting to embeddedassistant.googleapis.com
Traceback (most recent call last):
File "/usr/lib/python3.5/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/pi/env/lib/python3.5/site-packages/googlesamples/assistant/grpc/pushtotalk.py", line 434, in <module>
main()
File "/home/pi/env/lib/python3.5/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/home/pi/env/lib/python3.5/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/home/pi/env/lib/python3.5/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/pi/env/lib/python3.5/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/home/pi/env/lib/python3.5/site-packages/googlesamples/assistant/grpc/pushtotalk.py", line 332, in main
flush_size=audio_flush_size
File "/home/pi/env/lib/python3.5/site-packages/googlesamples/assistant/grpc/audio_helpers.py", line 187, in __init__
blocksize=int(block_size/2), # blocksize is in number of frames.
File "/home/pi/env/lib/python3.5/site-packages/sounddevice.py", line 1256, in __init__
**_remove_self(locals()))
File "/home/pi/env/lib/python3.5/site-packages/sounddevice.py", line 772, in __init__
'Error opening {0}'.format(self.__class__.__name__))
File "/home/pi/env/lib/python3.5/site-packages/sounddevice.py", line
2563,
in _check
raise PortAudioError(errormsg, err)
sounddevice.PortAudioError: Error opening RawStream: Invalid sample rate
[PaErrorCode -9997]
更新: 我现在输入: (env)pi @ raspberrypi:〜$ python -m googlesamples.assistant.grpc.pushtotalk 信息:root:连接到embeddedassistant.googleapis.com 警告:root:找不到设备配置:[Errno 2]没有这样的文件或目录:&#39; /home/pi/.config/googlesamples-assistant/device_config.json' 信息:root:注册设备 错误:root:选项 - 注册设备实例时需要--device-model-id。