walking-octopus / translate-ut

A translation app for Ubuntu Touch.
https://open-store.io/app/translate.walking-octopus
GNU General Public License v3.0
2 stars 4 forks source link

Add TTS support #9

Open walking-octopus opened 2 years ago

walking-octopus commented 2 years ago

The API wrapper is already implemented, but Qt has no default way to play the received WAV file from JSON. Is there a way to do it in C++?

herobrine7gamer commented 2 years ago

@walking-octopus you could try to save the wav somewhere and then play it after that , but this might need apparmor permissions , so it is better to play it directly . how does the json file provide the wav exactly ?

walking-octopus commented 2 years ago

As far as I know, the array has to be converted to binary data and saved, which requires C++. At that point, it's easier to write a tiny plugin for playing it directly.

An example:

curl https://lingva.ml/api/v1/audio/auto/hi