Merge branch 'feat/s3_wn9s' into 'master'
Some checks failed
Push components to Espressif Component Service / upload_components (push) Has been cancelled

feat: esp32,esp32s3,esp32p4 support wakenet9s

See merge request speech-recognition-framework/esp-sr!176
This commit is contained in:
Sun Xiang Yu 2025-06-13 11:42:16 +08:00
commit 49c4c8f28f
45 changed files with 58 additions and 4 deletions

View File

@ -54,7 +54,6 @@ endchoice
menu "Load Multiple Wake Words (WakeNet9s)"
depends on IDF_TARGET_ESP32C5 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32C6 || IDF_TARGET_ESP32S2
config SR_WN_WN9S_HILEXIN
bool "Hi,乐鑫 (wn9s_hilexin)"

View File

@ -68,6 +68,8 @@ typedef esp_mfcc_data_t *(*esp_mfcc_op_create_t)(const esp_mfcc_opts_t *opt);
*/
typedef float *(*esp_mfcc_op_run_step_t)(esp_mfcc_data_t *r, int16_t *samp, int16_t nch);
typedef void (*esp_mfcc_op_run_step_s16_t)(esp_mfcc_data_t *r, int16_t *samp, int16_t *fbank);
/**
* @brief Clean all state of mfcc handle
*
@ -82,5 +84,6 @@ typedef struct {
esp_mfcc_op_destroy_t destroy;
esp_mfcc_op_create_t create;
esp_mfcc_op_run_step_t run_step;
esp_mfcc_op_run_step_s16_t run_step_s16;
esp_mfcc_op_clean_t clean;
} esp_mfcc_iface_t;

View File

@ -2,12 +2,18 @@
#include "esp_mfcc_iface.h"
extern const esp_mfcc_iface_t esp_fbank_f32; // float32-fbank handle
extern const esp_mfcc_iface_t esp_fbank_s16; // int16-fbank handle
/**
* @brief Return basic opts used in wakenet9 & multinet5
**/
esp_mfcc_opts_t *get_mfcc_opts_wn9();
/**
* @brief Return basic opts used in wakenet9s
**/
esp_mfcc_opts_t *get_mfcc_opts_wn9s16();
/**
* @brief Return basic opts for default kaldifeat
*

View File

@ -48,7 +48,7 @@ float *esp_win_func_init(char *win_type, float *window_data, int frame_length);
float *esp_fftr(float *x, int nfft, void *fft_table);
float *esp_spectrum_step(float *x, int nfft, bool use_power, void *fft_table);
float *esp_spectrum_step(float *x, int nfft, bool use_power, void *fft_handle);
void esp_audio_short_to_float(short *samples, float *x, int len, int remove_dc);

View File

@ -29,6 +29,7 @@ typedef enum {
DET_MODE_2CH_95 = 3,
DET_MODE_3CH_90 = 4,
DET_MODE_3CH_95 = 5,
DET_MODE_90_COPY_PARAMS = 6, // Aggressive
} det_mode_t;
typedef struct {

View File

@ -68,6 +68,8 @@ typedef esp_mfcc_data_t *(*esp_mfcc_op_create_t)(const esp_mfcc_opts_t *opt);
*/
typedef float *(*esp_mfcc_op_run_step_t)(esp_mfcc_data_t *r, int16_t *samp, int16_t nch);
typedef void (*esp_mfcc_op_run_step_s16_t)(esp_mfcc_data_t *r, int16_t *samp, int16_t *fbank);
/**
* @brief Clean all state of mfcc handle
*
@ -82,5 +84,6 @@ typedef struct {
esp_mfcc_op_destroy_t destroy;
esp_mfcc_op_create_t create;
esp_mfcc_op_run_step_t run_step;
esp_mfcc_op_run_step_s16_t run_step_s16;
esp_mfcc_op_clean_t clean;
} esp_mfcc_iface_t;

View File

@ -2,12 +2,18 @@
#include "esp_mfcc_iface.h"
extern const esp_mfcc_iface_t esp_fbank_f32; // float32-fbank handle
extern const esp_mfcc_iface_t esp_fbank_s16; // int16-fbank handle
/**
* @brief Return basic opts used in wakenet9 & multinet5
**/
esp_mfcc_opts_t *get_mfcc_opts_wn9();
/**
* @brief Return basic opts used in wakenet9s
**/
esp_mfcc_opts_t *get_mfcc_opts_wn9s16();
/**
* @brief Return basic opts for default kaldifeat
*

View File

@ -48,7 +48,7 @@ float *esp_win_func_init(char *win_type, float *window_data, int frame_length);
float *esp_fftr(float *x, int nfft, void *fft_table);
float *esp_spectrum_step(float *x, int nfft, bool use_power, void *fft_table);
float *esp_spectrum_step(float *x, int nfft, bool use_power, void *fft_handle);
void esp_audio_short_to_float(short *samples, float *x, int len, int remove_dc);

View File

@ -29,6 +29,7 @@ typedef enum {
DET_MODE_2CH_95 = 3,
DET_MODE_3CH_90 = 4,
DET_MODE_3CH_95 = 5,
DET_MODE_90_COPY_PARAMS = 6, // Aggressive
} det_mode_t;
typedef struct {

View File

@ -68,6 +68,8 @@ typedef esp_mfcc_data_t *(*esp_mfcc_op_create_t)(const esp_mfcc_opts_t *opt);
*/
typedef float *(*esp_mfcc_op_run_step_t)(esp_mfcc_data_t *r, int16_t *samp, int16_t nch);
typedef void (*esp_mfcc_op_run_step_s16_t)(esp_mfcc_data_t *r, int16_t *samp, int16_t *fbank);
/**
* @brief Clean all state of mfcc handle
*
@ -82,5 +84,6 @@ typedef struct {
esp_mfcc_op_destroy_t destroy;
esp_mfcc_op_create_t create;
esp_mfcc_op_run_step_t run_step;
esp_mfcc_op_run_step_s16_t run_step_s16;
esp_mfcc_op_clean_t clean;
} esp_mfcc_iface_t;

View File

@ -2,12 +2,18 @@
#include "esp_mfcc_iface.h"
extern const esp_mfcc_iface_t esp_fbank_f32; // float32-fbank handle
extern const esp_mfcc_iface_t esp_fbank_s16; // int16-fbank handle
/**
* @brief Return basic opts used in wakenet9 & multinet5
**/
esp_mfcc_opts_t *get_mfcc_opts_wn9();
/**
* @brief Return basic opts used in wakenet9s
**/
esp_mfcc_opts_t *get_mfcc_opts_wn9s16();
/**
* @brief Return basic opts for default kaldifeat
*

View File

@ -48,7 +48,7 @@ float *esp_win_func_init(char *win_type, float *window_data, int frame_length);
float *esp_fftr(float *x, int nfft, void *fft_table);
float *esp_spectrum_step(float *x, int nfft, bool use_power, void *fft_table);
float *esp_spectrum_step(float *x, int nfft, bool use_power, void *fft_handle);
void esp_audio_short_to_float(short *samples, float *x, int len, int remove_dc);

View File

@ -29,6 +29,7 @@ typedef enum {
DET_MODE_2CH_95 = 3,
DET_MODE_3CH_90 = 4,
DET_MODE_3CH_95 = 5,
DET_MODE_90_COPY_PARAMS = 6, // Aggressive
} det_mode_t;
typedef struct {

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,25 @@
# This file was generated using idf.py save-defconfig. It can be edited manually.
# Espressif IoT Development Framework (ESP-IDF) 5.5.0 Project Minimal Configuration
#
CONFIG_IDF_TARGET="esp32s3"
CONFIG_ESPTOOLPY_FLASHMODE_QIO=y
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_SR_VADN_VADNET1_MEDIUM=y
CONFIG_SR_WN_WN9S_HILEXIN=y
CONFIG_SPIRAM=y
CONFIG_ESP_TASK_WDT_EN=n
CONFIG_ESP_TASK_WDT_INIT=n
CONFIG_SPIRAM_MODE_OCT=y
CONFIG_SPIRAM_SPEED_80M=y
CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240=y
CONFIG_ESP32S3_INSTRUCTION_CACHE_32KB=y
CONFIG_ESP32S3_DATA_CACHE_64KB=y
CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y
CONFIG_ESP_MAIN_TASK_STACK_SIZE=8192
CONFIG_ESP_WIFI_GMAC_SUPPORT=n
CONFIG_FREERTOS_VTASKLIST_INCLUDE_COREID=y
CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y
CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744
CONFIG_LWIP_TCP_WND_DEFAULT=5744
CONFIG_UNITY_CRITICAL_LEAK_LEVEL_GENERAL=1024