2016년 12월 8일 목요일

Yandex Translate with TexttoSpeech


Hi, I was making a simple translation app with Yandex Translate, and I got it to display the translation and say it. But some languages such as Russian, Thai, Japanese, Korean, and others were not being spoken. I'm assuming it's the problem with the alphabet as they are not recognized. I've also recognized the pronunciation with some European languages aren't perfect either. How can I fix this? 

-- 
"were not being spoken" ... did you use the correct language abbreviations in the Yandex languageToTranslateTo  slot?    es-ru will specify Spanish to Russian translation.

" assuming it's the problem with the alphabet "  good guess.  The Yandex tool may require using the diacritiatle marks and characters in the textToTranslate slot.

How can you fix?     For the 'correct' text, perhaps copy the text you want to translate  using the tool here:  https://www.google.com/search?q=google+translate&oq=google+translate&aqs=chrome..69i57j69i59j69i64j69i60l3.7375j0j7&sourceid=chrome&ie=UTF-8  

otherwise you may have to use  a List or List of Lists to provide a dictionary of the European languages etc.  Also be aware, your device may not have all the appropriate fonts available on your device.

What would be helpful to forum members attempting to help is to see a code snippit from your app (a block image).

Some issues might be related to the speech engine software in your Android...Yandex might not require a specific engine and then again it might...it depends on how the tool works.  You might check the Yandex site.

-- 
I'm still not sure about this :(...could you help me out a little here, please? By the way, code 3 and code 4 are part of the same code it's just that it was too long so I had to take two pictures of it. Also, as you can see in code 2, I'm also trying to make a feature where if you shake your phone/tablet, the translated sentence will be said by Yandex. Really appreciate the help. 
code1.JPG 표시 중
code2.JPG 표시 중

code3.JPG 표시 중

code4.JPG 표시 중

-- 
Whooah partner.  Ya' gotta' walk a'fore you gallop.

Solved: not speaking the correct language.
You use a TextToSpeech block.  If you want that to work
correctly you need to provide the correct language block 
of TTS in addition to the language for Yandex, don't ya' think?

Where is your set TextToSpeech.Language to block?  For example, when 
you use Korean in Yandex, you should use Korean in TTS?  You may 
have to also change the set TextToSpeech.County toblock.  Just experiment and find what works.

The TextToSpeech NEEDS the language code to pronounce what is in your Speak message block,
otherwise what you hear will sound like a Texan trying to speak French phonetically.  Yeah, a disaster.

You will have other issues depending on the device that is running your app.  Not all devices know 
the languages Google's TTS engine knows (see the TextToSpeech Available Languages block). The Google engine work with   Do It Result: (de en es fr it ja ko pt ru zh)  on my phone but with only a few languages on my tablet (earlier OS).  My phone TTS won't work with your tr, vi, si,sv languages but other's phones might. Also, the 
emulator will work with only some languages.

You might review how others use the accelerometer as a switch.  I am uncertain your code will work as is.  
For the moment you might get rid of the Accelerometer blocks temporarily.  Replace them with a Translate 
button until you get the language pronunciation sorted out.  After all, you do not want your app sounding like 
a Texan trying to speak French.  Fix how it talks, then tackle the fun stuff.

Youshould find a safe way to use the accelerometer as a switch in these forum links:  https://groups.google.com/forum/#!searchin/mitappinventortest/accelerometer%7Csort:relevance  

Good luck.

Merry Christmas, Wesołych Świąt,  Feliz Navidad, God Jul, Joyeux Noel, Καλά Χριστούγεννα, Happy Christmas, Veseloho Rizdva, Prettige Kerstdagen, Frohe Weihnachten!, 성탄 축하 , Buon Natale,  聖誕快樂 ,  圣诞快乐,  Sretan Božić, C рождеством!,  عيد ميلاد مجيد

-- 
Wow, thanks for the quick reply and clear directions. I'll try to do that and get back to you if it doesn't work. If it works, I'll mark it as complete. Thanks a bunch! 

-- 

댓글 없음:

댓글 쓰기