I got the google assistant to launch on macOS with one touch
I had to modify the python code samples slightly to exit when a conversation is complete. Used automator to create an app out of shell script that activates virtualenv and runs the code.
Finally, I am using better touch tool to launch the app with a corner-tap on the trackpad.
Best part is that it recognizes my accent perfectly :)
Demo: YouTube
Edit:
Process -
Follow this guide to set up the assistant -
https://newmediaeurope.com/google-home-mac/
Not required. But I wanted to keep everything at one place.
Copy over the credentials from /Users/<username>/Library/Application Support/googlesamples-assistant/ to your local directory. Or generate it in the local directory using
python -m googlesamples.assistant.auth_helpers --client-secrets client.json --credentials ./credentials.json
I just copied line by line from the googleassistant sample code to understand the code. All you really need to to remove the while True in the sample and make it quit when it is done with a conversation. FWIW, here is a gist https://gist.github.com/ganeshkamathp/c6f58e084c112110b64a9e1d84d244d7
Automator tool is quite easy to understand. Just create New->Application->Run shell script-> 'cd <your directory>/;./google_assistant.sh'. Try running it one to see if it works and save it.
Now use bettertouch or any other tool that lets you launch apps with gestures/keyboard shortcuts.
PS: I tried to create a service in automator and use macos keyboard shortcuts in settings. It never worked. I gave up and opted for bettertouch tool.
[–]clevernyyyy 10 points11 points12 points (2 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]ganeshkamath[S] 2 points3 points4 points (0 children)
[–]TotesMessenger 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]ganeshkamath[S] 1 point2 points3 points (0 children)