Click or drag to resize
DiaSpringWrapperPlaySpeech Method (String, String, String, DiaSpringWrapperCommonSyncMode, Boolean)
Plays a string using the default Text-To-Speech engine and default voice selection then saves the speech file to the filesystem

Namespace: Inkostar
Assembly: DiaSpringWrapper (in DiaSpringWrapper.dll) Version: 0.0.0.0
Syntax
public void PlaySpeech(
	string ChannelName,
	string SpeechFilename,
	string SpeechText,
	DiaSpringWrapperCommonSyncMode Mode,
	bool InterruptOnDigit
)

Parameters

ChannelName
Type: SystemString
The Channel name on the Dialogic board on which to start playback.
SpeechFilename
Type: SystemString
The full path and name of the stored speech file.
SpeechText
Type: SystemString
The string to speak.
Mode
Type: InkostarDiaSpringWrapperCommonSyncMode
A constant enumerator to indicate whether the playback should be done synchronously or asynchronously. When play is asynchronous, any code following this function will execute immediately while the playback is performed as a background task.
InterruptOnDigit
Type: SystemBoolean
A boolean value to indicate whether or not the playback should be interrupted when any digit is pressed.
Remarks
This function will fail if invoked before the [device].Open() function.
The saved speech file will be in the format VOX, 8 bit Mono PCM, Sample rate of 8000 Hz The defaut format of the speech file created is of type WAV with encoding WAV_MICROSOFT at 11 Khz.
Examples
Play a greeting on the first channel asynchronously. Playback will stop when a digit is pressed. The speech file stored to c:\speech.vox
C#: objDevice.PlaySpeech("dxxxB1C1", "c:\\speech.vox", "Thank you for calling Inkostar, please leave a Message by pressing 1 or else please hold.", Inkostar.DiaSpringWrapperCommon.SyncMode.Asynchronous, true);
VB.NET: objDevice.PlaySpeech("dxxxB1C1", "c:\\speech.vox", "Thank you for calling Inkostar, please leave a Message by pressing 1 or else please hold.", Inkostar.DiaSpringWrapperCommon.SyncMode.Asynchronous, True)
See Also