Do you know of any (simple) examples on the namespace System.Speech.Synthes开发者_高级运维is.TtsEngine?
I'd like to use a TTS engine that allows me to control the pitch, the rate and the volume of the output voice. It looks like the namespace mentioned above allows me to do that, but I couldn't find a single example. I've not fully understood if, in order to do what I want, I'd have to rewrite the (probably enormous and complicated) whole code that transforms text to speech, or if I'd only "hook" on the process and modify some variables.
A more or less viable option for me would be MBROLA, since I can easily control the duration and the pitch of each phoneme. The problem is that MBROLA is a phoneme-to-speech engine, and thus I would have to convert text to phonemes before using it on MBROLA (which can be hard! e.g. "I read" and "I've read", different phonemes for "read" and "read"!).
Any suggestions would be very appreciated!
Thanks!
I'm wondering why you need to go to such a low level (System.Speech.Synthesis.TtsEngine is intended for people who are writing their own TTS engine) when System.Speech.SpeechSynthesizer already exposes all the features that you describe, and is much easier to use.
System.Speech.SpeechSynthesizer has properties to control rate, pitch, and volume. Also, the SpeakSsml method allows you to embed SSML markup into the spoken text to control rate, pitch and volume without having to handle speech events.
精彩评论