|
sipxmedialib
Version 3.3
|
#include <MpVadSimple.h>


Public Member Functions | |
Creators | |
| MpVadSimple () | |
| Constructor. More... | |
| OsStatus | init (int samplesPerSec) |
| Initialize VAD with given sample rate. More... | |
| ~MpVadSimple () | |
| Destructor. More... | |
Manipulators | |
| MpSpeechType | processFrame (uint32_t packetTimeStamp, const MpAudioSample *pBuf, unsigned inSamplesNum, const MpSpeechParams &speechParams, UtlBoolean calcEnergyOnly=FALSE) |
| Detect speech presence. More... | |
| OsStatus | setParam (const char *paramName, void *value) |
| Set algorithm parameter. More... | |
| void | setMinimumEnergy (int minEnergy) |
| Set threshold energy. More... | |
| void | reset () |
| Prepare to process other unrelated audio stream. More... | |
Accessors | |
| int | getEnergy () const |
| Return weighted energy of current frame. More... | |
Public Member Functions inherited from MpVadBase | |
| virtual | ~MpVadBase () |
| Destructor. More... | |
| void | setName (const UtlString &name) |
| Set name. More... | |
Static Public Attributes | |
| static const char * | name = "Simple" |
| Name of this VAD algorithm for use in MpVadBase::createVad(). More... | |
Private Attributes | |
| int | mLastFrameSize |
| int | mLastEnergy |
| int | mSamplesPerSecond |
| int | mMinEnergy |
Additional Inherited Members | |
Static Public Member Functions inherited from MpVadBase | |
| static MpVadBase * | createVad (const UtlString &name="") |
| Factory method for VAD algorithms creation. More... | |
| static void | setDefaultAlgorithm (const UtlString &name) |
| Set algorithm to be used by default. More... | |
Protected Attributes inherited from MpVadBase | |
| UtlString | mName |
| Name useful for debugging to distiguish multiple instances. More... | |
Static Protected Attributes inherited from MpVadBase | |
| static UtlString | smDefaultAlgorithm |
| Name of algorithm to be used by default. More... | |
Simple Energy-basede VAD.
This VAD is simplest possible - it just compare mean frame energy with given threshold.
| MpVadSimple | ( | ) |
Constructor.
| ~MpVadSimple | ( | ) |
Destructor.
|
virtual |
Initialize VAD with given sample rate.
Should be called before any other class methods.
Implements MpVadBase.
|
virtual |
Detect speech presence.
| [in] | packetTimeStamp | - RTP timestamp of packet. |
| [in] | pBuf | - buffer with input data. |
| [in] | inSamplesNum | - number of samples of actual data, passed to this function. |
| [in] | speechParams | - various parameters of speech. |
| [in] | calcEnergyOnly | - if TRUE, VAD should calculate energy only. |
Implements MpVadBase.
|
virtual |
Set algorithm parameter.
| [in] | paramName | - name of parameter |
| [in] | value | - value, can be any type, before call cast it to void* |
Implements MpVadBase.
| void setMinimumEnergy | ( | int | minEnergy | ) |
Set threshold energy.
|
virtual |
|
virtual |
Return weighted energy of current frame.
Implements MpVadBase.
|
static |
Name of this VAD algorithm for use in MpVadBase::createVad().
|
private |
|
private |
|
private |
|
private |
1.8.11