crow-translate / QOnlineTranslator

A library for Qt5 that provides free usage of Google, Yandex and Bing translate API.
GNU General Public License v3.0
79 stars 12 forks source link

Yandex Translator Dutch TTS #32

Closed ghost closed 2 years ago

ghost commented 2 years ago

Describe the problem or limitation you are having Using Yandex, it's not possible to have TTS for Dutch

Describe the solution you'd like Adding TTS for Dutch for Yandex if possible, or having a way to add a custom TTS engine in the way of terminal command. For example, if the terminal TTS option is enabled in settings, the user can provide a template such as "TTS text from the window". Then the program will just execute this command

Describe alternatives you've considered No viable alternatives when Google Translate stops working and returns too many requests. Bing option doesn't work either.

Shatur commented 2 years ago

Yandex doesn't support Dutch TTS. There is nothing I can do here.

ghost commented 2 years ago

@Shatur but if you go to the website, it does support Dutch TTS: https://translate.yandex.com/?lang=nl-en&text=een%20voorbeeld. Is it not supported in the API or can't be fetched from there?

Shatur commented 2 years ago

If I understand correctly, I can't use TTS with Dutch:

изображение

ghost commented 2 years ago

It works for me: image

Shatur commented 2 years ago

Wow, that's weird. I can play dutch text:

изображение

VolkMilit commented 2 years ago

Doesn't work both from app and site on my side either. Nor yandex.ru or yandex.com works. Even tried Tor Browser - no luck.

Maybe this was some kind of test for some users? Or we need to have account on Yandex? Maybe this is a web version bug?

@Sentero-esp12, are you sure it even speak something?

ghost commented 2 years ago

Yeah, it works for me each single time, and I'm not logged in. I've also tried another Chrome user, incognito mode and VPN. It also works for me on Android Chrome and Windows 10 virtual machine.

Here's the video (Linux Mint, Chrome): https://user-images.githubusercontent.com/35060206/138224164-09f8341d-5710-4347-a976-a4f03b19e9be.mp4

Shatur commented 2 years ago

Sorry, but according to the documentation Dutch is not supported for TTS for Yandex, sorry :( I even tried to generate this link myself using the API - it didn't work. The site may be using some other mechanism.

Probably the best solution for you would be implement TTS for Lingva (will be available in the next Crow release):

https://github.com/crow-translate/QOnlineTranslator/blob/14279974821d2100d55c5504fa1b04baa77162b5/src/qonlinetts.cpp#L118-L125

ghost commented 2 years ago

@Shatur maybe you could add an option to use a TTS engine different than the current translation engine. So until Google Translate is working without limitations, we could use Yandex to translate and Google to pronounce the words. I think Google TTS works even when translation returns "Too many requests"

Shatur commented 2 years ago

Sounds reasonable, but we should discuss the design. I'm not sure how it should look. But we can also just fix Google Translate. There is even a reference implementation.