#define DEFAULT_ROUTING_MODE "speakerphone"
#define DEFAULT_COMFORT_NOISE true
#define DEFAULT_DRIFT_COMPENSATION false
+#define DEFAULT_VAD true
#define DEFAULT_EXTENDED_FILTER false
#define DEFAULT_INTELLIGIBILITY_ENHANCER false
#define DEFAULT_EXPERIMENTAL_AGC false
"routing_mode",
"comfort_noise",
"drift_compensation",
+ "voice_detection",
"extended_filter",
"intelligibility_enhancer",
"experimental_agc",
webrtc::AudioProcessing *apm = NULL;
webrtc::ProcessingConfig pconfig;
webrtc::Config config;
- bool hpf, ns, agc, dgc, mobile, cn, ext_filter, intelligibility, experimental_agc;
+ bool hpf, ns, agc, dgc, mobile, cn, vad, ext_filter, intelligibility, experimental_agc;
int rm = -1;
pa_modargs *ma;
bool trace = false;
}
}
+ vad = DEFAULT_VAD;
+ if (pa_modargs_get_value_boolean(ma, "voice_detection", &vad) < 0) {
+ pa_log("Failed to parse voice_detection value");
+ goto fail;
+ }
+
ext_filter = DEFAULT_EXTENDED_FILTER;
if (pa_modargs_get_value_boolean(ma, "extended_filter", &ext_filter) < 0) {
pa_log("Failed to parse extended_filter value");
apm->gain_control()->Enable(true);
}
- apm->voice_detection()->Enable(true);
+ if (vad)
+ apm->voice_detection()->Enable(true);
ec->params.priv.webrtc.apm = apm;
ec->params.priv.webrtc.sample_spec = *out_ss;