tags:

views:

88

answers:

1

Passing the following SSML (Speech Synthesis Markup Language) document to the com.svox.pico TextToSpeech engine resulted in a reading of the XML body but no control from the phoneme element or the emphasis element. This result (no apparent SSML control) is the same on a Nexus One running Android 2.2 as well as on the emulator running an AVD with SDK level 8.

            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\">" +

                    "tomato " +
                    "<phoneme alphabet=\"ipa\" ph=\"t&amp;#x259;mei&amp;#x325;&amp;#x27E;ou&amp;#x325;\"> tomato </phoneme> " +

                    "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);

Does any Android TTS engine support any of the SSML elements?

A: 

The answer seems to be "sort of". Not all the SSML tags are supported yet, but some test examples of the use of the tag are at https://android.git.kernel.org/?p=platform/external/svox.git;a=commitdiff;h=89292811b7fe82e5c14fa13942779763627e26db

Though the test examples produce the desired speech output, they also produce XML parser error messages in logcat. I've opened an issue about these seemingly incorrect error messages at the Android issue tracker (issue 11010).

gregS