title: best practice for specifying pronunciation for Android TTS engine?
body: <p>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.</p>
  
  <p>For example, the correct pronunciation of the bird Chachalaca is CHAH-chah-LAH-kah.  Here is what the TTS engine produces:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>Here are my questions.</p>
  
  <p><b></p>
  
  <ul>
    <li>Is there a standard phonetic spelling recognized by the Android TTS engine?</li>
    <li>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?</li>
    <li>It appears that the Android TTS engine ignores text case.  What is the best way to specify emphasis?</li>
  </ul>
  
  <p></b></p>
  
  <p>By the way, this is what the TTS engine writes to logcat:</p>
  
  <p>V/TtsService(  294): TTS processing: CHAH chah LOCKah<br>
  V/TtsService(  294): TtsService.setLanguage(eng, USA, )<br>
  I/SVOX Pico Engine(  294): Language already loaded (en-US == en-US)<br>
  I/SynthProxy(  294): setting speech rate to 100<br>
  I/SynthProxy(  294): setting pitch to 100  </p>
  
  <p>[UPDATE]</p>
  
  <p>I tried passing an XML document to TextToSpeech.speak() as follows:</p>
  
  <pre><code>            String text = "&lt;?xml version=\"1.0\"?&gt;" +
                  "&lt;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\"&gt;" +
  
                      "That is a big car! " +
                      "That &lt;emphasis&gt;is&lt;/emphasis&gt; a big car! " +
                      "That is a &lt;emphasis&gt;big&lt;/emphasis&gt; car! " +
                      "That is a huge bank account! " +
                      "That &lt;emphasis level=\"strong\"&gt;is&lt;/emphasis&gt; a huge bank account! " +
                      "That is a &lt;emphasis level=\"strong\"&gt;huge&lt;/emphasis&gt; bank account!" +
                  "&lt;/speak&gt;";
              mTts.speak(text, TextToSpeech.QUEUE_ADD, null);
  </code></pre>
  
  <p>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.</p>
  
  <p>[UPDATE 2]</p>
  
  <p>I simplified the question to whether or not Android TTS supports Speech Synthesis Markup Language <a href="https://stackoverflow.com/questions/3525424/does-android-tts-support-speech-synthesis-markup-language">here</a>.</p>