How can I configure automatic language switching between different TTS engines in Orca 51?

Hello everyone,

I’m using Orca 51.0 on Ubuntu 26.10 with GNOME on Wayland, and I would like to configure automatic language switching between Arabic and English voices.

I understand that Orca 51 introduced voice sets that allow users to configure voices for different languages. However, I would appreciate some guidance on how to configure this feature correctly.

My goal is to have Orca automatically use an Arabic voice when reading Arabic text and an English voice when reading English text.

I would like to know whether the following configurations are supported and how to set them up:

  1. Using Voxin for both languages: An Arabic voice from Voxin for Arabic text and an English voice from Voxin for English text.
  2. Using different speech engines: An Arabic voice from Neural Voices for Arabic text and an English voice from Voxin for English text.

I’m not specifically looking to switch between speech engines. My main goal is to configure the appropriate voice for each language, whether the voices come from the same engine or different engines.

Could someone explain the correct procedure for Orca 51?

In particular, I would like to know:

  • How to create and configure language-specific voice sets for Arabic (ar) and English (en).
  • How to assign the appropriate voice, speech engine, and voice parameters to each language.
  • Whether this can be configured through Orca’s graphical preferences, GSettings, Dconf, or another method.
  • Whether Speech Dispatcher configuration is also required, especially when using voices from different speech engines.
  • How to enable automatic language switching and ensure that Orca selects the correct voice based on the language of the text being read.

I have already installed and tested both Voxin and Neural Voices, and both can produce speech successfully through Speech Dispatcher.

I would appreciate a practical, step-by-step explanation, including the relevant settings or commands for Orca 51.

Thank you!

Hi. First, automatic language detection has only chance of working somewhere where Orca can determine the language cheaply, so, for now, that is the web (and it needs the proper markup). Switching voices of the same engine should work out of the box in that case, I don’t think Orca looks to different engines for the language support, though.

Hello,

Automatic language does not change a TTS engine being used. It’s working on the web and document content where possible.

It can also work in the apps but you need to prepare for that.

For example I do have following locales configured on my system

  • en_US.utf-8 - the system wide default.
  • sk_SK.utf-8 - configured in the user settings
  • cs_CZ.utf-8 - just for carrying this experiment
  • All of these are uncommented in the file /etc/locale.gen and pregenerated with locale-gen.
  • I am using slovak voice as my default. When forcing an app to start with a czech user interface orca automatic language switching can detect this and switches into an appropriate czech voice. For testing I can run Gnome Podcasts app with czech UI like this:
LANG=cs_CZ.utf-8 gnome-podcasts

Now about the orca configuration:

  • Open the screen reader preferences window by pressing the orca+space, using down arrow key to navigate to the Speech.
    • Make sure Speech support is enabled.
    • Configure the Global voice settings:
      • Choose your speech system, usually Speech-Dispatcher.
      • Choose your synthesizer: Voxin, eSpeak-NG, RHVoice .. whatever you like. Please note orca can only change the language voices automatically within the synthesizer selected here.
        In the Language Switching list enable the switches representing when you would like to switch languages automatically: Document content, UI Elements and *Limit switching to configured voices.
      • Press the ESC key when you are done configuring this part and return back to the Speech settings.
    • Continue to the Voice sets
      • There is a combobox with your voice sets. The global voice set is the default set that can’t be removed. Select it and then configure each voice type in the Voice type settings list.
      • The voice types are Default, Uppercase, Hyperlink and System. So if you like you can configure all of these and you can have spelling uppercase letters spoken with different voice configuration, hyperlink with the other and so on. The System voice type is for orca generated messages such as tutor help texts, notifications and similar.
      • When you are done configuring your global voice set (Slovak in my case, that might become Arabic in your case), you can add a new voice set by pressing the New voice set, then configure all the voice types settings for a new voice set with a different language (such as English) to your liking.
  • When you are done configuring you can use the tab key to navigate to the Options toggle button, expand it and activate the Save to default and close button to apply your settings.

If you would like to use different speech engines you can configure multiple orca configuration profiles, configure your custom key binding to switch these profiles and quickly switch to the engine you wish. This what we were doing a lot until the automatic language switching has been introduced.

I have mentioned my own language configuration as an example, I think you can safely use your own set of languages and it should work fine.

Let me know if you also need some hints on orca configuration profiles.

Greetings

Peter

Thank you for the clarification.

I have another question: Would it be technically possible to develop an Orca add-on that provides automatic language detection and voice switching, similar to the functionality available in NVDA and JAWS?

For example, the add-on could detect the language of the text Orca is about to speak, then route the speech to the appropriate voice and speech engine. This would ideally work with different speech engines, such as using Neural Voices for Arabic and Voxin for English.

I understand that Orca currently relies on language information provided by the application, particularly through web markup. However, I am wondering whether an add-on could implement an additional language detection mechanism for situations where language metadata is unavailable, perhaps using a language detection library.

Does Orca provide an API or extension mechanism that would allow an add-on to access the text before it is spoken, detect its language, and select the appropriate speech engine and voice?

I would appreciate your thoughts on whether this approach is feasible within Orca’s architecture.

Hello Peter,

Thank you very much for taking the time to provide such a detailed explanation and share your configuration.

Your example has made the Orca language switching mechanism much clearer to me. I will follow your instructions and experiment with the language-specific voice sets and automatic language switching on my system.

I’ll let you know how it goes, and I’ll get back to you if I need any further clarification or assistance.

I really appreciate your help!

Best regards

In theory, of course, you need a very short latency language identification routine.