Click or drag to resize
TapiCallSpeak Method (String)
Speaks the contents of a text string using text synthesis. Pending speak and play requests are not purged.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 6.0.0.1110
Syntax
public void Speak(
	string text
)

Parameters

text
Type: SystemString
Text string (possibly containing XML markup) to be synthesized.
Exceptions
ExceptionCondition
TapiDisconnectExceptionThe call has been already disconnected.
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. The text passed to this Speak call will be spoken after all outstaning speak and play requests are completed. Use WaitUntilDone(Int32) method to find out if all speak and play requests are completed or to wait until all requests are completed. If you want to purge all outstanding requests and start to speak the text immediately, use Speak(String, Boolean) and set purgeBeforeSpeak parameter to true.

If the first character of the string in text parameter is a left-angle-bracket (<), the input text will be parsed for XML markup. The 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.

See Also