Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-os-example-mbed5-blinky by
This is the Speex preprocessor. More...
Typedefs | |
| typedef struct SpeexPreprocessState_ | SpeexPreprocessState |
| State of the preprocessor (one per channel). | |
Functions | |
| SpeexPreprocessState * | speex_preprocess_state_init (int frame_size, int sampling_rate) |
| Creates a new preprocessing state. | |
| void | speex_preprocess_state_destroy (SpeexPreprocessState *st) |
| Destroys a preprocessor state. | |
| int | speex_preprocess_run (SpeexPreprocessState *st, spx_int16_t *x) |
| Preprocess a frame. | |
| int | speex_preprocess (SpeexPreprocessState *st, spx_int16_t *x, spx_int32_t *echo) |
| Preprocess a frame (deprecated, use speex_preprocess_run() instead) | |
| void | speex_preprocess_estimate_update (SpeexPreprocessState *st, spx_int16_t *x) |
| Update preprocessor state, but do not compute the output. | |
| int | speex_preprocess_ctl (SpeexPreprocessState *st, int request, void *ptr) |
| Used like the ioctl function to control the preprocessor parameters. | |
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).
Typedef Documentation
| typedef struct SpeexPreprocessState_ SpeexPreprocessState |
State of the preprocessor (one per channel).
Should never be accessed directly.
Definition at line 56 of file speex_preprocess.h.
Function Documentation
| int speex_preprocess | ( | SpeexPreprocessState * | st, |
| spx_int16_t * | x, | ||
| spx_int32_t * | echo | ||
| ) |
Preprocess a frame (deprecated, use speex_preprocess_run() instead)
| int speex_preprocess_ctl | ( | SpeexPreprocessState * | st, |
| int | request, | ||
| void * | ptr | ||
| ) |
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
| void speex_preprocess_estimate_update | ( | SpeexPreprocessState * | st, |
| spx_int16_t * | x | ||
| ) |
Update preprocessor state, but do not compute the output.
- Parameters:
-
st Preprocessor state x Audio sample vector (in only). Must be same size as specified in speex_preprocess_state_init().
| int speex_preprocess_run | ( | SpeexPreprocessState * | st, |
| spx_int16_t * | x | ||
| ) |
Preprocess a frame.
- Parameters:
-
st Preprocessor state x Audio sample vector (in and out). Must be same size as specified in speex_preprocess_state_init().
- Returns:
- Bool value for voice activity (1 for speech, 0 for noise/silence), ONLY if VAD turned on.
| void speex_preprocess_state_destroy | ( | SpeexPreprocessState * | st ) |
Destroys a preprocessor state.
- Parameters:
-
st Preprocessor state to destroy
| SpeexPreprocessState* speex_preprocess_state_init | ( | int | frame_size, |
| int | sampling_rate | ||
| ) |
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
Generated on Tue Jul 12 2022 16:28:54 by
1.7.2
