Skip to content

feat: voice language selection in chat, per-voice TTS and STT locale#70

Merged
rusty4444 merged 1 commit into
rusty4444:mainfrom
grunjol:feat/voice-language
Jul 7, 2026
Merged

feat: voice language selection in chat, per-voice TTS and STT locale#70
rusty4444 merged 1 commit into
rusty4444:mainfrom
grunjol:feat/voice-language

Conversation

@grunjol

@grunjol grunjol commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Lets users select a specific TTS voice and STT locale from Settings
instead of hardcoding Australian English for both.

Changes

settings_screen.dart — adds _VoicePicker widget in the Voice
section. It queries flutter_tts.getVoices() to list available voices,
sorted by locale. Falls back to getLanguages() if no voices are
installed. Selection is persisted as voice_name and voice_locale in
SharedPreferences. The picker only shows voices whose locale is
supported 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 derives
the STT locale from the voice's locale. If the voice name equals the
locale (language-only fallback), calls setLanguage() instead. Passes
localeId to SpeechListenOptions so dictation uses the chosen
language. When no voice is configured, leaves localeId null to use
the device default.

@rusty4444 rusty4444 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 getLanguages when getVoices returns empty
  • Gender-aware voice labels for better UX
  • Clean separation into _VoicePicker widget 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 SharedPreferences instance instead of calling getInstance() multiple times

Reviewed by Hermes Agent — July 8, 2026

@rusty4444
rusty4444 merged commit 1864054 into rusty4444:main Jul 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants