How to add a language provider to the speech plugin

Hi! I would like to add Google Ukrainian to the list of speech providers. I have added a new string

Google українською (uk-UA)

to the file sdkjs-plugins/content/speech/settings.html, restarted the docker container, however it hasn’t appeared in the selection list.

image

Please, explain, how to arrange it properly.

Hello @landas
We are checking the situation. I will update this thread when we have something to share.

1 Like

Hello @landas
We’ve checked the situation.
The logic of work of mentioned plugin is folowing:
The plugin takes languages from two different sources: Chrome browser or your system itself. the important thing that plugin uses only pre-installed (default) languages of browser, so you can’t add other ones.
As for the system itself. If desired language supports text-to-speechfeature, you can install it on your system. This way plugin will work with a new language. Please check out my screenshot:

To sum it up, there’s no way to add new language via custom parameters in the source code of the plugin.
Sorry for inconvenience.

Hi @Alexandre!

Many thanks for your research and reply. It’s bit funny to understand the logic, as the provider I am looking the support of is provided by Google (sic!), eg Google Translate, while you are referencing somehow to Microsoft o_O. Are you sure?

Yes, my Chrome settings include the support of Ukrainian.
I have checked, Google cloud supports Ukrainian language

PS Besides, your screenshot refers to Win10, what about other OS’s (eg Linux family, ChromeOS, Mac)?

Please, give more clarifications.

Hello @landas
Sorry if I was unclear.
Please let me explain it in detail.

Desktop Editors uses features of your browser. In case of Speech plugin, the plugin behavior is related to your browser.
For Google Chrome: plugin uses default (pre-installed) languages of this browser. In other words, if you go to Chrome settings >Languages > add additional language > plugin can’t use a new language.
For other browsers (Firefox, Opera, etc.): plugin uses system language. If system language supports text-to-speech, the new language will appear in the plugin (I made screenshot from my Windows 11 language setting for reference before, but this behavior is related to all OSs).

Hi Alexandre!

I use OO in companion of Nextcloud through web. My primary browser is Google Chrome. The list of languages include English and Ukrainian. My Windows 10 language is English.

I would like to have in the list of language providers Ukrainian. I know, that Google Cloud supports Ukrainian for text to speech. So, I understand that any text in Google Chrome can be voiced in Ukrainian.

Unfortunately in the list there is no Ukrainian. I tried to add it manually, as you may read in the 1st post, however it didn’t work.

What to do?

We are checking the situation. I will update this thread when we have something to share.

1 Like

Hello @landas
Sorry for the late reply.
We have been looking for a workaround solution and probably we found one. As I mentioned before this plugin uses pre-installed languages of browser or OS. Windows 10 doesn’t support text-to-speech for Ukrainian language, at the same time Google Chrome doesn’t support Ukrainian language as default pre-installed one.
I believe the only way in such situation is Edge browser. We have checked this browser, it contains Ukrainian language, so plugin does.

Hi Alexandre!

Thanks for your researches and the feedback! What do you mean under “Google Chrome doesn’t support Ukrainian language as default pre-installed one.”? I am a bit confused:


The browser contains all needed languages by default. After setting up Ukrainian as the language of your Google account and having started downloading Chrome you obtain specifically the version with already added Ukrainian.

Edge does use Chromium engine and repeats all its functionality, including the management of languages. I have just checked the Edge (with default English locale), and it doesn’t have Ukrainian in the list of text-to-speech providers:
image

It’s a little bit strange. We have rechecked Edge browser and all things run OK:
test

As for my comment about ‘pre-installed languages’ on Google Chrome. The logic of work of mentioned plugin is using default pre-installed languages only. That means plugin doesn’t use additional languages which was added via browser settings.

As for the situation with Edge browser. Please try to reinstall plugin (also make sure you are using the latest version of Document server - v.7.3).

Hi Alexandre!

Well, first of all I am using OO in docker, at the same time dockerised v7.3 results in 502 Proxy Error (another issue), so I have had to roll back to the v.7.2.2, at least for a while. May I ask you to check on v.7.2.2 as well? Secondly, what about OnlyOffice Desktop, is it working there? Finally, do I need to make some changes at the OS itself?

Alexandre, meanwhile, have you seen these articles where enabling Google Cloud text-to-speech engine is discussed:

Additionally, I would like to share with you two more TTS engines with the help of which
it is possible to add specifically Ukrainian to your speech app:

Please, consider them as well.

May I ask you to check on v.7.2.2 as well? Secondly, what about OnlyOffice Desktop, is it working there? Finally, do I need to make some changes at the OS itself?

In case of using stand-alone Document server (docker version in your case), plugin works on Windows 10 and Edge browser on both versions of server (7.2 and 7.3). As for Desktop editors, there’s the same logic of works, plugin uses system text-to-speech engine or browser one (in general, Desktop Editors uses frame of browser).

Thank you for additional information and links. They are noted and we will discuss it internally.