【问题标题】:Embed the Google assistant in a Windows computer - device instance ID not generated while running the sample code在 Windows 计算机中嵌入 Google 助手 - 运行示例代码时未生成设备实例 ID
【发布时间】:2018-06-18 18:30:52
【问题描述】:

我正在尝试按照 Set Up Hardware and Network Access (Google Assistant SDK) 的说明在 Windows 计算机上安装 Google Assistant。

我已经能够完成除了最后一步之外的所有步骤。我正在运行示例代码。 https://developers.google.com/assistant/sdk/guides/service/python/embed/run-sample?refresh=1.

在最后一步中,应该生成一个“设备实例 ID”,但这不会发生。看截图:

错误消息指出需要将客户端类型指定为 SDK_LIBRARY 或 SDK_SERVICE。但是,在注册模型时,不允许使用“--client-type [SERVICE|LIBRARY]”选项(请参阅Registration Tool Help)。

如何运行示例代码...以便生成“设备实例 ID”?

我的问题似乎与其他用户报告的问题相似。然而,该用户报告了 Raspberry Pi 的问题,而我报告了 Windows 计算机的问题。见Raspberry Pi and Google Voice client type

【问题讨论】:

  • 解决方案:更新库,使用以下命令 py -m pip install --upgrade google-assistant-sdk[samples] 显然库中存在错误。更新库解决了这个问题。

标签: python sdk google-assistant-sdk google-assist-api device-instance-id


【解决方案1】:

导航到您将客户端机密 JSON 文件下载到的文件夹,然后粘贴以下代码:

googlesamples-assistant-devicetool --project-id PROJECT_ID register-model --model 'my-model-identifier' --type LIGHT --trait action.devices.traits.OnOff --manufacturer 'Assistant SDK developer' --product-name 'Assistant SDK light' --description 'Assistant SDK light device'

注意:用正确的相应详细信息替换所有详细信息。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-01-31
    • 1970-01-01
    • 2010-09-21
    • 1970-01-01
    • 1970-01-01
    • 2012-12-09
    • 2015-04-23
    • 1970-01-01
    相关资源
    最近更新 更多