Android的TTS不发音单个字母 [英] Android TTS doesn't pronounce single letter

查看:711
本文介绍了Android的TTS不发音单个字母的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想实现我的活动文本到Android的语音技术。这是一个简单的文字游戏,我想TTS引擎拼出一个字母,当用户presses一些按钮。例如,当用户presses的的 A 的按钮,我想听听A。

I am trying to implement text to speech technology of Android in my Activity. It is a simple word game and I want the TTS engine to spell a single letter when the user presses some button. For example when the user presses the A button I want to hear "A".

问题是在 .speak 方法只接受一个字符串作为输入。所以,当我告诉大家,我只想一个字母串TTS引擎,声音不是pronunciationof信。有什么办法,我可以把它正确的发音单个字母串?

The problem is the the .speak method only takes a String as input. So, when I tell the TTS engine that I just want a single letter string, the sound is not the pronunciationof the letter. Is there any way that I can make it pronounce correctly the single letter strings?

解决方案,到目前为止,是作为字符串输入,这听起来像字母词,例如使用蜜蜂为的的,看到了的 C 的等。但是,我们的˚F ^ h 的等等?

The solution so far, was to use as string input, words that sound like the letters, e.g. "bee" for B, "see" for C and so on. But what about F, H and so on?

任何其他的想法?

推荐答案

尝试了很多之后,我发现了一个更好的解决方案。为了android的TTS引擎anounce你必须把它写在首都一个字母。例如,B。这种方法能够正确发音!唯一的例外是A和Z具有被writen为AY和ZET!

After experimenting a lot, I found a better solution. In order the android tts engine to anounce a single letter you have to write it in capitals. For example "B". This way it will pronounce correctly! The only exceptions are "A" and "Z" which have to be writen as "ay" and "zet"!

希望这有助于

这篇关于Android的TTS不发音单个字母的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