You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

树莓派Google Voice客户端执行代码报错:需指定SDK客户端类型

Fixing the 400 Invalid Argument Error When Registering Google Assistant Push-to-Talk

I've run into this exact issue before when setting up the Google Assistant SDK on a Raspberry Pi. That error message spells out exactly what's wrong—you need to specify a client type (SDK_LIBRARY or SDK_SERVICE) when registering your device instance.

Why This Happens

Google updated the Assistant SDK to require explicitly declaring what kind of client your device is. The two valid options are:

  • SDK_LIBRARY: For embedded/local hardware like your Raspberry Pi (this is the one you’ll want for your setup)
  • SDK_SERVICE: For cloud-hosted service applications

Step-by-Step Fix

  1. Register Your Device with the Required Client Type
    Open your terminal and run this command, replacing your-device-id with a custom name for your device (e.g., pi-assistant-01):

    googlesamples-assistant-devicetool register-device --project-id inner-bonus-190416 --device-model-id inner-bonus-190416 --device-id your-device-id --client-type SDK_LIBRARY
    

    This command will generate the missing device_config.json file in /home/pi/.config/googlesamples-assistant/ that the initial warning referenced.

  2. Launch the Push-to-Talk Assistant Again
    Now re-run your original command, making sure to include the --device-id you just set:

    googlesamples-assistant-pushtotalk --project-id inner-bonus-190416 --device-model-id inner-bonus-190416 --device-id your-device-id
    

That should get you connected to the Assistant service without hitting the 400 error.

内容的提问来源于stack exchange,提问作者John Clark

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.15 03:18:55