raspberry-pi - 谷歌助手树莓派问题 | 启动指令不起作用
问题描述
我是 raspberry 和 python 的新手,我已经使用本教程https://pimylifeup.com/raspberry-pi-google-assistant/在我的 Raspberry Pi 4 B 上使用 Raspbian 安装了 Google Assistant。
这工作正常:
googlesamples-assistant-pushtotalk
测试它,我收到以下错误:
(env) pi@raspberrypi:~ $ google-assistant-demo --project-id XXX
Traceback (most recent call last):
File "/home/pi/env/bin/google-assistant-demo", line 8, in <module>
sys.exit(main())
File "/home/pi/env/lib/python3.7/site-packages/google/assistant/library/__main__.py", line 119, in main
raise Exception('Missing --device-model-id option')
Exception: Missing --device-model-id option
同时运行“ googlesamples-assistant-hotword
”只会给我一个内存访问错误。
我试图让它在启动时免提工作,所以我使用sudo systemctl status assistant.service
了它给了我:
● assistant.service - Google Assistant
Loaded: loaded (/lib/systemd/system/assistant.service; enabled; vendor preset
Active: failed (Result: exit-code) since Sun 2019-12-29 20:11:46 CET; 2s ago
Process: 10343 ExecStart=/bin/bash /home/pi/start_assistant.sh (code=exited, s
Main PID: 10343 (code=exited, status=139)
Dez 29 20:11:45 raspberrypi systemd[1]: Started Google Assistant.
Dez 29 20:11:46 raspberrypi bash[10343]: /home/pi/start_assistant.sh: Zeile 4: 1
Dez 29 20:11:46 raspberrypi systemd[1]: assistant.service: Main process exited,
Dez 29 20:11:46 raspberrypi systemd[1]: assistant.service: Failed with result 'e
lines 1-10/10 (END)
我认为这些错误可能是相关的。
非常感谢您提前。
解决方案
您需要按照官方文档创建设备型号 ID,然后在运行项目时传递该参数。
推荐阅读
- r - 使用 R 和 xlsx 格式化具有特定样式的整个工作表
- java - 生成有效期更长的Docusign Token。
- android - 如何使用 adb 或 appium 获取每个应用程序建立的 UDP 连接的完整列表
- python - django 文件字段实例的下载链接
- maven - 需要帮助来理解 pom.xml 中的第二行
- java - 当 pom.xml 中的依赖项数量达到某个阈值时,tomcat 失败
- asp.net-mvc - 在 asp.net mvc 中使用 nexmo 将播放音频文件添加到现有出站呼叫时发生异常“值不能为空。参数名称为值”
- css - Two column wide image in three column wide page
- google-apps-script - 将附件从 Gmail 复制到云端硬盘
- c# - 从 json URL 显示数据表中的动态数据