Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Text to Speech in Windows Store App using Speech Synthesizer

I am running this sample of Hello world My code is

private async void Button_Click(object sender, RoutedEventArgs e)
        {
            var synth = new Windows.Media.SpeechSynthesis.SpeechSynthesizer();
            Windows.Media.SpeechSynthesis.SpeechSynthesisStream stream = await synth.SynthesizeTextToStreamAsync("Hello World");

            var mediaElement = new MediaElement();
            mediaElement.SetSource(stream,stream.ContentType);
            mediaElement.Play();
        }

when I debug it, I get an error:

An exception of type 'System.IO.FileNotFoundException' occurred in SunnahForKids.exe but was not handled in user code
Additional information: The specified module could not be found. (Exception from HRESULT: 0x8007007E)
like image 715
user3257229 Avatar asked Feb 09 '14 20:02

user3257229


1 Answers

From the MSDN Reference

Requirements

Minimum supported client: Windows 8.1

Minimum supported server: Windows Server 2012 R2

Minimum supported phone: Windows Phone 8.1 [Windows Runtime apps only]

Namespace: Windows.Media.SpeechSynthesis, Windows::Media::SpeechSynthesis [C++]

like image 137
Kris Avatar answered Sep 28 '22 06:09

Kris