Open njozsef opened 11 years ago
This is very hard to do accurately. I have found a library that can do it, though I don't know how good. http://tika.apache.org/1.3/detection.html#Language_Detection
I may be adding the language detection portion of Tika to VN in the relatively not-too-distant future.
I'd also be really interested in this feature too, as it would be extremely useful for bilingual users!
Perhaps, one way to increase accuracy would be to define a "default" tts language and some secondary ones, and on a per-sentence basis call the language detection library to identify the sentence's language. Upon failure, you could revert to default.
Of course, one problem with the above approach is that the library you mention might not detect with high probability the language of a given sentence if the latter is small (which is the case for most notifications)...
I won't know for sure how functional the library is until I get around to trying it. If it can give a percentage of certainty for each language, that would be just about perfect. I agree with you and the default language option is on the to-do list.
A quick google search revealed the following results (with the first being perhaps the most promising for the Android platform):
Good resources, thanks!
Oreo now does this by default it seems, and I haven't found a way to turn it off. I've learned the english voice, so getting a swedish voice every once in a while is really distracting, especially since a lot of notifications mix both languages.
first approach could be based on alphabet, e.g.
Of course, though options or (if TTS allows) through the installed TTS languages.
Is this still being considered? I was looking for a way to have different applications use different language: in my case 2 are always in French and everything else in English
Perhaps that's more manageable than automatic detection
The issue is still open, so it could still happen. It's mostly a problem of time and priorities. This may be a good one for a bilingual developer to pick up.
JFYI: I personally was surprised that the TTS I use ( https://f-droid.org/en/packages/com.github.olga_yakovleva.rhvoice.android) has a built-in autodetection. So my setup of English+Russian just works ))
I'm using an app called Multilingual TTS to automatically detect the language and use an appropriate TTS engine. It's a bit fiddly to set up (hence the bad reviews I guess), but once set up it works perfectly. It has an in-app "purchase" button with a reasonable price tag but so far has worked just fine without me having paid for it (yet).
I am using Google TTS and when I go to Voice Notify's TTS settings and next to Google press the :cog: there is a language detection option with disabled/conservative/aggressive. I think setting it to aggressive (when having installed other languages in the same menu) corrects this issue at least for some notifications.
Although this doesn't help with other TTS engines.
Please. My device an Hungarian T-mobile ST-25i. Some event only Hungarian, some English. Like: eCID
Thank you