我正在我的Raspberry Pi 3上使用Google Assistant Python库,在让google-assistant-demo在Python虚拟环境中工作之后,我想开始我自己的项目。引用告诉我们一些关于脚本google.assistant.assistant的信息,它包含像start()这样的函数,但是我找不到它。我如何访问它们?
发布于 2017-06-11 17:21:46
你有没有:
后续步骤
现在,您可以开始自己的项目了:
git clone https://github.com/googlesamples/assistant-sdk-python $ cp
-r assistant-sdk-python/google-assistant-sdk/googlesamples/assistant/library new-project 有关自定义Google Assistant事件和操作的更多信息,请参阅下一步。
发布于 2017-06-11 17:40:49
因此,当您克隆项目时,它会创建一个名为“GitHub -project”(或其他任何内容)的新文件夹,其中包含该库和一个名为hotword.py的示例脚本,您可以在其中看到:
from __future__ import print_function
import argparse
import os.path
import json
import google.oauth2.credentials
from google.assistant.library import Assistant
from google.assistant.library.event import EventType
from google.assistant.library.file_helpers import existing_file因此,它看起来比只有一行导入要复杂一点…你从哪里运行你的脚本?
https://stackoverflow.com/questions/44476558
复制相似问题