All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Functions
VAD API functions

Functions

VAD_API VAD_Handle VAD_setup ()
 
VAD_API int_least16_t VAD_getInitFrames (VAD_Handle handle)
 
VAD_API void VAD_setInitFrames (VAD_Handle handle, int_least16_t initFrames)
 
VAD_API int_least16_t VAD_getDelayFrames (VAD_Handle handle)
 
VAD_API void VAD_setDelayFrames (VAD_Handle handle, int_least16_t delayFrames)
 
VAD_API int_least16_t VAD_getAlpha (VAD_Handle handle)
 
VAD_API void VAD_setAlpha (VAD_Handle handle, int_least16_t alpha)
 
VAD_API int_least16_t VAD_getFastCoef (VAD_Handle handle)
 
VAD_API void VAD_setFastCoef (VAD_Handle handle, int_least16_t fastCoef)
 
VAD_API int_least16_t VAD_getSlowCoef (VAD_Handle handle)
 
VAD_API void VAD_setSlowCoef (VAD_Handle handle, int_least16_t slowCoef)
 
VAD_API int_least16_t VAD_getSignalFloor (VAD_Handle handle)
 
VAD_API void VAD_setSignalFloor (VAD_Handle handle, int_least32_t signalFloor)
 
VAD_API int_least16_t VAD_getNoiseFloor (VAD_Handle handle)
 
VAD_API void VAD_setNoiseFloor (VAD_Handle handle, int_least32_t noiseFloor)
 
VAD_API int_least16_t VAD_getSigSNRThresh (VAD_Handle handle)
 
VAD_API void VAD_setSigSNRThresh (VAD_Handle handle, int_least16_t sigSNRThresh)
 
VAD_API int_least16_t VAD_getSigSNRLimit (VAD_Handle handle)
 
VAD_API void VAD_setSigSNRLimit (VAD_Handle handle, int_least16_t sigSNRLimit)
 
VAD_API int_least16_t VAD_getNoiseRate (VAD_Handle handle)
 
VAD_API void VAD_setNoiseRate (VAD_Handle handle, int_least16_t noiseRate)
 
VAD_API VAD_MessageEnum VAD_run (VAD_Handle handle, int_least16_t rmsegy)
 
VAD_API const char * VAD_getVersion (void)
 

Detailed Description

Functions of the VAD API

Function Documentation

VAD_API VAD_Handle VAD_setup ( )

Initialize the VAD object prior to starting detection. Prepares the VAD object to start detecting audio events. It must be called before any other VAD functions including get/set functions. Returns handle to VAD object.

Returns
VAD handle
VAD_API int_least16_t VAD_getInitFrames ( VAD_Handle  handle)

Gets the initialization stabilization duration in frames. Get initialization stabilization duration in frames.

Parameters
[in]handleVAD handle
Returns
Number of initialization frames
VAD_API void VAD_setInitFrames ( VAD_Handle  handle,
int_least16_t  initFrames 
)

Sets the the initialization stabilization duration in frames. Set initialization stabilization duration in frames.
0 < initFrames <= INT16_MAX

Parameters
[in]handleVAD handle
[in]initFramesInitialization frames
VAD_API int_least16_t VAD_getDelayFrames ( VAD_Handle  handle)

Gets number of sequential frames above noise to declare activity. Get sequential frames above noise to declare activity.

Parameters
[in]handleVAD handle
Returns
Number of delay frames
VAD_API void VAD_setDelayFrames ( VAD_Handle  handle,
int_least16_t  delayFrames 
)

Sets number of sequential frames above noise to declare activity. Set sequential frames above noise to declare activity.
0 < delayFrames <= INT16_MAX

Parameters
[in]handleVAD handle
[in]delayFramesDelay frames
VAD_API int_least16_t VAD_getAlpha ( VAD_Handle  handle)

Gets smoothed signal energy filter coefficient alpha. Get smoothed signal energy filter coefficient alpha

Parameters
[in]handleVAD handle
Returns
smoothing filter coefficient alpha (Q15)
VAD_API void VAD_setAlpha ( VAD_Handle  handle,
int_least16_t  alpha 
)

Sets smoothed signal energy filter coefficient alpha. Set smoothed signal energy filter coefficient alpha (Q15).
0 < alpha <= INT16_MAX

Parameters
[in]handleVAD handle
[in]alphaSmoothing filter coefficient alpha
VAD_API int_least16_t VAD_getFastCoef ( VAD_Handle  handle)

Gets fast activity estimator filter coefficient. Get fast activity estimator filter coefficient (Q15).

Parameters
[in]handleVAD handle
Returns
fast activity estimator filter coefficient (Q15)
VAD_API void VAD_setFastCoef ( VAD_Handle  handle,
int_least16_t  fastCoef 
)

Sets fast activity estimator filter coefficient. Set fast activity estimator filter coefficient (Q15).
0 < fastCoef <= INT16_MAX

