Feature request: Pass the current keyboard language to online speech-to-text (STT)

Done Tools

Sal TESTER ·

I use the OpenAI-compatible endpoint option with xAI for speech-to-text. It would be useful if EFkey could pass the currently selected keyboard/input language to the transcription API.

For example, when Urdu is selected, EFkey should pass language=ur to the STT endpoint so that speech is transcribed in Urdu script rather than being interpreted as Hindi and returned in Devanagari script.

Expected behavior:

  • Language selected: Pass the active keyboard language code (e.g., ur or en) to the API with each transcription request.

This would be particularly useful for multilingual users switching between Urdu and English.

Ideally, this could be supported through the existing OpenAI-compatible endpoint configuration, including xAI.

Discussion

Sal TESTER ·

xAI supports transcribing Urdu in both Arabic script and Roman Urdu (Latin script). It would be useful if EFkey could pass the currently selected keyboard language and script preference to the STT API with each transcription request.

For example:

* Urdu: Pass ur to request transcription in Urdu Arabic script.

* Urdu (Latin): Pass ur-Latn (or the equivalent script preference supported by the API) to request Roman Urdu.

This would allow xAI to return transcriptions in the appropriate script based on the user’s active keyboard language, rather than defaulting to Hindi Devanagari when Urdu is selected.

Ideally, this should work through the existing OpenAI-compatible endpoint configuration, including xAI.

Sal TESTER ·
efko DEV iPhoneDuo ·
status → In progress
efko DEV iPhoneDuo ·

@Sal EFKey already sent the dictation language (ur for Urdu), but after the audio, and xAI says it may ignore anything after the file. Changed for build 519 (2.3.2 on the App Store): the language now goes before the audio. I don't have an xAI key, so I couldn't check whether that gets rid of the Devanagari. If you still get it in 519, tell me. For Roman Urdu, xAI's docs only list ur, with no ur-Latn or script option, so the Urdu (Latin) keyboard sends ur too. If you've seen a script option documented somewhere, send me the link.

efko DEV iPhoneDuo ·
status → Needs testing
Sal TESTER ·

I am still on 517, I'll test it when i get 519

Sal TESTER ·

Working, Urdu in Arabic script

ilikered MOD ·
status → Done (suggested by @Sal)

Sign in to comment or vote.