r/GoogleAssistantDev • • Jan 19 '20

Help me understand

Hi,

Introduction: I have a few years of front-end and Google cloud platform experience. Recently I have been making smartwatch apps for the Pebble for fun. I am making an "assistant" app. So far, without the use of Google Assistant, I have had success in integrating my Google calendar as well as my garage door. I can dictate to my watch an event and post it to the Google Calendar's quick add API. Also I can select an option on the watch to operate my garage door through the invocation of a cloud function which interfaces with my garage door device manufacturer's control API. These actions are very useful to me. The next thing I would like to be able to do is to add notes to Google Keep. As I understand it, this is only possible through the Google Assistant. But, that got me thinking anyway... can I just write a Google Assistant app for the Pebble? Could be pretty useful.

My question: After reviewing the public facing documentation... I can't tell if I, as a third party developer, can make a "Google Assistant" app for a particular user's Google Assistant. Not my app's assistant or my smart home device's special hardware or my website's answering service. But... can I make an app that talks to the actual Google assistant? Like ask her "what is the sportsball score?" and get a response in a consumable format?

It's such a simple question. Please help me understand. Basically I want to say (through my watch) "hey Google, add tea to my shopping list"

Thank you!!!

3 Upvotes

9 comments sorted by

1

u/afirstenberg GDE Jan 19 '20

Yes, you can make an app that talks to the Google Assistant. Check out the Google Assistant SDK. There are several flavors of it, including a library that includes everything you need including the wake word (for some languages), and the ability to make calls using gRPC for other languages. You can either send streaming audio for the Assistant to process with speech-to-text, or send text and get text back.

1

u/psychpsychpsychpsy Jan 19 '20 edited Jan 19 '20

Awesome, thank you. Any chance you could link me to a tutorial or example that uses a basic "send text and get text back"? Would like to use a cloud function to talk to the assistant if possible. I see that there is a JavaScript library for "Actions on Google" : https://www.npmjs.com/package/actions-on-google. Question is... can I talk to the Google Assistant through "Actions on Google"? Is it the same thing as the Google Assistant?

Edit: Got this part figured out; see below

1

u/Mistic92 Jan 19 '20

You can't do messaging and calls through Assistant SDK

1

u/afirstenberg GDE Jan 21 '20

Just to make sure this is clear - no, you don't want actions-on-google. That is for people who want to write Actions that are triggered through the Assistant. They are not for putting the Assistant on a system itself.

1

u/psychpsychpsychpsy Jan 19 '20

Looks like there is a gRPC library for JS already: https://www.npmjs.com/package/google-assistant

1

u/psychpsychpsychpsy Jan 19 '20 edited Jan 19 '20

Aw man I am so close!!! I was able to get assistant on the watch (which is great in itself). But when I "add bananas to my shopping list" it will be added to my Assistant shopping list (not Google Keep). Even though, in the Assistant app, I have set Google Keep as my notes provider... that setting seems to be specific to my Google Assistant Android app. Anyone have any suggestions??

In other words, can I set Google Keep as the Notes provider for the Google Assistant that I've invoked through the JS gRPC client?

1

u/afirstenberg GDE Jan 21 '20

Have you tried it on a Smart Speaker to see where it records the request? I'm a bit surprised that the Assistant on a phone does something different than it would elsewhere. (But just a bit.)

1

u/fleker2 Googler Jan 21 '20

As pointed out below, there is the SDK that can be used for gRPC calls for a particular user. It's not as fleshed out as a more optimized version for a form factor.

Eg, you don't get direct smart home commands but do get voice commands for smart home. You don't get hotword detection but can still use manual triggers. Answers come primarily in audio, sometimes with text, and then there's a way to enable HTML responses which may be more structured. Lists are an area that should work as far as I know.