Skip to content

fix: improve speech recognition error messages with i18n - #398

Open
wwsinagogogo wants to merge 2 commits into
CherryHQ:mainfrom
wwsinagogogo:worktree-android-speech-bug
Open

fix: improve speech recognition error messages with i18n#398
wwsinagogogo wants to merge 2 commits into
CherryHQ:mainfrom
wwsinagogogo:worktree-android-speech-bug

Conversation

@wwsinagogogo

Copy link
Copy Markdown

Summary

  • Replace generic speech recognition error messages with detailed, localized messages for each error type
  • On Android devices without a compatible speech service (e.g. MIUI/HyperOS without Google Play Services), users now see a clear explanation instead of the cryptic "Insufficient permissions" / service-not-allowed error
  • All error messages are now fully internationalized (en-US, zh-CN, zh-TW, ja-JP, ru-RU)

Error messages by type

Error Code Before After
service-not-allowed "Insufficient permissions" "Speech recognition requires a system speech service. No compatible service (such as Google Play Services) is installed or available on this device."
no-speech "No speech was detected." "No speech detected. Please try again."
audio-capture "Audio recording error." "Microphone access failed. Please check your microphone permissions."
network "Other network related errors." "Network error. Please check your connection and try again."
language-not-supported "Requested language is not available..." "Speech recognition is not supported in the current language."
not-allowed "Missing RECORD_AUDIO permissions." "Microphone permission was denied. Please allow microphone access in system settings."

Test plan

  • Run on Android device with Google Play Services — verify all error messages display correctly
  • Run on MIUI/HyperOS device without Google Play Services — verify service-not-allowed shows clear explanation
  • Switch app language to zh-CN/zh-TW/ja-JP/ru-RU — verify messages are properly translated
  • Trigger each error type (no mic permission, network error, etc.) — verify correct message shown

Related

  • Fixes: Android speech recognition shows "Insufficient permissions" on MIUI/HyperOS devices

Titan and others added 2 commits May 26, 2026 09:07
Qwen3.5 and Qwen3.6 series are vision models but their IDs don't
contain 'vl' suffix (e.g. Qwen3.6-35B), so they were not matched
by the existing qwen3-vl pattern.

Co-Authored-by: Claude <claude-opus-4-6-20250514>
Replace generic error messages with detailed, localized messages for
each error type (service-not-allowed, no-speech, audio-capture, etc.).
On Android devices without a compatible speech service (e.g. MIUI without
Google Play Services), users now see a clear explanation instead of
the cryptic "Insufficient permissions" error.

Co-Authored-by: Claude <noreply@anthropic.com>
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.

1 participant