问题
I have app one of its activity will be like texts in arabic (textview) and below each text how its written in turkish language text (textview), beside it image button , when press this its speach the turkish text loudly in turkish language like that one of google translate application ( but i dont want EditText to write on it just textview with button , when press button it read the textview ), as below :
صباح الخير
Günaydın
كيف حالك
Nasılsınız
and so on for around 100 , 200 words and also around 200 phrases and sentences.
i don't know how or where to start also i searched google but i can't specify my search regard what i need .
any help will be highly appreciated , thanks
回答1:
If you have fixed number of words or phrases and sentences,i also suggest to have the Turkish sound reading your words and phrases as custom clips recorded from Google translate , as now Google translate voices is not free and many site before offers Google translate sound as mp3 download now not available.
so you have alternative way : open Google translate app , write any words or sentence you want to translate from Arabic to Turkish and before you press the speaker image in Google translate to hear the Text voice reading of that word , open the default voice recorder of your device and atart recording then press the speaker image on Google translate , it will record the Turkish sound translation , and so on for all words you need then use it as clips dedicated to each word and phrases will be used in your app , i think this is suitable way to do .
Hope this will help you
回答2:
As you need the sound of only around 100 words. I think it is better to create your own sound clip for each words and store it. Then keep a (word, sound) mapping so that you can know which sound is to be played when a specific text is pressed. After a word is pressed then play the related sound. You can use SoundPool for that.
来源:https://stackoverflow.com/questions/15981129/text-voice-reading