指定发音为Android TTS引擎的最佳实践? [英] best practice for specifying pronunciation for Android TTS engine?

查看:260
本文介绍了指定发音为Android TTS引擎的最佳实践?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在一般情况下,我pssed与Android的默认文本到语音引擎(即com.svox.pico)很IM $ P $。正如预期的那样,它mispronounces一些话(像我),并因此有时需要一些发音指导。所以我的音素拼读出来的那些话不知道的最佳做法是微微TTS引擎mispronounces。

In general, I'm very impressed with Android's default text to speech engine (i.e., com.svox.pico). As expected, it mispronounces some words (as do I) and it therefore occasionally needs some pronunciation guidance. So I'm wondering about best practices for phonetically spelling out those words that the pico TTS engine mispronounces.

例如,鸟Chachalaca的正确发音是姜查,姜查,LAH-凌加。下面是TTS引擎产生的:

For example, the correct pronunciation of the bird Chachalaca is CHAH-chah-LAH-kah. Here is what the TTS engine produces:

mTts.speak("Chachalaca", TextToSpeech.QUEUE_ADD, null); // output: chuh-KAL-uh-KUH
mTts.speak("CHAH-chah-LAH-kah", TextToSpeech.QUEUE_ADD, null); // output: CHAH-chah-EL-AY-AYCH-dash-kuh
mTts.speak("CHAHchahLAHkah", TextToSpeech.QUEUE_ADD, null); // output: CHA-chah-LAH-ka
mTts.speak("CHAH chah LOCKah", TextToSpeech.QUEUE_ADD, null); // output: CHAH-chah-LAH-kah

下面是我的问题。

      
  • 有没有被Android TTS引擎?
  • 认可的标准拼音   
  • 如果不是,是否有制作定制的发音拼写,这将使拼写更可能在未来正确的一些通用的规则TTS引擎/版本?
  •   
  • 在它看来,Android的TTS引擎忽略文本的大小写。什么是指定重点的最佳方法是什么?
  • Is there a standard phonetic spelling recognized by the Android TTS engine?
  • If not, are there some general rules for making custom pronunciation spellings that will make the spellings more likely to be correct in future TTS engines/versions?
  • It appears that the Android TTS engine ignores text case. What is the best way to specify emphasis?

顺便说一句,这是TTS引擎写入logcat的:

By the way, this is what the TTS engine writes to logcat:

V / TtsService(294):TTS处理:姜查姜查LOCKah
V / TtsService(294):TtsService.setLanguage(ENG,美国,)
I / SVOX微微引擎(294):语言已经加载(EN-US = = EN-US)
I / SynthProxy(294):设置语速为100
I / SynthProxy(294):设置间距为100

V/TtsService( 294): TTS processing: CHAH chah LOCKah
V/TtsService( 294): TtsService.setLanguage(eng, USA, )
I/SVOX Pico Engine( 294): Language already loaded (en-US == en-US)
I/SynthProxy( 294): setting speech rate to 100
I/SynthProxy( 294): setting pitch to 100

[更新]

我想传递一个XML文档TextToSpeech.speak()如下:

I tried passing an XML document to TextToSpeech.speak() as follows:

            String text = "<?xml version=\"1.0\"?>" +
                "<speak version=\"1.0\" xmlns=\"http://www.w3.org/2001/10/synthesis\" " +
                    "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" " +
                    "xsi:schemaLocation=\"http://www.w3.org/2001/10/synthesis " +
                        "http://www.w3.org/TR/speech-synthesis/synthesis.xsd\" " +
                    "xml:lang=\"en-US\">" +

                    "That is a big car! " +
                    "That <emphasis>is</emphasis> a big car! " +
                    "That is a <emphasis>big</emphasis> car! " +
                    "That is a huge bank account! " +
                    "That <emphasis level=\"strong\">is</emphasis> a huge bank account! " +
                    "That is a <emphasis level=\"strong\">huge</emphasis> bank account!" +
                "</speak>";
            mTts.speak(text, TextToSpeech.QUEUE_ADD, null);

由于Android的前夕提出,只读取XML主体TTS引擎(即有关大型汽车和庞大的银行账户的评论)。我不知道TTS引擎是能够解析XML文档。但是,我没有听到在TTS输出的任何重视。

As Android Eve suggested, the TTS engine read only the XML body (i.e., the comments about the big car and the huge bank account). I didn't realize the TTS engine was capable of parsing XML documents. However, I did not hear any emphasis in the TTS output.

[更新2]

我简化了问题与否的Andr​​oid支持TTS语音合成标记语言<一href="http://stackoverflow.com/questions/3525424/does-android-tts-support-speech-synthesis-markup-language">here.

I simplified the question to whether or not Android TTS supports Speech Synthesis Markup Language here.

推荐答案

JW在回答我的问题的<一个href="http://groups.google.com/group/tts-for-android/browse_thread/thread/ee1940b9d0517d45?hl=en">tts-for-android组:

JW answered my question at the tts-for-android group:

格雷格

微微引擎识别与XSAMPA字母的标签。

The Pico engine recognizes the tag with the XSAMPA alphabet.

有没有简单的规则,以获得一定的发音从orthograpy,但您可以使用直观的拼写和试错。资本和连字符将推出比解决他们的问题更多。使用不同的拼法和引入额外的字边界(空格)可以正常工作。

There are no easy rules to derive a certain pronunciation from the orthograpy, but you can use intuitive spellings and trial and error. Capitalizing and hyphens will introduce more problems than solving them. Using different spellings and introducing extra word boundaries (spaces) can work.

重点标记和感叹号不会改变的综合结果。使用时,和命令来代替。

The emphasis tag and the exclamation mark will not change the synthesis result. Use , , and commands instead.

的正确语法的用于使用SSML音素标记,用于指定读音的一些实例是在这些<一href="https://android.git.kernel.org/?p=platform/external/svox.git;a=commitdiff;h=89292811b7fe82e5c14fa13942779763627e26db">tests的TextToSpeech 。

Some examples of the proper syntax for specifying the pronunciation using the SSML phoneme tag are in these tests of TextToSpeech.

即使这些简单的测试SSML文件,也有张贴到的logcat有关SSML文件不是良好的警告信息。所以,我打开一个问题,这些看似不正确的logcat消息的<一个href="http://$c$c.google.com/p/android/issues/detail?id=11010&q=TextToSpeech&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars">Android问题跟踪。

Even with these simple test SSML documents, there are warning messages posted to logcat about the SSML document not being well-formed. So I opened an issue about these seemingly incorrect logcat messages to the Android issue tracker.

语法指定的X-SAMPA序列SVOX微微是

The syntax for specifying an x-SAMPA sequence to SVOX pico is

String text = "<speak xml:lang=\"en-US\"> <phoneme alphabet=\"xsampa\" ph=\"d_ZIn\"/>.</speak>";
mTts.speak(text, TextToSpeech.QUEUE_ADD, null); 

虽然越来越多的例子将是有益的,对于x-SAMPA一个很好的参考是 http://en.wikipedia.org/wiki / Xsampa 的。如果我编译几十个例子,我会后他们的维基百科页面。

Although more examples would be helpful, a good reference for x-SAMPA is at http://en.wikipedia.org/wiki/Xsampa If I compile a couple dozen examples, I'll post them to that Wikipedia page.

这篇关于指定发音为Android TTS引擎的最佳实践?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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