Updated to support the Google Assistant alphav2 API
First attempt at getting the Google Assistant SDK in a C# WPF application. Created mostly on Windows having never used gRPC or OAuth before. Its not pretty but its marginally nicer than installing Python and using Google's example.
Comprises of
- Tiny UI to login / Show the logged in user
- Minimise to Tray
- Global Keyboard shortcut for activation - Ctrl+Alt+G
- Clone the repo (optionally with submodules)
- Restore the Nuget Packages
- Create your own project on Google Cloud Console with Google Assistant API enabled and OAuth for it as per: https://developers.google.com/assistant/sdk/prototype/getting-started-other-platforms/config-dev-project-and-account
- Download the JSON file and move it to
client_id.json
in theSecrets/
folder - if you don't have Google Assistant or Google Home already also check that link for 'Set activity controls for your account' to ensure your account is setup for Assistant.
This assumes the generated code is up to date, if not..
- DownloadTools.ps1 will download the necessary tools to build the gRPC bindings
- GenerateGoogleAssistantClient.ps1 will download the proto files from GitHub and will build the c# gRPC code
Ensure you have python 3 installed on your Windows machine
- pip install --upgrade google-assistant-sdk
- google-oauthlib-tool --scope https://www.googleapis.com/auth/assistant-sdk-prototype --headless --save --client-secrets Secrets\client_id.json
- googlesamples-assistant-devicetool --client-secrets Secrets\client_id.json register-model --model "-mymodel" --type LIGHT --manufacturer "" --product-name "Assistant Test"
- googlesamples-assistant-devicetool --client-secrets Secrets\client_id.json register-device --device "mylaptop" --model "-mymodel" --nickname "My Laptop" --client-type SERVICE
http://developers.google.com/assistant/sdk/
http://grpc.io/docs/quickstart/csharp.html
https://www.freesound.org/people/TheGertz/sounds/235911/ https://www.freesound.org/people/cameronmusic/sounds/138417/ https://www.iconfinder.com/icons/1055024/audio_mic_microphone_icon