问题描述
在我的应用程序,我想知道是否有任何TTS引擎可以读取印地文文本。我的code
In my application , I wish to know if there is any tts engine that can read hindi text .my code
tts.setLanguage(Locale.US);
不幸的是印地文搭载Android不支持。见语言环境支持以下
unfortunately Hindi is not supported by Android. See the list of Locales supported below
http://developer.android.com/reference/java/util/Locale.html
我将如何做的印地文的语言环境任何帮助吗?在此先感谢
How will i do the hindi locale any help ? Thanks in advance
推荐答案
印地文支持Android的 - 它只是没有一个区域设置
常数它
Hindi is supported by Android -- it is just that there isn't a Locale
constant for it.
如果你看一下 http://en.wikipedia.org/wiki/ List_of_ISO_639-1_ codeS ,那么喜
是ISO 639-1 code的印地文。还要注意的是Android的/ Java的也可以使用ISO 39-3 code这对于印地文是欣
。
If you look at http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes, then hi
is the ISO 639-1 code for Hindi. Also note that Android/Java may also use the ISO 39-3 code which for Hindi is hin
.
因此,你需要使用两种:
Therefore, you need to use either:
tts.setLanguage(new Locale("hi"));
或
tts.setLanguage(new Locale("hin"));
您还需要使用支持印地文文本到语音合成器,否则你将得到一个语言不支持的错误。该espeak的文本到语音合成器支持印地文。
You will also need to use a text-to-speech synthesiser that supports Hindi, otherwise you will get a "language not supported" error. The eSpeak text to speech synthesiser supports Hindi.
我有espeak的为Android 4.0的端口和以后[1] / [2]为£0.99,这有许多改进和bug修复在眼睛自由港,并随时保持最新与最新的espeak的释放。
I have a port of eSpeak for Android 4.0 and later [1]/[2] for £0.99. This has many improvements and bug fixes over the eyes free port and is kept up-to-date with the latest eSpeak releases.
- http://reecedunn.co.uk/espeak-for-android
- https://play.google.com/store/应用程序/详细信息?ID = com.reecedunn.espeak
- http://reecedunn.co.uk/espeak-for-android
- https://play.google.com/store/apps/details?id=com.reecedunn.espeak
这篇关于与TTS如印地文发言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!