| DiaSpringWrapperRecord Method (String, String, Int32, Int32, DiaSpringWrapperCommonVoiceFormat, DiaSpringWrapperCommonFileFormat, DiaSpringWrapperCommonSamplingRate, DiaSpringWrapperCommonBitsPerSample, DiaSpringWrapperCommonSyncMode, Boolean) |
Starts recording the voice on a channel.
Namespace: InkostarAssembly: DiaSpringWrapper (in DiaSpringWrapper.dll) Version: 0.0.0.0
Syntaxpublic void Record(
string ChannelName,
string fileName,
int MaximumRecordDuration,
int MaxSilenceDurationSeconds,
DiaSpringWrapperCommonVoiceFormat VoiceFormat,
DiaSpringWrapperCommonFileFormat FileFormat,
DiaSpringWrapperCommonSamplingRate Rate,
DiaSpringWrapperCommonBitsPerSample BitsPerSample,
DiaSpringWrapperCommonSyncMode Mode,
bool InterruptOnDigit
)
Public Sub Record (
ChannelName As String,
fileName As String,
MaximumRecordDuration As Integer,
MaxSilenceDurationSeconds As Integer,
VoiceFormat As DiaSpringWrapperCommonVoiceFormat,
FileFormat As DiaSpringWrapperCommonFileFormat,
Rate As DiaSpringWrapperCommonSamplingRate,
BitsPerSample As DiaSpringWrapperCommonBitsPerSample,
Mode As DiaSpringWrapperCommonSyncMode,
InterruptOnDigit As Boolean
)
public:
void Record(
String^ ChannelName,
String^ fileName,
int MaximumRecordDuration,
int MaxSilenceDurationSeconds,
DiaSpringWrapperCommonVoiceFormat VoiceFormat,
DiaSpringWrapperCommonFileFormat FileFormat,
DiaSpringWrapperCommonSamplingRate Rate,
DiaSpringWrapperCommonBitsPerSample BitsPerSample,
DiaSpringWrapperCommonSyncMode Mode,
bool InterruptOnDigit
)
member Record :
ChannelName : string *
fileName : string *
MaximumRecordDuration : int *
MaxSilenceDurationSeconds : int *
VoiceFormat : DiaSpringWrapperCommonVoiceFormat *
FileFormat : DiaSpringWrapperCommonFileFormat *
Rate : DiaSpringWrapperCommonSamplingRate *
BitsPerSample : DiaSpringWrapperCommonBitsPerSample *
Mode : DiaSpringWrapperCommonSyncMode *
InterruptOnDigit : bool -> unit
Parameters
- ChannelName
- Type: SystemString
The Channel name on the Dialogic board on which to start recording the voice. - fileName
- Type: SystemString
The full path and name of the file recording. - MaximumRecordDuration
- Type: SystemInt32
The maximum recording duration in seconds. Set to 0 for no limit. - MaxSilenceDurationSeconds
- Type: SystemInt32
The maximum silence duration in seconds after which recording will end if no audio is heard on the channel. Set this value to 0 to disable silence detection. - VoiceFormat
- Type: InkostarDiaSpringWrapperCommonVoiceFormat
A constant enumerator to indicate if recording to VOX or WAV format. - FileFormat
- Type: InkostarDiaSpringWrapperCommonFileFormat
A constant enumerator to indicate the underlying recording format: DIALOGIC_ADPCM (Dialogic native format), WAV_MICROSOFT (Microsoft native format), ALAW, MULAW or PCM. - Rate
- Type: InkostarDiaSpringWrapperCommonSamplingRate
A constant enumerator to indicate the recording sampling rate: RATE_6KHZ (6Khz), RATE_8KHZ (8Khz) or RATE_11KHZ (11 Khz). - BitsPerSample
- Type: InkostarDiaSpringWrapperCommonBitsPerSample
A constant enumerator to indicate the recording bits per sample: BPS_8 (8bps) or BPS_4 (4bps). - Mode
- Type: InkostarDiaSpringWrapperCommonSyncMode
A constant enumerator to indicate whether the recording should be done synchronously or asynchronously. When record is asynchronous, any code following this function will execute immediately while the recording is performed as a background task. - InterruptOnDigit
- Type: SystemBoolean
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 be done asynchronously and 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, Inkostar.DiaSpringWrapperCommon.SyncMode.Asynchronous, 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, Inkostar.DiaSpringWrapperCommon.SyncMode.Asynchronous, True)
See Also