S Nash
S Nash

Reputation: 2499

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

I use SpeechSynthesizer.SpeakSsml(String).

However not able to build an SSML containing pitch.

So far I could not find any working example online.

Upvotes: 2

Views: 354

Answers (1)

Luke
Luke

Reputation: 949

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>");

Upvotes: 3

Related Questions