class

FVoiceProcessor

FVoiceProcessor — SpeexDSP's echo canceller and speech preprocessor around one voice capture stream, 20 ms frame in, 20 ms frame out.

Module
VoiceChat
Header
#include "VoiceChat/FVoiceProcessor.h"
Namespace
Mowo

The far end the canceller subtracts is fed in by the caller, one frame per frame of voice it played; this processor keeps a short queue of them and takes one per captured frame, so small drift between the playback and capture clocks is absorbed rather than warned about. With nothing played there is nothing to cancel, and the canceller is skipped rather than run against silence.

Properties

TypeNameDescription
static constexpr uint32_tkMaxFarEndFramesDefault 16.

Constructors

SignatureNameDescription
FVoiceProcessor()FVoiceProcessor
~FVoiceProcessor()~FVoiceProcessor
FVoiceProcessor(const FVoiceProcessor&) = deleteFVoiceProcessor

Public functions

ReturnsNameDescription
FVoiceProcessor&operator=
boolConfigureRebuilds the states for a format; false when the format is unusable.
voidShutdown
voidResetForgets what the canceller and the noise estimate have learned — after a device change the room and the microphone are different.
boolIsActive
const FVoiceProcessorSettings&GetSettings
uint32_tGetFrameSamples
uint32_tGetSampleRate
voidPushFarEndOne frame of what the speakers played.
uint32_tGetQueuedFarEnd
boolProcessIn place, on one captured frame.
int32_tGetAutoGainDbWhat the automatic gain is currently adding, in dB, and the speech probability of the last frame, 0-100.
int32_tGetSpeechProbability
uint64_tGetFramesProcessed
uint64_tGetFramesEchoCancelled

Function details

FVoiceProcessor

C++
FVoiceProcessor()

~FVoiceProcessor

C++
~FVoiceProcessor()

FVoiceProcessor

C++
FVoiceProcessor(const FVoiceProcessor&) = delete

operator=

C++
FVoiceProcessor& operator=(const FVoiceProcessor&) = delete

Configure

C++
bool Configure(uint32_t sampleRate, uint32_t frameSamples, const FVoiceProcessorSettings& settings)

Rebuilds the states for a format; false when the format is unusable. Every stage off leaves the processor inactive and Process a no-op.

Shutdown

C++
void Shutdown()

Reset

C++
void Reset()

Forgets what the canceller and the noise estimate have learned — after a device change the room and the microphone are different.

IsActive

C++
bool IsActive() const

GetSettings

C++
const FVoiceProcessorSettings& GetSettings() const

GetFrameSamples

C++
uint32_t GetFrameSamples() const

GetSampleRate

C++
uint32_t GetSampleRate() const

PushFarEnd

C++
void PushFarEnd(const int16_t* samples, uint32_t count)

One frame of what the speakers played. A frame of the wrong size is ignored.

GetQueuedFarEnd

C++
uint32_t GetQueuedFarEnd() const

Process

C++
bool Process(int16_t* frame, uint32_t count)

In place, on one captured frame. False when the frame is the wrong size and was left alone.

GetAutoGainDb

C++
int32_t GetAutoGainDb() const

What the automatic gain is currently adding, in dB, and the speech probability of the last frame, 0-100.

GetSpeechProbability

C++
int32_t GetSpeechProbability() const

GetFramesProcessed

C++
uint64_t GetFramesProcessed() const

GetFramesEchoCancelled

C++
uint64_t GetFramesEchoCancelled() const
Generated from VoiceChat/FVoiceProcessor.h via voicechat.json · Oct 26, 2026Version 1.0.0