Skip to content

WebRtcVad.HasSpeech()

Jay Miller edited this page Jun 8, 2020 · 4 revisions

Overloads

Overload Description
HasSpeech(byte[]) Test whether the supplied frame contains speech.
HasSpeech(short[]) Test whether the supplied frame contains speech.
HasSpeech(IntPtr) Test whether the supplied frame contains speech.
HasSpeech(byte[], SampleRate, FrameLength) Test whether the supplied frame contains speech.
HasSpeech(short[], SampleRate, FrameLength) Test whether the supplied frame contains speech.
HasSpeech(IntPtr, SampleRate, FrameLength) Test whether the supplied frame contains speech.

HasSpeech(byte[]) method

public bool HasSpeech(byte[] audioFrame);
Summary

Test whether the supplied frame contains speech.

Returns

true if the provided frame contains speech, otherwise false.

Parameters
Name Type Description
audioFrame System.Byte[] Single frame of audio.
Remarks

The supplied frame must be encoded according to SampleRate and FrameLength. To test a frame at other rates or length, either re-set the appropriate properties, or use the standalone overload HasSpeech(byte[], SampleRate, FrameLength).

HasSpeech(short[]) method

public bool HasSpeech(short[] audioFrame);
Summary

Test whether the supplied frame contains speech.

Returns

true if the provided frame contains speech, otherwise false.

Parameters
Name Type Description
audioFrame System.Int16[] Single frame of audio.
Remarks

The supplied frame must be encoded according to SampleRate and FrameLength. To test a frame at other rates or length, either re-set the appropriate properties, or use the standalone overload HasSpeech(short[], SampleRate, FrameLength).

HasSpeech(IntPtr) method

public bool HasSpeech(IntPtr audioFrame);
Summary

Test whether the supplied frame contains speech.

Returns

true if the provided frame contains speech, otherwise false.

Parameters
Name Type Description
audioFrame System.IntPtr Single frame of audio.
Remarks

The supplied frame must be encoded according to SampleRate and FrameLength. To test a frame at other rates or length, either re-set the appropriate properties, or use the standalone overload HasSpeech(IntPtr, SampleRate, FrameLength).

HasSpeech(byte[], SampleRate, FrameLength) method

public bool HasSpeech(byte[] audioFrame, SampleRate sampleRate, FrameLength frameLength);
Summary

Test whether the supplied frame contains speech.

Returns

true if the provided frame contains speech, otherwise false.

Parameters
Name Type Description
audioFrame System.Byte[] Single frame of audio.
sampleRate SampleRate The sample rate used to encode audioFrame.
frameLength FrameLength The length of the frame in audioFrame.
Remarks

This overload ignores the SampleRate and FrameLength properties. To avoid passing the rate and length on each call, use the HasSpeech(byte[]) overload instead.

HasSpeech(short[], SampleRate, FrameLength) method

public bool HasSpeech(short[] audioFrame, SampleRate sampleRate, FrameLength frameLength);
Summary

Test whether the supplied frame contains speech.

Returns

true if the provided frame contains speech, otherwise false.

Parameters
Name Type Description
audioFrame System.Int16[] Single frame of audio.
sampleRate SampleRate The sample rate used to encode audioFrame.
frameLength FrameLength The length of the frame in audioFrame.
Remarks

This overload ignores the SampleRate and FrameLength properties. To avoid passing the rate and length on each call, use the HasSpeech(short[]) overload instead.

HasSpeech(IntPtr, SampleRate, FrameLength) method

public bool HasSpeech(IntPtr audioFrame, SampleRate sampleRate, FrameLength frameLength);
Summary

Test whether the supplied frame contains speech.

Returns

true if the provided frame contains speech, otherwise false.

Parameters
Name Type Description
audioFrame System.IntPtr Single frame of audio.
sampleRate SampleRate The sample rate used to encode audioFrame.
frameLength FrameLength The length of the frame in audioFrame.
Remarks

This overload ignores the SampleRate and FrameLength properties. To avoid passing the rate and length on each call, use the HasSpeech(IntPtr) overload instead.