[Feature Request] Automatic language detection with voice selection
I usually read websites in three languages (en, es, and pt-br). Each language requires me to manually change the voice and, because I'm using some custom voices, the list of options is quite long. I also notice that some providers offer better TTS options depending on the language, so I like to have them all showing in the list.
Idea
Autodetect the language of the text
Before sending the text to the TTS service, we could run a check to identify the language of the text we are about to generate the audio for. To avoid doing this before all requests, we could save the URL and the language that we already identified. So, if we are still on the same URL, we expect the text to be in the same language.
I still haven't found a good (and free) way of identifying the language of a text. There is a response header content-language which could help, but I'm not sure if its usage is widespread enough to be able to rely on this data for this identification.
If you think this feature could be useful, I can dig deeper into this topic.
Voice per language
Add an option to set which voice should be used for each language. If we are reading a language not set, we could:
- Use the default language (which would be usage like we have now), or
- Use a 'good' default voice in that language (like a Google Translator voice)
what do you think? I think i may be able to help implementing this, despite not being a great JS developer, haha.