简体   繁体   English

从Python脚本触发Google Assistant SDK

[英]Trigger Google Assistant SDK from Python script

I'm running the Google Assistant SDK on RPi 3B. 我在RPi 3B上运行Google Assistant SDK。
To trigger the Assistant, I've set up a Python script that detects an input. 为了触发助手,我设置了一个检测输入的Python脚本。
I have painfully little knowledge over Python, and have no clue how to trigger the Assistant from this script. 我对Python的知识很少,并且不知道如何从这个脚本触发助手。

Can anyone help me with this? 谁能帮我这个?

You can use the Python OS function: 您可以使用Python OS功能:

import os

os.system('/home/pi/env/bin/./python /home/pi/env/bin/google-assistant-demo')

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM