23#if __has_include(<speex/speexdsp_config_types.h>)
24#include <speex/speexdsp_config_types.h>
26#include <speex/speex_config_types.h>
30#include <speex/speex_echo.h>
31#include <speex/speex_preprocess.h>
50 (
int) format_.nb_channels,
51 (
int) format_.nb_channels),
55 JAMI_DBG(
"[speex-dsp] SpeexAudioProcessor, frame size = %d (=%d ms), channels = %d",
102 JAMI_INFO(
"[speex-dsp] Done initializing");
108 JAMI_DBG(
"[speex-dsp] enableEchoCancel %d", enabled);
136 JAMI_DBG(
"[speex-dsp] enableNoiseSuppression %d", enabled);
155 JAMI_DBG(
"[speex-dsp] enableAutomaticGainControl %d", enabled);
170 JAMI_DBG(
"[speex-dsp] enableVoiceActivityDetection %d", enabled);
172 shouldDetectVoice = enabled;
182std::shared_ptr<AudioFrame>
192 if (!playback || !
record) {
203 (
int16_t*) playback->pointer()->data[0],
std::shared_ptr< AudioFrame > dequeue()
Notifies owner of a new frame.
unsigned int frameDurationMs_
AudioFrameResizer playbackQueue_
bool tidyQueues()
Helper method for audio processors, should be called at start of getProcessed() Pops frames from audi...
bool getStabilizedVoiceActivity(bool voiceStatus)
Stablilizes voice activity.
AudioFrameResizer recordQueue_
int resample(const AVFrame *input, AVFrame *output)
Resample a frame.
void enableVoiceActivityDetection(bool enabled) override
Set the status of voice activity detection.
void enableEchoCancel(bool enabled) override
Set the status of echo cancellation.
SpeexAudioProcessor(AudioFormat format, unsigned frameSize)
std::shared_ptr< AudioFrame > getProcessed() override
Process and return a single AudioFrame.
void enableNoiseSuppression(bool enabled) override
Set the status of noise suppression includes de-reverb, de-noise, high pass filter,...
void enableAutomaticGainControl(bool enabled) override
Set the status of automatic gain control.
void emitSignal(Args... args)
AudioFormat audioFormatToSampleFormat(AudioFormat format)