Tags

, , , ,

Introduction

Windows store apps SDK doesnt support System.Speech class. Thus we can’t use Text to speech in windows store apps we develop. Though Bing translator API supports this, that is not capable of rendering some complex words. Google has a translator API which can perform TTS work as well. For sample in your browser type this url http://translate.google.com/translate_tts?tl=en&q=I%20hope%20this%20helps%20you%20get%20started.%20Of%20course,%20there%20are%20many%20better%20approaches%20to%20this.

This Google TTS engine is awesome. This is a sample project on C#, tells how to embed Google TTS in your Windows store app.

Building the Sample

You need internet connectivity to test this sample.

Description

This sample uses MediaElement to get the audio responce and speak to it. The below is the simple code sinppet to revoke Google TTS in MediaElement

Code snippet

string pathx = "http://translate.google.com/translate_tts?tl=en&q=Hola"; mediaElement.Source = new Uri(pathx, UriKind.RelativeOrAbsolute); mediaElement.Play();

Download Sample project here :: http://code.msdn.microsoft.com/Text-to-speech-in-Windows-93e6ded3

Advertisements