diaGlobWrapper Help
Assembly: DiaGlobWrapper (in DiaGlobWrapper.dll) Version: 0.0.0.0
Plays a voice prompt.
Namespace:
InkostarAssembly: DiaGlobWrapper (in DiaGlobWrapper.dll) Version: 0.0.0.0
Syntax
| C# |
|---|
public void Play( Channel CurrentChannel, string PromptFile, DiaGlobWrapperCommon..::.VoiceFormat PromptVoiceFormat, DiaGlobWrapperCommon..::.FileFormat PromptFileFormat, DiaGlobWrapperCommon..::.SamplingRate PromptSamplingRate, DiaGlobWrapperCommon..::.BitsPerSample PromptBitsPerSample, DiaGlobWrapperCommon..::.SyncMode PlayMode, bool InterruptPromptOnDigit ) |
| Visual Basic (Declaration) |
|---|
Public Sub Play ( _ CurrentChannel As Channel, _ PromptFile As String, _ PromptVoiceFormat As DiaGlobWrapperCommon..::.VoiceFormat, _ PromptFileFormat As DiaGlobWrapperCommon..::.FileFormat, _ PromptSamplingRate As DiaGlobWrapperCommon..::.SamplingRate, _ PromptBitsPerSample As DiaGlobWrapperCommon..::.BitsPerSample, _ PlayMode As DiaGlobWrapperCommon..::.SyncMode, _ InterruptPromptOnDigit As Boolean _ ) |
| Visual C++ |
|---|
public: void Play( Channel^ CurrentChannel, String^ PromptFile, DiaGlobWrapperCommon..::.VoiceFormat PromptVoiceFormat, DiaGlobWrapperCommon..::.FileFormat PromptFileFormat, DiaGlobWrapperCommon..::.SamplingRate PromptSamplingRate, DiaGlobWrapperCommon..::.BitsPerSample PromptBitsPerSample, DiaGlobWrapperCommon..::.SyncMode PlayMode, bool InterruptPromptOnDigit ) |
Parameters
- CurrentChannel
- Type: Inkostar..::.Channel
The Channel on the Dialogic board on which the function is to be executed.
- PromptFile
- Type: System..::.String
The fully qualified path of the file to be played.
- PromptVoiceFormat
- Type: Inkostar..::.DiaGlobWrapperCommon..::.VoiceFormat
An enumerated constant to indicate if the file format of the voice prompt is WAV or VOX.
- PromptFileFormat
- Type: Inkostar..::.DiaGlobWrapperCommon..::.FileFormat
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: Inkostar..::.DiaGlobWrapperCommon..::.SamplingRate
An enumerated constant to indicate the sampling rate: RATE_6KHZ (6Khz), RATE_8KHZ (8Khz) or RATE_11KHZ (11 Khz).
- PromptBitsPerSample
- Type: Inkostar..::.DiaGlobWrapperCommon..::.BitsPerSample
An enumerated constant to indicate the bits per sample value: BPS_8 (8bps) or BPS_4 (4bps).
- PlayMode
- Type: Inkostar..::.DiaGlobWrapperCommon..::.SyncMode
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: System..::.Boolean
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
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)
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)