Parameters
[in]handleVAD handle
[in]fastCoefFast activity estimator filter coefficient;
VAD_API int_least16_t VAD_getSlowCoef ( VAD_Handle  handle)

Gets slow activity estimator filter coefficient. Gets slow activity estimator filter coefficient (Q15).

Parameters
[in]handleVAD handle
Returns
slow activity estimator filter coefficient (Q15)
VAD_API void VAD_setSlowCoef ( VAD_Handle  handle,
int_least16_t  slowCoef 
)

Sets slow activity estimator filter coefficient. Set slow activity estimator filter coefficient (Q15).
0 < slowCoef <= INT16_MAX

Parameters
[in]handleVAD handle
[in]slowCoefSlow activity estimator filter coefficient;
VAD_API int_least16_t VAD_getSignalFloor ( VAD_Handle  handle)

Gets signal RMS energy floor.

Parameters
[in]handleVAD handle
Returns
signal rms energy floor (Q30)
VAD_API void VAD_setSignalFloor ( VAD_Handle  handle,
int_least32_t  signalFloor 
)

Sets signal RMS energy floor. Set signal RMS energy floor in (Q30).
0 < signalFloor <= INT32_MAX

Parameters
[in]handleVAD handle
[in]signalFloorSignal rms energy floor in (Q30);
VAD_API int_least16_t VAD_getNoiseFloor ( VAD_Handle  handle)

Gets noise RMS energy floor. Gets noise RMS energy floor in (Q30).

Parameters
[in]handleVAD handle
Returns
noise RMS energy floor (Q30)
VAD_API void VAD_setNoiseFloor ( VAD_Handle  handle,
int_least32_t  noiseFloor 
)

Sets noise RMS energy floor. Set noise RMS energy floor in (Q30).
0 < noiseFloor <= INT32_MAX

Parameters
[in]handleVAD handle
[in]noiseFloorNoise RMS energy floor in (Q30);
VAD_API int_least16_t VAD_getSigSNRThresh ( VAD_Handle  handle)

Gets signal SNR threshold. Get signal SNR threshold (Q10)

Parameters
[in]handleVAD handle
Returns
signal SNR threshold (Q10)
VAD_API void VAD_setSigSNRThresh ( VAD_Handle  handle,
int_least16_t  sigSNRThresh 
)

Sets signal SNR threshold. Sets signal SNR threshold (Q10).
0 < sigSNRThresh <= INT16_MAX

Parameters
[in]handleVAD handle
[in]sigSNRThreshSignal SNR threshold (Q10);
VAD_API int_least16_t VAD_getSigSNRLimit ( VAD_Handle  handle)

Gets signal SNR Limit. Get signal SNR Limit (Q10)

Parameters
[in]handleVAD handle
Returns
signal SNR limit (Q10)
VAD_API void VAD_setSigSNRLimit ( VAD_Handle  handle,
int_least16_t  sigSNRLimit 
)

Sets signal SNR limit. Set signal SNR limit (Q10).
0 < sigSNRLimit <= INT16_MAX

Parameters
[in]handleVAD handle
[in]sigSNRLimitSNR limit (Q10)
VAD_API int_least16_t VAD_getNoiseRate ( VAD_Handle  handle)

Get noise floor maximum upward adaptation rate multiplier (Q14). Gets noise floor maximum upward adaptation rate multiplier (Q14).

Parameters
[in]handleVAD handle
Returns
upward adaptation rate (Q14)
VAD_API void VAD_setNoiseRate ( VAD_Handle  handle,
int_least16_t  noiseRate 
)

Set noise floor maximum upward adaptation rate multiplier. Sets noise floor maximum upward adaptation rate multiplier (Q14).
0 < noiseRate <= INT16_MAX

Parameters
[in]handleVAD handle
[in]noiseRateNoise maximum upward rate (Q14);
VAD_API VAD_MessageEnum VAD_run ( VAD_Handle  handle,
int_least16_t  rmsegy 
)

Performs voice activity detection. Runs the voice activity detector for one frame returning result. The declaration that speech is found will be delayed by delayFrames seconds from when speech actually started. The parameter rmsegy is the average rms energy in the frame of data in Q15, normalized to a peak rms energy of 1.0 (32767 in Q15). For each frame, VAD returns a message indicating the status of the VAD result. During non-speech it returns VAD_Background. When it detects some signal above the background noise it returns VAD_Hang. If this continues long enough to declare a speech signal found it will return VAD_Detect for one frame. Thereafter, as long as the speech signal continues, it will return VAD_Ongoing. At the end of the utterance it will return to VAD_Background.

Parameters
[in]handleVAD handle
[in]rmsegyNormalized frame RMS energy (Q15)
Returns
VAD message indicating status as of the input frame
VAD_API const char* VAD_getVersion ( void  )

Get VAD library version number.

Returns
Pointer to string that contains VAD library version.
Copyright 2017, Texas Instruments Incorporated