Click or drag to resize
DiaGlobWrapperPlay Method
diaGlobWrapper Help
Plays a voice prompt.

Namespace: Inkostar
Assembly: DiaGlobWrapper (in DiaGlobWrapper.dll) Version: 0.0.0.0
Syntax
public void Play(
	Channel CurrentChannel,
	string PromptFile,
	DiaGlobWrapperCommonVoiceFormat PromptVoiceFormat,
	DiaGlobWrapperCommonFileFormat PromptFileFormat,
	DiaGlobWrapperCommonSamplingRate PromptSamplingRate,
	DiaGlobWrapperCommonBitsPerSample PromptBitsPerSample,
	DiaGlobWrapperCommonSyncMode PlayMode,
	bool InterruptPromptOnDigit
)

Parameters

CurrentChannel
Type: InkostarChannel
The Channel on the Dialogic board on which the function is to be executed.
PromptFile
Type: SystemString
The fully qualified path of the file to be played.
PromptVoiceFormat
Type: InkostarDiaGlobWrapperCommonVoiceFormat
An enumerated constant to indicate if the file format of the voice prompt is WAV or VOX.
PromptFileFormat
Type: InkostarDiaGlobWrapperCommonFileFormat
An enumerated constant to indicate the underlying encoding format, for example DIALOGIC_ADPCM (Dialogic native format) or WAV_MICROSOFT (Microsoft native format). See FileFormat enum for a complete list.
PromptSamplingRate
Type: InkostarDiaGlobWrapperCommonSamplingRate
An enumerated constant to indicate the sampling rate: RATE_6KHZ (6Khz), RATE_8KHZ (8Khz) or RATE_11KHZ (11 Khz).
PromptBitsPerSample
Type: InkostarDiaGlobWrapperCommonBitsPerSample
An enumerated constant to indicate the bits per sample value: BPS_8 (8bps) or BPS_4 (4bps).
PlayMode
Type: InkostarDiaGlobWrapperCommonSyncMode
An enumerated constant to indicate weather the playback operation should be performed asynchronously (Asynchronous) or synchronously (Synchronous). If mode is Asynchronous, the function will return immediately after being invoked while the playpack is being performed. In such case the event EventReceived.PlaybackStopped will be raised once the playback is finished or interrupted.
InterruptPromptOnDigit
Type: SystemBoolean
A boolean value if set to True will cause the playback to be interrupted when any digit is pressed.
Remarks
This function can only be invoked when the call is in a connected state.
Compatibility: All
On failure this function will generate an exception of type DiaGlobWrapperLibException
Examples
To Play a voice prompt on the inbound channel asynchronously using a format of WAV and encoding of WAV_MICROSOFT at a sampling rate of 8khz. Playback will stop when a digit is pressed.
C#: objDevice.Play(ChannelInbound, @"c:\test.wav", Inkostar.DiaGlobWrapperCommon.VoiceFormat.WAV, Inkostar.DiaGlobWrapperCommon.FileFormat.WAV_MICROSOFT, Inkostar.DiaGlobWrapperCommon.SamplingRate.RATE_11KHZ, Inkostar.DiaGlobWrapperCommon.BitsPerSample.BPS_4, Inkostar.DiaGlobWrapperCommon.SyncMode.Asynchronous, true);
VB.NET: objDevice.Play(ChannelInbound, "c:\test.wav", Inkostar.DiaGlobWrapperCommon.VoiceFormat.WAV, Inkostar.DiaGlobWrapperCommon.FileFormat.WAV_MICROSOFT, Inkostar.DiaGlobWrapperCommon.SamplingRate.RATE_11KHZ, Inkostar.DiaGlobWrapperCommon.BitsPerSample.BPS_4, Inkostar.DiaGlobWrapperCommon.SyncMode.Asynchronous, True)
See Also