I have created a storyboard that has some moving elements/objects and I want to add a SpeechSynthesizer into a Storyboard.
Is that possible?? I am working on C#.
Storyboard myStoryboard=new Storyboard();
SpeechSynthesizer reader = new SpeechSynthesizer();
reader.Speak("This is my first speech project"); /* instead of speak I want
to add this into the storyboard
.....
myStoryboard.Children.Add(readerAnimation);
Or is there a way to add an audio into a storyboard?
If you are willing to use an audiofile, you can use the
MediaTimeLineClass. You can then use one of the SpeachSynthesizer'sSetOutputToWaveFileMethods to create your File.Saving waveFile Modified from 2nd Link:
Xaml
modified from First Link for playing the file
Be aware that once the Storyboard plays the file it will maintain a lock on it.