C#, How to add Pitch to SpeechSynthesizer.SpeakSsml(String)

294 views Asked by At

I use SpeechSynthesizer.SpeakSsml(String).

However not able to build an SSML containing pitch.

So far I could not find any working example online.

1

There are 1 answers

1
Luke On

MS's Speech Synthesizer isn't built to do singing synthesis, but you can change the pitch characteristics using the <prosody> element:

SpeechSynthesizer.SpeakSsml("<speak version=\"1.0\" xml:lang=\"en\"><prosody pitch=\"x-low\">Hello World</prosody>.<prosody pitch=\"x-high\">Hello World</prosody></speak>");