voicenotify icon indicating copy to clipboard operation
voicenotify copied to clipboard

Feature? Automatic language detection.

Open njozsef opened this issue 12 years ago • 12 comments

Please. My device an Hungarian T-mobile ST-25i. Some event only Hungarian, some English. Like: eCID

Thank you

njozsef avatar Jan 08 '13 09:01 njozsef

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.

pilot51 avatar May 24 '13 01:05 pilot51

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)...

eirinaios avatar Jun 09 '13 12:06 eirinaios

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.

pilot51 avatar Jun 09 '13 17:06 pilot51

A quick google search revealed the following results (with the first being perhaps the most promising for the Android platform):

  • https://github.com/rmtheis/language-detection
  • http://code.google.com/p/language-detection/
  • http://hlt.fbk.eu/en/technology/jExSLI
  • http://olivo.net/software/lc4j/
  • http://www.let.rug.nl/~vannoord/TextCat/

eirinaios avatar Jun 09 '13 19:06 eirinaios

Good resources, thanks!

pilot51 avatar Jun 09 '13 20:06 pilot51

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.

drathier avatar May 28 '18 06:05 drathier

first approach could be based on alphabet, e.g.

  • latin -> English
  • cyrillic -> Russian
  • chinese -> chinese etc.

Of course, though options or (if TTS allows) through the installed TTS languages.

ildar avatar Sep 23 '22 11:09 ildar

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

angrybacon avatar Aug 19 '23 19:08 angrybacon

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.

#87 is one of the next things I plan to do which would add the framework necessary for per-app settings like language.

pilot51 avatar Aug 20 '23 01:08 pilot51

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 ))

ildar avatar Aug 20 '23 09:08 ildar

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).

uhkeller avatar Sep 14 '23 09:09 uhkeller

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.

Mikaela avatar Jan 28 '24 08:01 Mikaela