niedev / RTranslator

Open source real-time translation app for Android that runs locally
Apache License 2.0
4.96k stars 367 forks source link

Try to add support for device's default TTS and decouple the languages supported by TTS engine and Whisper #29

Closed JingziC closed 2 days ago

JingziC commented 5 days ago

Add support for Huawei's TTS and decouple the languages supported by TTS engine and Whisper

Hello,

Thank you for maintaining this project. The project has been very useful for me. I installed the latest version to a Huawei device with HarmonyOS 4.2.0 but it could not detect Huawei's TTS engine as what happened on Samsung previously. Besides, I noticed that the list of languages only included the languages supported by both TTS and Whisper when it detected the TTS engine. However, users including me may expect to use only the Whisper's translation even the Google, Samsung or Huawei's TTS are not available because the supported languages in TTS sometimes are limited.

To address these issues, I have made the following modifications:

The modifications were tested on a Huawei device with HarmonyOS 4.2.0 (com.huawei.hiai) and and a Samsung device with Android 14 (com.samsung.SMT). The built app looks good for me on both devices. However I did not have a chance to test on other platforms. The .apk prerelease of this version is avaliable and can also be built from the branch.

The updated language list displayed on Samsung with Samsung's TTS is as follows.

RTranslator Language List
niedev commented 4 days ago

Hi again JingziC,

In these days I will review the pull request (don't make any changes in the meantime, If you have other ideas, leave a comment).

I'll tell you in advance that I won't be very fast in the review because I don't have much free time and I'm not used to receiving and reviewing pull requests, so I still need more practice to become faster.

Thank you again!

JingziC commented 4 days ago

Hi niedev, thanks for the prompt reply.

I understand and will not change this request and corresponding branch. Please take you time.