I'm quite new to programming in c# but I'm trying to convert plain text into a phonetic representation. I convert the plain text by using the PhonemeReached Event and call them by e.Phoneme. (See code below).
//Initialize Synthesizer for TTS and extracting Phonemes
SpeechSynthesizer synth = new SpeechSynthesizer();
//Calling the PhonemeReachedEvent
synth.PhonemeReached += new EventHandler <PhonemeReachedEventArgs>(synth_PhonemeReached);
//Speaking the text from richTextBox1
synth.SpeakAsync(richTextBox1.Text);
//The Event
private void synth_PhonemeReached(object sender, PhonemeReachedEventArgs e)
{
string output = e.Phoneme;
//Writing the Phoneme to the richTextBox2
richTextBox2.AppendText(string.Format(output));
}
I return the result of e.Phoneme in a richtextbox, but it only writes jibberish (see picture below). It feels like an encoding issue and I would like to know your opinion on how to solve this issue.
https://i.stack.imgur.com/OaDhm.jpg
UPDATE: As stated in the comments Jalkar managed to it working on win7. When I tested my application on Windows 7, I actually got a phoneme-like string. However, when decoded to ASCII it represents jibberish. (So far I haven't been able to get a grasp of how to convert it to Universal Phone Set). Secondly, as Hans Passant stated, the ASCII of the jibberish in the screenshot are indices to the American Phone set (see his link). The weird part however, is that both Win7 and Win8 provide completely different results.
In the screenshot below the results on Win7: http://imgur.com/aTxf5OE
In this screenshot the results on Win8: imgur.com/crAR5HV
If someone knows how to use the IPA to UPS from Microsoft in c#, I would love to hear that.