Guest Tim Report post Posted 10/21/2003 09:18 PM Ho can I add pauses to a TTS sentence? I've tried commas and space, but nothing seems to work. any clues? Share this post Link to post
SupportTeam Report post Posted 10/22/2003 02:03 AM This all depends on what SAPI XML context formatting tags are supported by the TTS engine that you are using. Please see the help file for your TTS engine, or have a look at these links: http://msdn.microsoft.com/library/default....ments_Intro.asp http://www.w3.org/TR/2002/WD-speech-synthe...hesis-20020405/ Most of the tags defined in links above are supported by most of the TTS engines - but many engines have their own versions... Please also see in the SAPI Help file. In the case of pauses it looks like the <break/> element is what you are looking for. Please try using this: <?xml version="1.0" encoding="ISO-8859-1"?> <speak version="1.0" xml:lang="en-US" xmlns="http://www.w3.org/2001/10/synthesis"> Take a deep breath <break/> then continue. Press 1 or wait for the tone. <break time="3s"/> I didn't hear you! </speak> or just <p>Take a deep breath <break/> then continue. Press 1 or wait for the tone. <break time="3s"/> I didn't hear you!</p> AT&T natural Voices has an extended syntax for the <break/> element: 9.2 Break The Break tag instructs the TTS engine to insert a pause in the synthesized text in one of three ways. Syntax: <BREAK/> Languages: US English, UK English, Spanish, German, French Example: Time for a pause <Break/> Okay, keep going. Inserts a brief break after the word “pause”. Syntax: <BREAK Size=”none | small | medium | large”/> Example: No time for a pause <Break size=”none”/> Keep going. Inserts no break after the word “pause”. Example: Time for a pause <Break size=”medium”/> Okay, keep going. Inserts a brief silence, the equivalent of the silence following a sentence, after the word “pause”. Example: Time for a pause <Break size=”large”/> Keep going. Inserts only the default break after the word “pause”. Example: Time for a pause <Break size=”medium”/> Okay, keep going. Inserts the equivalent of a paragraph break of silence after the word “pause”. Syntax: <BREAK time=” duration ”/> Example: Break for 100 milliseconds <Break time=”100ms”/> Okay, keep going. Inserts 100 milliseconds of silence after the word “milliseconds”. Example: Break for 3 seconds <Break time=”3s”/> Okay, keep going. Inserts 3 seconds of silence after the word “seconds”. Share this post Link to post
Guest tim Report post Posted 10/22/2003 01:02 PM does this xml work just within a text file read by voiceguide? what about if I have text entered into a field in one of the modules, can I use it there as well? thanks Tim Share this post Link to post
SupportTeam Report post Posted 10/23/2003 01:06 AM Works in both. Input from both places is passed on to the TTS engine and it is the TTS engine that interprets and reacts to the XML tags. Share this post Link to post
Guest Tim Report post Posted 10/23/2003 07:40 AM I enter the following in a text file, hello <Break/> hello but when it is read using the standard microsoft TTS engine it says hello less than, break, forward slash, greater than hello ie it doesn't recognise it as a tag. Am I still missing something? Share this post Link to post
SupportTeam Report post Posted 10/23/2003 08:52 AM have you tried the samples provided in previous post? <?xml version="1.0" encoding="ISO-8859-1"?> <speak version="1.0" xml:lang="en-US" xmlns="http://www.w3.org/2001/10/synthesis"> Take a deep breath <break/> then continue. Press 1 or wait for the tone. <break time="3s"/> I didn't hear you! </speak> and/or <p>Take a deep breath <break/> then continue. Press 1 or wait for the tone. <break time="3s"/> I didn't hear you!</p> Share this post Link to post
Guest Tim Report post Posted 10/23/2003 11:39 AM this is kind of related... I have a vbscript that reads a webpage, and the resulting text is written to the results text file. the webpage returns <?xml version="1.0" encoding="ISO-8859-1"?> <speak version="1.0" xml:lang="en-US" xmlns="http://www.w3.org/2001/10/synthesis"> Take a deep breath <break/> then continue. Press 1 or wait for the tone. <break time="3s"/> I didn't hear you! </speak> but the resulting text file contains loads more... [diarytext]{<DIV class=e><SPAN class=b> </SPAN> <SPAN class=m><?</SPAN><SPAN class=pi>xml version="1.0" encoding="ISO-8859-1" </SPAN><SPAN class=m>?></SPAN> </DIV> <DIV class=e> <DIV class=c style="MARGIN-LEFT: 1em; TEXT-INDENT: -2em"><A class=b onfocus=h() onclick="return false" href="#">-</A> <SPAN class=m><</SPAN><SPAN class=t>speak</SPAN><SPAN class=t> version</SPAN><SPAN class=m>="</SPAN><B>1.0</B><SPAN class=m>"</SPAN><SPAN class=ns> xml:lang</SPAN><SPAN class=m>="</SPAN><B class=ns>en-US</B><SPAN class=m>"</SPAN><SPAN class=ns> xmlns</SPAN><SPAN class=m>="</SPAN><B class=ns>http://www.w3.org/2001/10/synthesis</B><SPAN class=m>"</SPAN><SPAN class=m>></SPAN></DIV> <DIV> <DIV class=e><SPAN class=b> </SPAN> <SPAN class=tx>Take a deep breath </SPAN></DIV> <DIV class=e> <DIV style="MARGIN-LEFT: 1em; TEXT-INDENT: -2em"><SPAN class=b> </SPAN> <SPAN class=m><</SPAN><SPAN class=t>break</SPAN> <SPAN class=m>/></SPAN> </DIV></DIV> <DIV class=e><SPAN class=b> </SPAN> <SPAN class=tx>then continue. Press 1 or wait for the tone. </SPAN></DIV> <DIV class=e> <DIV style="MARGIN-LEFT: 1em; TEXT-INDENT: -2em"><SPAN class=b> </SPAN> <SPAN class=m><</SPAN><SPAN class=t>break</SPAN> <SPAN class=t>time</SPAN><SPAN class=m>="</SPAN><B>3s</B><SPAN class=m>"</SPAN><SPAN class=m> /></SPAN> </DIV></DIV> <DIV class=e><SPAN class=b> </SPAN> <SPAN class=tx>I didn't hear you! </SPAN></DIV> <DIV><SPAN class=b> </SPAN> <SPAN class=m></</SPAN><SPAN class=t>speak</SPAN><SPAN class=m>></SPAN></DIV></DIV></DIV>} and then when i reference the $RV diarytext it fails (and just says $RV diary text) When I use this method to return just plain text, with no tags it works a treat. any ideas? Share this post Link to post
SupportTeam Report post Posted 10/23/2003 11:57 AM this is really all affected by the method that writes out your text file - looks like it tries to do something when it detects that output is an XML stream... and then when i reference the $RV diarytext it fails (and just says $RV diary text)' how is it referenced? could you please post a copy of VoiceGuide's Debug Printout which captures the problem, this will allow us to see what is going wrong. (When running the script click on VoiceGuide's View menu and select 'Event Trace Log' option - any log information will then appear in this window. You must open the trace window before making the call.) Share this post Link to post
Guest Tim Report post Posted 10/23/2003 12:11 PM both problems solved - here are the asnwers for those interested... using innerHTML gives loads of extra tags, use innerText instear. when writing to the results file, keep each value on 1 line. I used the replace function to remove all vbcrlf's from the returned text, and all seems to work pretty well now. thanks for the fast responses to the forum. Tim Share this post Link to post
Guest Tim Report post Posted 10/23/2003 12:28 PM ah, not quite there just yet... I have a nice clean text file created as follows [diarytext]{<?xml version="1.0" encoding="ISO-8859-1"?> <speak version="1.0" xml:lang="en-US" xmlns="http://www.w3.org/2001/10/synthesis"> Diary entries for Thursday, the twenty third of October. <break/><break/><break/>Entry for Stephen. Warwick Manufacturing Group Ltd at 10 o'clock in the morning . <break/><break/> End of diary. </speak>} (this is all on one line) looks exactly like the example given, however, the breaks are still ignored! Share this post Link to post
Guest Tim Report post Posted 10/23/2003 02:04 PM at last - all is working well. I use <silence msec='1000'/> rather than <break/> for the microsoft tts engine. I guess <break/> is for the AT&T engine. Tim Share this post Link to post