Merged
Conversation
Pressing the Play/Pause button starts the speech recognition listening.
Pressing the Play/Pause button starts the speech recognition listening. A limited set of commands which are all in strings.xml. We get "the whole string" passed in from the speech recognition API so we can match route and marker names too. This could control pretty much everything. We should come up with a design - and it probably goes hand in hand with a menu navigation UI for users whose language is not supported by Android speech recognition. Although these changes should in theory work in other languages, I don't I've figured out how to configure my phone to work and so I get a lot of "Error" callbacks right now.
We've got a number of different ways that media controls can be used, so tidy that away into their own classes.
This relates to https://sta2020.atlassian.net/browse/SA-285 and implements the start of an Audio Menu controlled via media control buttons. This allows app control without using the phone UI.
Media control buttons can be working in: Original mode - similar to on iOS. Relatively hard coded. Voice control - the play/pause button triggers voice control. Audio menu - a whole audio menu is navigable via the controls.
The callout holdoff initially was for the audio menu, but is useful for voice control too.
…rface Voice commands and the audio menu can now be used to start audio beacons at markers, and route playback.
Nothing very clever here, just a bit of refactoring.
All possible voice commands along with marker and route names are passed into the SpeechRecognizer so that it knows what to expect.
Fallback to audio menu if no permission granted.
This new approach should work better across different languages. We compare complete commands including marker and route names rather than trying to split them up into command + name. This should handle languages where the ordering of the command and names isn't simple.
Some extra work goes on here so that we try and pick the best language and region.
Also fix dokka build which was broken due to an incompatibility between AGP and the plugin.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Play Store gave us the go ahead to use audio record in the way that we do, so it's safe to land the changes on main.