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