feat: voice language selection in chat, per-voice TTS and STT locale#70
Merged
Merged
Conversation
rusty4444
approved these changes
Jul 7, 2026
rusty4444
left a comment
Owner
There was a problem hiding this comment.
Hermes Agent Automated Review — PR #70
Verdict: APPROVE ✅
Summary
Clean implementation of voice language selection. Allows users to pick TTS voices from device settings, persists the choice with SharedPreferences, and passes the locale to speech-to-text.
✅ Looks Good
- Proper null safety and fallback to
getLanguageswhengetVoicesreturns empty - Gender-aware voice labels for better UX
- Clean separation into
_VoicePickerwidget in settings - STT locale properly derived from voice locale with underscore conversion
- Auto (device default) fallback when no voice selected
💡 Suggestions (non-blocking)
- Consider caching
SharedPreferencesinstance instead of callinggetInstance()multiple times
Reviewed by Hermes Agent — July 8, 2026
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.
Lets users select a specific TTS voice and STT locale from Settings
instead of hardcoding Australian English for both.
Changes
settings_screen.dart— adds_VoicePickerwidget in the Voicesection. It queries
flutter_tts.getVoices()to list available voices,sorted by locale. Falls back to
getLanguages()if no voices areinstalled. Selection is persisted as
voice_nameandvoice_localeinSharedPreferences. The picker only shows voices whose locale issupported by the device's speech-to-text engine.
chat_screen.dart— reads the saved voice config in_initVoice().If a specific voice is chosen, calls
setVoice()for TTS and derivesthe STT locale from the voice's locale. If the voice name equals the
locale (language-only fallback), calls
setLanguage()instead. PasseslocaleIdtoSpeechListenOptionsso dictation uses the chosenlanguage. When no voice is configured, leaves
localeIdnull to usethe device default.