如何在 MacOSX 上安装 Google Assistant SDK

How to install Google Assistant SDK on MacOSX

Google Assistant SDK list Raspberry Pi has a supported platform, are the Python samples兼容MacOSX的文档?

虽然 Google Assistant SDK 示例设计用于 Raspberry Pi,但 Python 示例主要使用 sounddevice and grpcio 包,并且都提供 python 适用于 MacOSX 的轮子,因此它应该可以轻松工作。

  • 下载Python 3.x for MacOSX
  • 创建虚拟环境

    python3 -m venv env
    env/bin/python -m pip install --upgrade pip setuptools
    source env/bin/activate
    
  • 安装SDK

    (env) $ pip install google-assistant-sdk[samples]
    
  • 运行样本

    (env) $ googlesamples-assistant-pushtotalk
    

我在 Mac 上有一个用 Go 运行 编写的 Google Assistant 演示(应该也可以为 Windows 编译) https://github.com/mattetti/ok-go

我有一个原生的 macOS 应用程序正在运行。它位于菜单栏中并接受命令。但是,它是用 Swift 3.1 编写的,而不是 Python。你可以找到它here