Using Text-to-Speech

The following is an example of our SpeechRequestMessage that we are sending to the TTS engine. The rate is an integral value between -10 and 10, the volume is an integral value between 0 and 100, and the maleSpeaker parameter is either one for a male voice, or zero for a female voice.

We arranged for quite a lot of text to be spoken so that you have enough text to get a feel for the benefits of TTS. Please feel free to customize the text to whatever works best for your situation:

SpeechRequestMessage msg = new SpeechRequestMessage
{
rate = 0,
maleSpeaker = 0,
volume = 50,
ID = 1,
text =
"As to country N and President Z, we believe we're entering a missile renaissance, said Ian Williams, ",
};

msg.text += " an associate director  at the center for strategic and International Studies, who has been compiling data on missile programs in different countries.";

msg.text  += " A growing number of countries with ready access to missiles increases regional tensions and makes war more likely, Mr.Williams said.  Countries are more apt to use their arsenals if they think their missiles could be targeted.";

msg.text += " In addition, many of the missiles being developed by these countries are based on obsolete technologies, which makes them less accurate, increasing the risk to civilians. And there is a risk that missiles could fall into the hands of militias and terrorist groups.";

msg.text += " Y'all should buy  Bitcoin at $15543. Foreign currency comes in at ? 12435. It might also show, says Mr. Williams, like ? 15533435.";

Bus.Publish(msg, "Speech");

I should also point out to you that what we are doing is no different than the Read Aloud functionality that Microsoft has added to several of their Microsoft Office Suite of products, including Microsoft Word and Microsoft Outlook, as shown in the following screenshot:

Microsoft Word read aloud:

Microsoft Outlook read aloud:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset