Starts recording the voice on a channel.

Namespace:  Inkostar
Assembly:  DiaSpringWrapper (in DiaSpringWrapper.dll)
Version: 0.0.0.0

Syntax

         
 C#  Visual Basic  Visual C++ 
public void Record(
	string ChannelName,
	string fileName,
	int MaximumRecordDuration,
	DiaSpringWrapperCommon..::.VoiceFormat VoiceFormat,
	DiaSpringWrapperCommon..::.FileFormat FileFormat,
	DiaSpringWrapperCommon..::.SamplingRate Rate,
	DiaSpringWrapperCommon..::.BitsPerSample BitsPerSample,
	bool InterruptOnDigit
)
Public Sub Record ( _
	ChannelName As String, _
	fileName As String, _
	MaximumRecordDuration As Integer, _
	VoiceFormat As DiaSpringWrapperCommon..::.VoiceFormat, _
	FileFormat As DiaSpringWrapperCommon..::.FileFormat, _
	Rate As DiaSpringWrapperCommon..::.SamplingRate, _
	BitsPerSample As DiaSpringWrapperCommon..::.BitsPerSample, _
	InterruptOnDigit As Boolean _
)
public:
void Record(
	String^ ChannelName, 
	String^ fileName, 
	int MaximumRecordDuration, 
	DiaSpringWrapperCommon..::.VoiceFormat VoiceFormat, 
	DiaSpringWrapperCommon..::.FileFormat FileFormat, 
	DiaSpringWrapperCommon..::.SamplingRate Rate, 
	DiaSpringWrapperCommon..::.BitsPerSample BitsPerSample, 
	bool InterruptOnDigit
)

Parameters

ChannelName
String
The Channel name on the Dialogic board on which to start recording the voice.
fileName
String
The full path and name of the file recording.
MaximumRecordDuration
Int32
The maximum recording duration in seconds. Set to 0 for no limit.
VoiceFormat
DiaSpringWrapperCommon..::.VoiceFormat
A constant enumerator to indicate if recording to VOX or WAV format.
FileFormat
DiaSpringWrapperCommon..::.FileFormat
A constant enumerator to indicate the underlying recording format: DIALOGIC_ADPCM (Dialogic native format), WAV_MICROSOFT (Microsoft native format), ALAW, MULAW or PCM.
Rate
DiaSpringWrapperCommon..::.SamplingRate
A constant enumerator to indicate the recording sampling rate: RATE_6KHZ (6Khz), RATE_8KHZ (8Khz) or RATE_11KHZ (11 Khz).
BitsPerSample
DiaSpringWrapperCommon..::.BitsPerSample
A constant enumerator to indicate the recording bits per sample: BPS_8 (8bps) or BPS_4 (4bps).
InterruptOnDigit
Boolean
A boolean value to indicate whether or not the recording should be interrupted when any digit is pressed.

Remarks

This function will fail if invoked before the [device].Open() function.
When the encoding is set to WAV_MICROSOFT, the BitsPerSample defaults to 4bits.
The recording will stop whenever the MaximumRecordDuration was reached or the channel was set to on-hook.

Examples

Record the conversation on the first channel up to one minute 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("dxxxB1C1", @"c:\test.wav", 60, Inkostar.DiaSpringWrapperCommon.VoiceFormat.WAV, Inkostar.DiaSpringWrapperCommon.FileFormat.WAV_MICROSOFT, Inkostar.DiaSpringWrapperCommon.SamplingRate.RATE_11KHZ, Inkostar.DiaSpringWrapperCommon.BitsPerSample.BPS_4, true);
VB.NET: objDevice.Record("dxxxB1C1", "c:\test.wav", 60, Inkostar.DiaSpringWrapperCommon.VoiceFormat.WAV, Inkostar.DiaSpringWrapperCommon.FileFormat.WAV_MICROSOFT, Inkostar.DiaSpringWrapperCommon.SamplingRate.RATE_11KHZ, Inkostar.DiaSpringWrapperCommon.BitsPerSample.BPS_4, True)

See Also

Inkostar Namespace