PocketSphinx  5.0.0
A small speech recognizer
Macros | Typedefs | Enumerations
vad.h File Reference

Simple voice activity detection. More...

#include <pocketsphinx/prim_type.h>
#include <pocketsphinx/export.h>

Go to the source code of this file.


#define ps_vad_frame_length(vad)   ((double)ps_vad_frame_size(vad) / ps_vad_sample_rate(vad))


typedef struct ps_vad_s ps_vad_t
typedef enum ps_vad_mode_e ps_vad_mode_t
typedef enum ps_vad_class_e ps_vad_class_t


enum  ps_vad_mode_e { PS_VAD_LOOSE = 0, PS_VAD_MEDIUM_LOOSE = 1, PS_VAD_MEDIUM_STRICT = 2, PS_VAD_STRICT = 3 }
 Voice activity detection "aggressiveness" levels. More...
enum  ps_vad_class_e { PS_VAD_ERROR = -1, PS_VAD_NOT_SPEECH = 0, PS_VAD_SPEECH = 1 }
 Classification of input frames returned by ps_vad_classify(). More...

Detailed Description

Simple voice activity detection.

Because doxygen is Bad Software, the actual documentation can only exist in ps_vad_t. Sorry about that.

Macro Definition Documentation



Default sampling rate for voice activity detector



Default frame length for voice activity detector

◆ ps_vad_frame_length

#define ps_vad_frame_length (   vad)    ((double)ps_vad_frame_size(vad) / ps_vad_sample_rate(vad))

Get the actual length of a frame in seconds.

This may differ from the value requested in ps_vad_set_input_params().

Enumeration Type Documentation

◆ ps_vad_mode_e

Voice activity detection "aggressiveness" levels.


◆ ps_vad_class_e

Classification of input frames returned by ps_vad_classify().