0

just getting started with Assistant features in RPi and I am able to successfully implement upto this point and wondering few thing.

Scenario:

  • user: hey google "please turn on my living room Lights"
  • List item my code in horword.py : has a function to perform same action based on ON_RECOGNIZING_SPEACH_FINISHED
  • RPi/google home: I am not sure how respond to that

I was able to capture the request query asked by user using ON_RECOGNIZING_SPEACH_FINISHED = Args.text(str) and use it in my logic to perform the task. However, at the same time, "ok google" is responding with this answer.

to mitigate this problem, I created an google-actions, now it understands my query and respond with intention from api.ai. However, didn't acts on turn lights ON. So, wondering how can I read response from google home/api.ai in text and change code to act on it locally.

appreciate it.

u2307421
  • 31
  • 4

2 Answers2

0

You will not get response as text. For getting response to client app use webhook in API.AI and send message using fcm to client app. Read the fcm message in client app and do the corresponding actions.

Ranjith KP
  • 858
  • 6
  • 18
0

finally was able to figure out multiple ways. answered this in other stack question. find more details in this post. Multiple ways to handle this since google doesn't gives voices transcript and we let google say our transcript which is kind off solution for now.

u2307421
  • 31
  • 4