I have a text that i need to speak with system.speech so i need a format that when a specific word appears in the text like EPS, i want to speak it like Earning Per Share. I know that there is a attribute for this but it is only implementable at the line where EPS is located like
<sub alias = "Earning Per Share"> EPS </sub>
Currently i am doing this
string ssmlString = "<prosody pitch='x-high'> PIOC|Pioneer Cement|FINANCIAL RESULT FOR THE NINE MONTHS ENDED| <say-as interpret-as='date' format='dmy'> 20/04/2018 </say-as> <say-as interpret-as='time' format='hms12'> 02:50 PM </say-as>" +
"<say-as interpret-as='cardinal' detail=','> 1,234,567.556 </say-as></prosody>";
pb.AppendSsmlMarkup("<voice xml:lang='en-GB'>");
pb.AppendSsmlMarkup(ssmlString);
pb.AppendSsmlMarkup("</voice>");
synth.Speak(pb);
I will be receiving this whole ssmlString from somewhere else. How can i specify the format even before speaking out the text because i don't want to separate all things from sentence and then apply these attributes one by one. Is there any way to create a format for reading out the text with and attributes in a xml file or through code. Any help will be appreciated. Thanks.