Detailed Description
This is the Speex preprocessor. The preprocess can do noise suppression, residual echo suppression (after using the echo canceller), automatic gain control (AGC) and voice activity detection (VAD).
Define Documentation
Get preprocessor Automatic Gain Control state
Get maximal gain decrease in dB/second (int32)
Get current gain (int32 percent)
Get maximal gain increase in dB/second (int32)
Get preprocessor Automatic Gain Control level (float)
Get maximal gain in dB (int32)
Get preprocessor Automatic Gain Control level (int32)
Get preprocessor denoiser state
Get preprocessor dereverb state
Get preprocessor dereverb decay
Get preprocessor dereverb level
Get the corresponding echo canceller state
Get maximum attenuation of the residual echo in dB (negative number)
Get maximum attenuation of the residual echo in dB when near end is active (negative number)
Get noise estimate (int32[] of squared values)
Get spectrum size for noise estimate (int32)
Get maximum attenuation of the noise in dB (negative number)
Get speech probability in last frame (int32).
Get probability required for the VAD to stay in the voice state (integer percent)
Get probability required for the VAD to go from silence to voice
Get power spectrum (int32[] of squared values)
Get spectrum size for power spectrum (int32)
Get preprocessor Voice Activity Detection state
Set preprocessor Automatic Gain Control state
Set maximal gain decrease in dB/second (int32)
Set maximal gain increase in dB/second (int32)
Set preprocessor Automatic Gain Control level (float)
Set maximal gain in dB (int32)
Set preprocessor Automatic Gain Control level (int32)
Set preprocessor denoiser state
Set preprocessor dereverb state
Set preprocessor dereverb decay
Set preprocessor dereverb level
Set the corresponding echo canceller state so that residual echo suppression can be performed (NULL for no residual echo suppression)
Set maximum attenuation of the residual echo in dB (negative number)
Set maximum attenuation of the residual echo in dB when near end is active (negative number)
Set maximum attenuation of the noise in dB (negative number)
Set probability required for the VAD to stay in the voice state (integer percent)
Set probability required for the VAD to go from silence to voice
Set preprocessor Voice Activity Detection state
Typedef Documentation
State of the preprocessor (one per channel). Should never be accessed directly.
Function Documentation
Used like the ioctl function to control the preprocessor parameters
- Parameters:
-
st | Preprocessor state |
request | ioctl-type request (one of the SPEEX_PREPROCESS_* macros) |
ptr | Data exchanged to-from function |
- Returns:
- 0 if no error, -1 if request in unknown
Update preprocessor state, but do not compute the output
- Parameters:
-
Preprocess a frame
- Parameters:
-
- Returns:
- Bool value for voice activity (1 for speech, 0 for noise/silence), ONLY if VAD turned on.
Destroys a preprocessor state
- Parameters:
-
st | Preprocessor state to destroy |
Creates a new preprocessing state. You MUST create one state per channel processed.
- Parameters:
-
frame_size | Number of samples to process at one time (should correspond to 10-20 ms). Must be the same value as that used for the echo canceller for residual echo cancellation to work. |
sampling_rate | Sampling rate used for the input. |
- Returns:
- Newly created preprocessor state