sp500_log_mel_params Struct Reference

sp500_log_mel_params Struct Reference#

Mobilint REGULUS: sp500_log_mel_params Struct Reference
Mobilint REGULUS v4.1
SP500 DSP API
sp500_log_mel_params Struct Reference

Front-end parameters. More...

#include <sp500/log_mel.h>

Data Fields

int32_t n_samples
int32_t sample_rate
int32_t n_fft
int32_t hop_length
int32_t n_mels
float min_frequency
float max_frequency
uint8_t normalize
uint8_t reserved0 [3]
const float * mel_filters
uint32_t mel_filters_count
uint32_t reserved [5]

Detailed Description

Front-end parameters.

Fill this with sp500_log_mel_params_init(); the defaults are the Whisper 80-mel front end. Qwen3-ASR and Whisper large-v3 use n_mels = 128. Only n_samples has no useful default and must be set.

Definition at line 66 of file log_mel.h.

Field Documentation

◆ n_samples

int32_t sp500_log_mel_params::n_samples

number of input samples (required)

Definition at line 68 of file log_mel.h.

◆ sample_rate

int32_t sp500_log_mel_params::sample_rate

sampling rate in Hz; default 16000

Definition at line 69 of file log_mel.h.

◆ n_fft

int32_t sp500_log_mel_params::n_fft

FFT size; default 400. Must be 16..2048 and factor into 2, 3 and 5 only

Definition at line 70 of file log_mel.h.

◆ hop_length

int32_t sp500_log_mel_params::hop_length

hop in samples; default 160. Must be 1..65535

Definition at line 72 of file log_mel.h.

◆ n_mels

int32_t sp500_log_mel_params::n_mels

mel bins; default 80. Must be 1..256

Definition at line 73 of file log_mel.h.

◆ min_frequency

float sp500_log_mel_params::min_frequency

lower edge of the mel bank in Hz; default 0

Definition at line 74 of file log_mel.h.

◆ max_frequency

float sp500_log_mel_params::max_frequency

upper edge of the mel bank in Hz; default 8000

Definition at line 75 of file log_mel.h.

◆ normalize

uint8_t sp500_log_mel_params::normalize

1: apply the Whisper clamp and rescale. Default 1

Definition at line 76 of file log_mel.h.

◆ reserved0

uint8_t sp500_log_mel_params::reserved0[3]

must be zero

Definition at line 78 of file log_mel.h.

◆ mel_filters

const float* sp500_log_mel_params::mel_filters

Optional dense mel bank, [n_fft/2 + 1][n_mels] row-major - the same layout as Hugging Face mel_filters. NULL generates the slaney bank from the parameters above. Read only during the call; it does not need to outlive it.

Definition at line 84 of file log_mel.h.

◆ mel_filters_count

uint32_t sp500_log_mel_params::mel_filters_count

Number of floats in mel_filters. Must be sp500_log_mel_num_freq(n_fft) * n_mels when mel_filters is set, and 0 when it is NULL.

Definition at line 88 of file log_mel.h.

◆ reserved

uint32_t sp500_log_mel_params::reserved[5]

must be zero

Definition at line 90 of file log_mel.h.


The documentation for this struct was generated from the following file: