feat(commands): localize punctuation voice commands (#640) - #642
Draft
jatinkrmalik wants to merge 1 commit into
Draft
feat(commands): localize punctuation voice commands (#640)#642jatinkrmalik wants to merge 1 commit into
jatinkrmalik wants to merge 1 commit into
Conversation
Voice command phrases were English-only even when recognition language was set to Italian, French, etc. Merge locale punctuation/line-break aliases from the recognition language into CommandProcessor, keep English phrases available, and document the behavior. Fixes #640 Co-authored-by: Jatin K Malik <jatinkrmalik@users.noreply.github.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #642 +/- ##
=======================================
Coverage 87.70% 87.70%
=======================================
Files 35 36 +1
Lines 6556 6590 +34
Branches 1088 1092 +4
=======================================
+ Hits 5750 5780 +30
- Misses 579 582 +3
- Partials 227 228 +1
🚀 New features to boost your workflow:
|
1 task
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.
Description
Voice command phrases (comma, period, new line, …) were hardcoded English-only. With recognition language set to Italian/French/etc. and voice commands enabled, spoken punctuation in that language was injected as literal words (#640).
This wires recognition language into
CommandProcessorand merges localized punctuation / line-break aliases (IT, FR, DE, ES, PT, NL, PL, RU), while always keeping English phrases. Also adds Englishdot→..Related Issue
Fixes #640
Type of Change
Changes
command_phrases.pywith locale alias maps keyed by Whisper ISO codesCommandProcessor(language=…)/set_language()rebuilds aliasesSpeechRecognitionManagerpasses language on init andreconfigurePRODUCT.mdupdateddot,auto(English-only aliases), andset_languageOut of scope
delete that,undo,capitalize, …) remain EnglishChecklist
make lint)Test plan
pytest tests/test_command_processor.py(40 passed)make lint