Sound Open Firmware
Loading...
Searching...
No Matches
sof_mfcc_config Struct Reference

#include <mfcc.h>

Data Fields

uint32_t size
 Size of this struct in bytes.
int16_t mel_offset
 Q8.7 default 0, use 4.0 for Whisper.
int16_t mel_scale
 Q4.12 default 1.0, use 0.25 for Whisper.
int16_t mmax_init
 Q8.7 default 0, with dynamic_mmax false, can sim.
int16_t mmax_coef
 Q1.15 decay coefficient for dynamic mmax, a small value for slow.
uint16_t dtx_trailing_silence_hops
 DTX: number of silence hops to send after speech, 0 = send first only.
uint16_t dtx_silence_hops_interval
 DTX: send silence frame every Nth hop during VAD=0, 0 = disable.
uint32_t reserved [5]
int32_t sample_frequency
 Hz.
int32_t pmin
 Q1.31 linear power, limit minimum Mel energy, e.g.
enum sof_mfcc_mel_log_type mel_log
 Use MEL_LOG_IS_LOG, LOG10 or DB.
enum sof_mfcc_mel_norm_type norm
 Use MEL_NORM_SLANEY or MEL_NORM_NONE.
enum sof_mfcc_fft_pad_type pad
 Use PAD_END, PAD_CENTER, PAD_START.
enum sof_mfcc_fft_window_type window
 Use RECTANGULAR_WINDOW, BLACKMAN_WINDOW, etc.
enum sof_mfcc_dct_type dct
 Must be DCT_II.
int16_t blackman_coef
 Q1.15, typically set to 0.42 for BLACKMAN_WINDOW.
int16_t cepstral_lifter
 Q7.9, e.g.
int16_t channel
 -1 expect mono, 0 left, 1 right, ...
int16_t dither
 Reserved, no support.
int16_t frame_length
 samples, e.g.
int16_t frame_shift
 samples, e.g.
int16_t high_freq
 Hz, set 0 for Nyquist frequency.
int16_t low_freq
 Hz, eg.
int16_t num_ceps
 Number of cepstral coefficients, e.g.
int16_t num_mel_bins
 Number of internal Mel bands, e.g.
int16_t preemphasis_coefficient
 Q1.15, e.g.
int16_t top_db
 Q8.7 dB, limit min.
int16_t vtln_high
 Reserved, no support.
int16_t vtln_low
 Reserved, no support.
int16_t vtln_warp
 Reserved, no support.
int16_t reserved16 [3]
 Reserved for future 16-bit fields, set to 0.
bool htk_compat
 Must be false.
bool raw_energy
 Reserved, no support.
bool remove_dc_offset
 Reserved, no support.
bool round_to_power_of_two
 Must be true (1).
bool snip_edges
 Must be true (1).
bool subtract_mean
 Must be false (0).
bool use_energy
 Must be false (0).
bool dynamic_mmax
 Track max Mel value for clamp with top_db value.
bool enable_vad
 Run VAD algorithm.
bool enable_dtx
 Discontinuous transmission: suppress silence after trailing frames.
bool update_controls
 Update controls with VAD decision.
bool compress_output
 Use compress PCM output: variable size, no zero padding.
bool reserved_bool [4]

Field Documentation

◆ blackman_coef

int16_t sof_mfcc_config::blackman_coef

Q1.15, typically set to 0.42 for BLACKMAN_WINDOW.

◆ cepstral_lifter

int16_t sof_mfcc_config::cepstral_lifter

Q7.9, e.g.

22.0

◆ channel

int16_t sof_mfcc_config::channel

-1 expect mono, 0 left, 1 right, ...

◆ compress_output

bool sof_mfcc_config::compress_output

Use compress PCM output: variable size, no zero padding.

◆ dct

enum sof_mfcc_dct_type sof_mfcc_config::dct

Must be DCT_II.

◆ dither

int16_t sof_mfcc_config::dither

Reserved, no support.

◆ dtx_silence_hops_interval

uint16_t sof_mfcc_config::dtx_silence_hops_interval

DTX: send silence frame every Nth hop during VAD=0, 0 = disable.

◆ dtx_trailing_silence_hops

uint16_t sof_mfcc_config::dtx_trailing_silence_hops

DTX: number of silence hops to send after speech, 0 = send first only.

◆ dynamic_mmax

