Click or drag to resize
DiaGlobWrapperRecord Method
diaGlobWrapper Help
Records voice on a channel.

Namespace: Inkostar
Assembly: DiaGlobWrapper (in DiaGlobWrapper.dll) Version: 0.0.0.0
Syntax
public void Record(
	Channel CurrentChannel,
	string RecordingFile,
	int RecordingDurationSecs,
	DiaGlobWrapperCommonVoiceFormat RecordingVoiceFormat,
	DiaGlobWrapperCommonFileFormat RecordingFileFormat,
	DiaGlobWrapperCommonSamplingRate RecordingSamplingRate,
	DiaGlobWrapperCommonBitsPerSample RecordingBitsPerSample,
	bool InterruptRecordingOnDigit
)

Parameters

CurrentChannel
Type: InkostarChannel
The Channel on the Dialogic board on which the function is to be executed.
RecordingFile
Type: SystemString
The fully qualified path of the recording file.
RecordingDurationSecs
Type: SystemInt32
The recording duration in seconds. Recording will be stopped when the time limit has been reached.
RecordingVoiceFormat
Type: InkostarDiaGlobWrapperCommonVoiceFormat
An enumerated constant to indicate if the file format of the recorded voice is WAV or VOX.
RecordingFileFormat
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.
RecordingSamplingRate
Type: InkostarDiaGlobWrapperCommonSamplingRate
An enumerated constant to indicate the sampling rate: RATE_6KHZ (6Khz), RATE_8KHZ (8Khz) or RATE_11KHZ (11 Khz).
RecordingBitsPerSample
Type: InkostarDiaGlobWrapperCommonBitsPerSample
An enumerated constant to indicate the bits per sample value: BPS_8 (8bps) or BPS_4 (4bps).
InterruptRecordingOnDigit
Type: SystemBoolean
A boolean value if set to True will cause the recording to be interrupted when any digit is pressed.
Remarks
This function can only be invoked when the channel has been opened.
Compatibility: All
On failure this function will generate an exception of type DiaGlobWrapperLibException
Examples
To record the voice from the oubound channel to 'c:\recorded.wav', for a duration of 1 minute and using a format of WAV and encoding of WAV_MICROSOFT at a sampling rate of 8khz. Recording will stop when a digit is pressed.
C#: objDevice.Record(ChannelOutbound, @"c:\recorded.wav", 60, 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.Record(ChannelOutbound, "c:\recorded.wav", 60, 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