Windows Phone – basic French text to speech

Following on from the Phone basic app post, I’ll look at the most basic thing you can do to get French text working.

Before that, notice that in the References, we have this:


Just out of interest looking at where they are installed:




OK, back to the subject. In the method below, I’ve changed the “GB” reference to “FR”. I’ve also set a break point so we can see how the voices object looks:





, and moving to the right:



I’ve updated the XAML to add in the French, including some acutes:



Je suis désolé, Monsieur le Président, mais il semble que deux fois deux font quatre.

which at first caused a problem, when I recompiled:


With the focus still on the XAML page, going to File/Advanced Save Options showed that the page was in West European – I clearly don’t understand enough about encoding to understand why that should be a problem. So anyway, I changed it to UTF8/65001:


, and after that it compiled fine, and the preview looked good:


The only thing then left to do was to run it, and prove that it was all good:



(Also this lookup for French codes is useful.)

Given that the Windows Phone version of Speech does not allow you to save to a wav or other file, I eventually resorted to this in the Sound panel:


, and then used the Windows (8) Sound recorder to capture that. But still not simple, because there is no Save To File option, so  you have to bring up the Charms, Share, and send an email, which is in m4a format. I then used ITunes to convert to mp3, and that is the file you hear on SoundCloud as an example:


Dead useful for embedding SoundCloud in WordPress.