【问题标题】:Google Assistant on Raspberry Pi 3 Segmentation faultRaspberry Pi 3 上的 Google Assistant 分段错误
【发布时间】:2019-01-11 08:21:21
【问题描述】:

我正在尝试让谷歌助手在 Raspberry Pi 3 上运行。我遇到了一个错误

(env)pi@raspberrypi:~$ googlesamples-assistant-hotword --project-id buddy-fca9f --device-model-id xxxx-xxxxx-xxxx-xxxx.

device_model_id: xxxx-xxxx-xxxx-xxxx
device_id: DBxxxxxxxxxxxxxxxxxx

 Segmentation fault

我正在关注https://developers.google.com/assistant/sdk/guides/library/python/embed/run-sample 进行设置。

我已经使用注册工具注册了我的设备,但它没有帮助。 另一方面,pushtotalk 正在按预期工作。如果您能帮助我或为我指明正确的方向,那就太好了。

【问题讨论】:

    标签: python raspberry-pi raspberry-pi3 google-assistant-sdk


    【解决方案1】:

    我通过在 env 中运行将库升级到 v1.0.1 解决了这个问题

    python -m pip install --upgrade google-assistant-library==1.0.1
    

    This 帮忙。

    【讨论】:

      【解决方案2】:

      同样的问题。

      不知道为什么如果我们不提供 --project-id 它可以工作,但有警告说设备尚未注册。

      这是我们同时使用--project-id--device-model-id 时的结果:https://developers.google.com/assistant/sdk/guides/library/python/

      device_model_id: smartbox-228605-my-model
      device_id: EF949BCF913C3206EEA22E2B28E402CX
      
      Segmentation fault
      

      这是我们只使用--device-model-id时的结果(上面教程的旧版本):

      device_model_id: smartbox-228605-my-model
      device_id: EF949BCF913C3206EEA22E2B28E402CX
      
      
          This device is not registered. This means you will not be able to use
          Device Actions or see your device in Assistant Settings. In order to
          register this device follow instructions at:
      
          https://developers.google.com/assistant/sdk/guides/library/python/embed/register-device
      
      ON_MUTED_CHANGED:
        {"is_muted": false}
      ON_MEDIA_STATE_IDLE
      ON_START_FINISHED
      

      这就是我所做的:

      • $ apt-get update
      • 在控制台上创建新项目
      • 确保在项目中启用了 Google Assistant API(甚至可以激活其他一些触发,例如:Action API
      • 使用googlesamples-assistant-devicetool注册设备
      • 尝试新安装的 raspbian 操作系统(桌面和精简版

      这是我没有做过的:

      • 在 Google Cloud Console 上启用结算(如果是这种情况,那么我就完成了 ;-))

      但是在等待错误时,您可以通过访问以下内容来使用另一个 google 助手启动指令示例:google-assistant-demo --project-id YOUR-ID-PROJECT --device-model-id YOUR-ID-MODEL 参考:https://github.com/googlesamples/assistant-sdk-python/issues/314 甚至只是从存储库中创建您自己的 hotword.py :https://github.com/googlesamples/assistant-sdk-python/tree/master/google-assistant-sdk/googlesamples/assistant/library

      希望有帮助。

      【讨论】:

      • 首先感谢您的帮助。我没有在没有模型 ID 的情况下之前尝试过,但是当我今天在没有模型 ID 的情况下尝试时,它可以工作,但是音频级别非常低(IDK 为什么)。我将研究演示热词,看看它是如何工作的。修复错误或运行启动指令后,我需要放置一个自定义启动指令。知道我该怎么做吗?
      • 不确定他们是否会为我们提供改变它的方法 :),但是您可以在那里找到许多 3rd 方库,例如 snowboy,在这里我找到了一个很好的例子:steemit.com/utopian-io/@neavvy/…
      • python -m pip install --upgrade google-assistant-library==1.0.1 运行这个解决了我的问题。让我知道它是否适合你。
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-11-06
      • 1970-01-01
      • 1970-01-01
      • 2018-12-22
      • 2018-06-24
      相关资源
      最近更新 更多