AddTapi.NET Developer's Manual
Speak Method (text, purgeBeforeSpeak)
NamespacesTraysoft.AddTapiTapiCallSpeak(String, Boolean)
Speaks the contents of a text string using text synthesis.
Declaration Syntax
C#Visual BasicVisual C++
public void Speak(
	string text,
	bool purgeBeforeSpeak
)
Public Sub Speak ( _
	text As String, _
	purgeBeforeSpeak As Boolean _
)
public:
void Speak(
	String^ text, 
	bool purgeBeforeSpeak
)
Parameters
text (String)
Text string (possibly containing XML markup) to be synthesized.
purgeBeforeSpeak (Boolean)
Indicates whether to purge all pending speak and play requests prior to this speak call.
Remarks

Speak method speaks a text using text-to-speech voice selected in SpeechVoice property. SpeechVolume property sets the volume of the spoken text. SpeechRate sets the rate (speed) of the spoken text.

Speak is asynchronous and returns immediately after the speak request is queued. AddTapi.NET will speak and play queued Speak and Play(String, Boolean) requests in the same order they were queued. Use WaitUntilDone(Int32) method to find out if all speak and play requests are completed or to wait until all requests are completed. If purgeBeforeSpeak parameter is true, Speak clears the queue and removes all pending speak and play requests prior to this speak call. In effect, Speak call with purgeBeforeSpeak set to true stops the currently playing file or text and starts speaking the new text passed in text parameter.

If the first character of the string in text parameter is a left-angle-bracket (<), the input text will be parsed for XML markup. Your application can use any SAPI 5 XML tags supported by the text-to-speech engine you are using. Please refer to the Synthesis Markup http://msdn.microsoft.com/en-us/library/ms723638.aspx and XML TTS Tutorial http://msdn.microsoft.com/en-us/library/ms717077.aspx topics in Microsoft Speech API documentation for detailed description of SAPI 5 XML.

Exceptions
ExceptionCondition
TapiDisconnectExceptionThe call has been already disconnected.
See Also

Assembly: Traysoft.AddTapi (Module: Traysoft.AddTapi)