Repository navigation
Conversation
amanKG777
force-pushed
the
voice-script-commands
branch
from
November 1, 2026 22:47
c53e8bb to
b3f0b40
Compare
amanKG777
marked this pull request as ready for review
November 2, 2026 00:10
Owner
|
Thanks, this is the direction I want, with more done in scripts and less in the core. One request: please move |
A script can add voice: 'phrase' to a command in its manifest, or call backtalk.onVoiceCommand(pattern, callback) to register a phrase or a pattern such as 'search for *'. When the phrase is spoken after the voice command gesture, the script's command runs.
amanKG777
force-pushed
the
voice-script-commands
branch
from
November 15, 2026 03:45
b3f0b40 to
3051a17
Compare
Contributor
Author
|
Removed \scripting/fukex_voice_controls.js\ from this PR and rebased onto the latest master to resolve all conflicts. This PR is now focused purely on the voice commands API changes and documentation. |
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.
This lets scripts add voice commands, so a script can react to something you say after the voice command gesture.
A script can add
voice: 'phrase', or a list of phrases, to any command in its manifest. When you say one of them, Backtalk runs that command withvia: 'voice', and the event hascommandandremainder. A script can also callbacktalk.onVoiceCommand(pattern, callback)to register an exact phrase, a fuzzy phrase, or a pattern with a wildcard such as'search for *', which hands the callback the words that matched. Script commands are checked before the built-in voice commands, and only for a final speech result, so a half-heard phrase can't run a script. A script's list of triggers now shows its voice phrases as "Voice: …". The API is described in docs/scripting.md, and in differences.md.Nothing changes for scripts that don't use
voice, and the commands only run when you say them after the voice command gesture, so there is no switch.Tested on a POCO M7 5G with Android 16, using Google's speech recognition service with voice commands spoken after the voice command gesture.
ManifestParserTestcovers readingvoicefrom a manifest, andtestPhoneDebugUnitTestpasses cleanly.