Repository navigation
iOS voice input transcribes non-English speech with the English model #13313
nichtlegacy
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem
On iPhone, voice input transcribes non-English speech very poorly. Speaking German produces mostly English-sounding nonsense.
The cause is the language the app hands to Apple's
SpeechTranscriber.voiceTranscription.ios.tsusesIntl.DateTimeFormat().resolvedOptions().locale, which Hermes reads from[NSLocale currentLocale]. That is the app locale, not the user's language. T3 Code only ships an English localization, so on a German iPhone the app locale isen-DE,SpeechTranscriber.supportedLocale(equivalentTo:)resolves it to an English model, and German speech runs through the English model. This affects every non-English user, and there is no setting to override it.Quick way to see it on the current App Store build: dictate an English sentence, then a sentence in your device language. English comes out fine; the other does not.
Proposed fix
#13312 (small, JS-only, no native build needed):
AppleLanguages, the same list asLocale.preferredLanguages) and fall back through the list whenSpeechTranscriberdoes not support one. The app locale stays as the final fallback.en. Otherwise fixing the locale would make German users lose the spacing they currently only get because of the bug.Apple's recommended API for this on iOS 26 is
Locale.preferredLocales, matched throughSpeechTranscriber.supportedLocale(equivalentTo:). Doing that natively would mean extending the existing@react-native-ai/applepatch and shipping a native build. The PR reads the equivalent list through React Native's built-inSettingsmodule so it can ship as an update. Happy to go either way.The PR is unit-tested but not yet verified on a physical device.
Possible follow-ups (not in the PR)
whisper-1,gpt-4o-transcribe, or a self-hosted Whisper server), ideally environment-backed so the key stays on the server and web/desktop/Android could use it too.docs/internals/voice-input.mdalready anticipates environment-backed transcription.All reactions