- Notifications
You must be signed in to change notification settings - Fork 146
add support for other boards #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- fallback on default audio device if I2S is not available - load credentials from resource Change-Id: I7f56a4d2f38ec1454811ea0a50fb1b8dcd4b49f8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a really cool change! Is there an overview anywhere of the audio support on the different boards? It was really hard to figure it out when I looked before.
PS. I'm still getting used to GitHub reviews. If I make comments and approve, does it work the same way as in Critique? Consider this an LGTM anyway.
README.md Outdated
| ============================================== | ||
| | ||
| This sample shows how to call the Google Assistant API from Android Things using the [AIY Projects Voice Kit][voice-kit]. | ||
| This sample shows how to call the Google Assistant API from Android Thing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Things
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
README.md Outdated
| This sample shows how to call the Google Assistant API from Android Thing. | ||
| | ||
| It records a spoken request from the I2S microphones, send it to the Google Assistant API and plays back Assistant's spoken response on the speaker connected to the I2S DAC. | ||
| It records a spoken request from the connected microphones, send it to the Google Assistant API and plays back Assistant's spoken response on the connected speaker. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sends ... the Assistant's
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
| try { | ||
| Log.d(TAG, "creating voice hat driver"); | ||
| mVoiceHat = new VoiceHatDriver( | ||
| BoardDefaults.getI2SDeviceForVoiceHat(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: here you use I2S, but on line 244 you use I2s. Picking one would be better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Android framework has to use CamelCase even for abbreviation. But we have relaxed style guidelines for our sample.
| mLed.setDirection(Gpio.DIRECTION_OUT_INITIALLY_LOW); | ||
| } catch (IOException e) { | ||
| Log.d(TAG, "error creating voice hat driver:", e); | ||
| Log.d(TAG, "error configuring peripherals:", e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Standardize on a log level for your exceptions. ERROR is used below, I would recommend WARNING across the board.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch: this should be .e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. I tried to use .e for fatal error, .w for non fatal one, .i for regular demo message, .d for spammy demo message.
README.md Outdated
| -------------- | ||
| | ||
| - Get the `client_secret_NNNN.json` | ||
| [OAuth client ID][oauth2-installed-app] JSON file for the application from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the instructions to generate this file are not inline, it would be preferred to link folks to the docs that describe creating new OAuth credentials.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done and refactor other link to refer to the doc.
app: update logs level Change-Id: I6638c9fbc6e844f67254fdc2dad79d06b1fc1b36
| /cc @irataxy fyi |
Fixes #8
Closes #9