13 #ifndef _MpVadSimple_h_ 14 #define _MpVadSimple_h_ 38 OsStatus
init(
int samplesPerSec);
52 unsigned inSamplesNum,
54 UtlBoolean calcEnergyOnly =
FALSE);
57 OsStatus
setParam(
const char* paramName,
void* value);
93 #endif // _MpVadSimple_h_ int mLastFrameSize
Definition: MpVadSimple.h:86
Definition: MpVadBase.h:40
int mSamplesPerSecond
Definition: MpVadSimple.h:88
~MpVadSimple()
Destructor.
Definition: MpVadSimple.cpp:56
OsStatus setParam(const char *paramName, void *value)
Set algorithm parameter.
Definition: MpVadSimple.cpp:106
OsStatus init(int samplesPerSec)
Initialize VAD with given sample rate.
Definition: MpVadSimple.cpp:45
int mLastEnergy
Definition: MpVadSimple.h:87
int16_t MpAudioSample
Definition: MpTypes.h:44
MpSpeechType
Type of audio data.
Definition: MpTypes.h:65
void setMinimumEnergy(int minEnergy)
Set threshold energy.
Definition: MpVadSimple.cpp:63
Definition: MpVadSimple.h:24
int getEnergy() const
Return weighted energy of current frame.
Definition: MpVadSimple.cpp:68
int mMinEnergy
Definition: MpVadSimple.h:90
MpVadSimple()
Constructor.
Definition: MpVadSimple.cpp:37
MpSpeechType processFrame(uint32_t packetTimeStamp, const MpAudioSample *pBuf, unsigned inSamplesNum, const MpSpeechParams &speechParams, UtlBoolean calcEnergyOnly=FALSE)
Detect speech presence.
Definition: MpVadSimple.cpp:76
static const char * name
Name of this VAD algorithm for use in MpVadBase::createVad().
Definition: MpVadSimple.h:28
#define FALSE
Definition: PlgDefsV1.h:37
void reset()
Prepare to process other unrelated audio stream.
Definition: MpVadSimple.cpp:116