bool sof_mfcc_config::dynamic_mmax

Track max Mel value for clamp with top_db value.

◆ enable_dtx

bool sof_mfcc_config::enable_dtx

Discontinuous transmission: suppress silence after trailing frames.

◆ enable_vad

bool sof_mfcc_config::enable_vad

Run VAD algorithm.

◆ frame_length

int16_t sof_mfcc_config::frame_length

samples, e.g.

400 for 25 ms @ 16 kHz

◆ frame_shift

int16_t sof_mfcc_config::frame_shift

samples, e.g.

160 for 10 ms @ 16 kHz

◆ high_freq

int16_t sof_mfcc_config::high_freq

Hz, set 0 for Nyquist frequency.

◆ htk_compat

bool sof_mfcc_config::htk_compat

Must be false.

◆ low_freq

int16_t sof_mfcc_config::low_freq

Hz, eg.

20

◆ mel_log

enum sof_mfcc_mel_log_type sof_mfcc_config::mel_log

Use MEL_LOG_IS_LOG, LOG10 or DB.

◆ mel_offset

int16_t sof_mfcc_config::mel_offset

Q8.7 default 0, use 4.0 for Whisper.

◆ mel_scale

int16_t sof_mfcc_config::mel_scale

Q4.12 default 1.0, use 0.25 for Whisper.

◆ mmax_coef

int16_t sof_mfcc_config::mmax_coef

Q1.15 decay coefficient for dynamic mmax, a small value for slow.

◆ mmax_init

int16_t sof_mfcc_config::mmax_init

Q8.7 default 0, with dynamic_mmax false, can sim.

Whisper mmax

◆ norm

enum sof_mfcc_mel_norm_type sof_mfcc_config::norm

Use MEL_NORM_SLANEY or MEL_NORM_NONE.

◆ num_ceps

int16_t sof_mfcc_config::num_ceps

Number of cepstral coefficients, e.g.

13

◆ num_mel_bins

int16_t sof_mfcc_config::num_mel_bins

Number of internal Mel bands, e.g.

23

◆ pad

enum sof_mfcc_fft_pad_type sof_mfcc_config::pad

Use PAD_END, PAD_CENTER, PAD_START.

◆ pmin

int32_t sof_mfcc_config::pmin

Q1.31 linear power, limit minimum Mel energy, e.g.

1e-9

◆ preemphasis_coefficient

int16_t sof_mfcc_config::preemphasis_coefficient

Q1.15, e.g.

0.97, or 0 for disable

◆ raw_energy

bool sof_mfcc_config::raw_energy

Reserved, no support.

◆ remove_dc_offset

bool sof_mfcc_config::remove_dc_offset

Reserved, no support.

◆ reserved

uint32_t sof_mfcc_config::reserved[5]

◆ reserved16

int16_t sof_mfcc_config::reserved16[3]

Reserved for future 16-bit fields, set to 0.

◆ reserved_bool

bool sof_mfcc_config::reserved_bool[4]

◆ round_to_power_of_two

bool sof_mfcc_config::round_to_power_of_two

Must be true (1).

◆ sample_frequency

int32_t sof_mfcc_config::sample_frequency

Hz.

e.g. 16000

◆ size

uint32_t sof_mfcc_config::size

Size of this struct in bytes.

◆ snip_edges

bool sof_mfcc_config::snip_edges

Must be true (1).

◆ subtract_mean

bool sof_mfcc_config::subtract_mean

Must be false (0).

◆ top_db

int16_t sof_mfcc_config::top_db

Q8.7 dB, limit min.

Mel energies to chunk max - top_dB, e.g. 80

◆ update_controls

bool sof_mfcc_config::update_controls

Update controls with VAD decision.

◆ use_energy

bool sof_mfcc_config::use_energy

Must be false (0).

◆ vtln_high

int16_t sof_mfcc_config::vtln_high

Reserved, no support.

◆ vtln_low

int16_t sof_mfcc_config::vtln_low

Reserved, no support.

◆ vtln_warp

int16_t sof_mfcc_config::vtln_warp

Reserved, no support.

◆ window

enum sof_mfcc_fft_window_type sof_mfcc_config::window

Use RECTANGULAR_WINDOW, BLACKMAN_WINDOW, etc.


The documentation for this struct was generated from the following file:
  • /home/lrg/work/sof-dox-work/src/include/user/mfcc.h