I am using simple C# code to let a program talk
if (checkBox1.Checked == true) {
SpeechSynthesizer speaker = new SpeechSynthesizer();
speaker.Rate = 1;
speaker.Volume = 100;
speaker.Speak(stringout);
The problem is that string out contains sentences with numbers. And Microsoft Speech recognizes these as 'area codes'. So for example instead of saying
sample 90 123 40
I hear:
sample *area code* 90 123 40
How to stop this behaviour?
Try this:
speaker.SpeakSsml("sample <say-as interpret-as=\"string\" format=\”digit string\” detail=\”string\”>90 123 40<say-as>");
If that works, do a RegEx replace on your string in to wrap numbers in that string.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With