| DiaSpringWrapperStartAudioStream Method |
Starts streaming the voice on a channel.
Namespace: InkostarAssembly: DiaSpringWrapper (in DiaSpringWrapper.dll) Version: 0.0.0.0
Syntaxpublic void StartAudioStream(
string ChannelName,
int BufferSize,
DiaSpringWrapperRecordedVoiceStreamDelegate StreamHandler,
int MaximumRecordDuration,
bool InterruptOnDigit,
int MaxSilenceDurationSeconds
)
Public Sub StartAudioStream (
ChannelName As String,
BufferSize As Integer,
StreamHandler As DiaSpringWrapperRecordedVoiceStreamDelegate,
MaximumRecordDuration As Integer,
InterruptOnDigit As Boolean,
MaxSilenceDurationSeconds As Integer
)
public:
void StartAudioStream(
String^ ChannelName,
int BufferSize,
DiaSpringWrapperRecordedVoiceStreamDelegate^ StreamHandler,
int MaximumRecordDuration,
bool InterruptOnDigit,
int MaxSilenceDurationSeconds
)
member StartAudioStream :
ChannelName : string *
BufferSize : int *
StreamHandler : DiaSpringWrapperRecordedVoiceStreamDelegate *
MaximumRecordDuration : int *
InterruptOnDigit : bool *
MaxSilenceDurationSeconds : int -> unit
Parameters
- ChannelName
- Type: SystemString
The Channel name on the Dialogic board from which to start streaming the voice. - BufferSize
- Type: SystemInt32
The size of the audio stream buffer in bytes. This value must be greater than 127 or 0 for the default of 32kb and must be in multiple of 128. - StreamHandler
- Type: InkostarDiaSpringWrapperRecordedVoiceStreamDelegate
The receiving function pointer or delegate that will receive the stream. - MaximumRecordDuration
- Type: SystemInt32
The maximum recording duration in seconds. Set to 0 for no limit. - InterruptOnDigit
- Type: SystemBoolean
A boolean value to indicate whether or not the recording should be interrupted when any digit is pressed. - MaxSilenceDurationSeconds
- Type: SystemInt32
The silence duration in seconds after which audio streaming will stop when no audio is heard on the channel. Set this parameter to 0 to disable silence detection.
Remarks
This function will fail if invoked before the [device].Open() function.
The audio stream encoding settings are: VoiceFormat.VOX, FileFormat.DIALOGIC_ADPCM, SamplingRate.RATE_8KHZ, BitsPerSample.BPS_4.
The streaming will stop whenever the MaximumRecordDuration was reached or the channel was set to on-hook.
Examples
Stream the conversation on the first channel with a buffer size of 512 bytes and up to one minute. Recording will stop when a digit is pressed and when 10 seconds of silence is detected
C#: objDevice.StartAudioStream("dxxxB1C1", 512, StreamHandler, 60, true, 10);
VB.NET: objDevice.StartAudioStream("dxxxB1C1", 512, StreamHandler, 60, true, 10)
See Also