2016년 11월 28일 월요일

TextToSpeech


Hello,

A couple of questions about the TextToSpeech media component:

1. Is there any plan to add Greek to supported languages?
2. How can I fix the bug when the TextToSpeech does not pronounce the char "-"? It's ok when it has to pronounce "+" (it pronounces it as plus in English) or other symbols, but with "-" (the minus symbol) it says nothing. However, when it has to pronounce "-1" everything is fine (it says "minus one").

Thanks a lot,

-- 
Greek as supported languages?  The text to speech engine MIT AI2 links to  is part of the Android operating system.   Greek is not supported so perhaps look here: https://www.google.com/search?q=tts+android+greek&oq=tts+android+greek&aqs=chrome..69i57.7055j0j7&sourceid=chrome&ie=UTF-8  for other TTS engines...these may or may not be supported by the AI2 TTS component.

To get TTS to 'speak' unusual characters ( does not pronounce the char "-" )   you need to provide some logic blocks.     If "-" then substitute the word  'dash' perhaps using appropriate blocks whenever a dash occurs.     How you do this depends on what your source text is for the TTS block.   You might have to use a replace block to substitute everywhere for the 'unpronounceable' word or character.

Try some blocks. When you get a workable solution, why not post some blocks so others can share in your solution?

-- 
Thanks for the reply,

I'll try to work out the Greek language thing.

The problem with the "-" symbol is that I don't want to hardcode it as "minus" or "dash". The reason is that when English is selected as the device language, "-" should be pronounced as "minus". However, if the device language is e.g. French, the system should automatically pronounce it as "moins", giving thus the capability of auto-localisation of the app. I don't know if it's intended or not, but I see no reason why other arithmetic symbols are pronounced just fine (e.g. "×" or "÷", pronounced "times" and "divided by" respectively).

-- 
 Google did not include the capability to pronounce ALL possible symbols and letters. Developers need to write their own TTS or live with what Google provides 'free.'

I you want to substitute   moins, then you need more logic blocks       In pseudo code,   if   device language is en then replace with 'dash' else if fr then replace with 'moins'.  This is not an issue exclusive to AI2, the pronunciation issue is also present when using the professional Eclipse and Android Studio 2  compilers when the Android TTS is used.  If you want added capability to filter and make available alternative pronunciation, it is possible, complex and will require additional coding.

-- 
I don't know how device language can be detected with ai2, but, in any case, all not pronouncable chars would have to be hardcoded for all languages.

Thanks a lot, I'll come back if I manage to find a solution to this.

-- 

I don't know how device language can be detected with ai2,
my tools extension https://puravidaapps.com/tools.php can do it

Taifun

-- 
Thanks Taifun, I'll use it

-- 

댓글 없음:

댓글 쓰기