简体   繁体   English

如何在python中使用Google Assistant start_conversation()API

[英]how to use google assistant start_conversation() API in python

start_conversation() API according to documentation provided here should manually start recording and sending it to google servers. 根据此处提供的文档,start_conversation()API应该手动开始记录并将其发送到Google服务器。 But I don't see this happening. 但我看不到这种情况。 Using this API I don't get a response. 使用此API我没有得到回应。 Please provided an example has to how to use it. 请提供一个示例,说明如何使用它。

Background: 背景:

I'm using Raspberry Pi 3 as hardware platform and on which I have installed the google assistant SDK. 我使用Raspberry Pi 3作为硬件平台,并在上面安装了Google Assistant SDK。 So far, I'm successfully able to trigger the device using hotwords and also get response. 到目前为止,我已经能够使用热字成功触发设备并获得响应。 I wanted to get rid of hotword triggering and start conversing just like that. 我想摆脱热词触发,然后像这样开始对话。 For this purpose I have used set_mic_mute API which makes the assistant not to listen to the word. 为此,我使用了set_mic_mute API,该API使助手不听单词。 After this I'm calling the start_conversation API to start sending my query to google server. 之后,我将调用start_conversation API以开始将查询发送到google服务器。 Nothing seems to work after this point. 在这一点之后,似乎什么都没有起作用。 Please do provide some inputs to resolve this problem. 请提供一些输入来解决此问题。

From the reference documentation of start_conversation() : start_conversation()参考文档中:
This method is a no-op if the Assistant is not started or has been muted. 如果助手未启动或已被静音,则此方法为禁止操作。

If you want to control how you trigger the Assistant (eg by the press of a button), you should consider using the lower level Assistant gRPC API . 如果要控制触发助手的方式(例如,通过按下按钮),则应考虑使用较低级别的助手gRPC API

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

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