mirror of
https://github.com/espressif/esp-sr.git
synced 2025-09-15 15:28:44 +08:00
feat/add_nsnet2
This commit is contained in:
parent
9c140600e0
commit
debd558c24
@ -46,7 +46,9 @@ choice SR_NSN_MODEL_LOAD
|
|||||||
config SR_NSN_NSNET1
|
config SR_NSN_NSNET1
|
||||||
bool "Deep noise suppression v1 (nsnet1)"
|
bool "Deep noise suppression v1 (nsnet1)"
|
||||||
depends on IDF_TARGET_ESP32S3
|
depends on IDF_TARGET_ESP32S3
|
||||||
|
config SR_NSN_NSNET2
|
||||||
|
bool "Deep noise suppression v2 (nsnet2)"
|
||||||
|
depends on IDF_TARGET_ESP32S3
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
config USE_WAKENET
|
config USE_WAKENET
|
||||||
@ -120,22 +122,6 @@ choice SR_WN_MODEL_LOAD
|
|||||||
bool "Hey,Willow (wn9_heywillow_tts)"
|
bool "Hey,Willow (wn9_heywillow_tts)"
|
||||||
depends on IDF_TARGET_ESP32S3
|
depends on IDF_TARGET_ESP32S3
|
||||||
|
|
||||||
config SR_WN_WN9_SOPHIA_TTS
|
|
||||||
bool "Sophia (wn9_sophia_tts)"
|
|
||||||
depends on IDF_TARGET_ESP32S3
|
|
||||||
|
|
||||||
config SR_WN_WN9_NIHAOXIAOXIN_TTS
|
|
||||||
bool "nihaoxiaoxin (wn9_nihaoxiaoxin_tts)"
|
|
||||||
depends on IDF_TARGET_ESP32S3
|
|
||||||
|
|
||||||
config SR_WN_WN9_XIAOMEITONGXUE_TTS
|
|
||||||
bool "xiaomeitongxue (wn9_xiaomeitongxue_tts)"
|
|
||||||
depends on IDF_TARGET_ESP32S3
|
|
||||||
|
|
||||||
config SR_WN_WN9_HIXIAOXING_TTS
|
|
||||||
bool "Hi,Xiaoxing (wn9_hixiaoxing_tts)"
|
|
||||||
depends on IDF_TARGET_ESP32S3
|
|
||||||
|
|
||||||
config SR_WN_WN9_CUSTOMWORD
|
config SR_WN_WN9_CUSTOMWORD
|
||||||
bool "customized word (wn9_customword)"
|
bool "customized word (wn9_customword)"
|
||||||
depends on IDF_TARGET_ESP32S3
|
depends on IDF_TARGET_ESP32S3
|
||||||
@ -177,18 +163,6 @@ menu "Load Multiple Wake Words"
|
|||||||
bool "Hey,Willow (wn9_heywillow_tts)"
|
bool "Hey,Willow (wn9_heywillow_tts)"
|
||||||
depends on IDF_TARGET_ESP32S3
|
depends on IDF_TARGET_ESP32S3
|
||||||
|
|
||||||
config SR_WN_WN9_SOPHIA_TTS_MULTI
|
|
||||||
bool "Sophia (wn9_sophia_tts)"
|
|
||||||
depends on IDF_TARGET_ESP32S3
|
|
||||||
|
|
||||||
config SR_WN_WN9_NIHAOXIAOXIN_TTS_MULTI
|
|
||||||
bool "nihaoxiaoxin (wn9_nihaoxiaoxin_tts)"
|
|
||||||
depends on IDF_TARGET_ESP32S3
|
|
||||||
|
|
||||||
config SR_WN_WN9_XIAOMEITONGXUE_TTS_MULTI
|
|
||||||
bool "xiaomeitongxue (wn9_xiaomeitongxue_tts)"
|
|
||||||
depends on IDF_TARGET_ESP32S3
|
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
config USE_MULTINET
|
config USE_MULTINET
|
||||||
|
|||||||
@ -78,7 +78,7 @@ void *dl_lib_calloc_psram(int cnt, int size, int align);
|
|||||||
/**
|
/**
|
||||||
* @brief Free aligned memory allocated by `dl_lib_calloc` or `dl_lib_calloc_psram`
|
* @brief Free aligned memory allocated by `dl_lib_calloc` or `dl_lib_calloc_psram`
|
||||||
*
|
*
|
||||||
* @param prt Pointer to free
|
* @param ptr Pointer to free
|
||||||
*/
|
*/
|
||||||
void dl_lib_free(void *ptr);
|
void dl_lib_free(void *ptr);
|
||||||
|
|
||||||
@ -415,4 +415,4 @@ dl_matrix2d_t *dl_basic_conv_layer_quantised_weight(const dl_matrix2d_t *in, con
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -292,6 +292,7 @@ qtp_t *dl_atrous_conv1dq8_16_s3(dl_convq8_queue_t *in, dl_convq_queue_t *out, in
|
|||||||
|
|
||||||
void print_convq8(dl_convq8_queue_t *cq, int offset);
|
void print_convq8(dl_convq8_queue_t *cq, int offset);
|
||||||
void print_convq(dl_convq_queue_t *cq, int offset);
|
void print_convq(dl_convq_queue_t *cq, int offset);
|
||||||
|
void dl_relu_convq8(dl_convq8_queue_t *cq);
|
||||||
|
|
||||||
void lstmq8_free(void);
|
void lstmq8_free(void);
|
||||||
|
|
||||||
|
|||||||
@ -279,9 +279,9 @@ dl_matrix2dq_t *dl_convq_lstm_layer(const dl_convq_queue_t *in, dl_convq_queue_t
|
|||||||
dl_matrix2dq_t *dl_basic_lstm_layer1_q(const dl_convq_queue_t *in, dl_matrix2dq_t *state_c, dl_matrix2dq_t *state_h,
|
dl_matrix2dq_t *dl_basic_lstm_layer1_q(const dl_convq_queue_t *in, dl_matrix2dq_t *state_c, dl_matrix2dq_t *state_h,
|
||||||
const dl_matrix2dq_t *weight, const dl_matrix2dq_t *bias, int step, int shift);
|
const dl_matrix2dq_t *weight, const dl_matrix2dq_t *bias, int step, int shift);
|
||||||
|
|
||||||
dl_matrix2dq_t *dl_convq16_lstm_layer(const dl_convq_queue_t *in, dl_convq_queue_t *out, dl_matrix2dq_t *state_c,
|
dl_matrix2dq_t *dl_convq16_lstm_layer(dl_convq_queue_t *in, dl_convq_queue_t *out, dl_matrix2dq_t *state_c,
|
||||||
dl_matrix2dq_t *state_h, const dl_matrix2dq_t *in_weight, const dl_matrix2dq_t *h_weight,
|
dl_matrix2dq_t *state_h, dl_matrix2dq_t *in_weight, dl_matrix2dq_t *h_weight,
|
||||||
const dl_matrix2dq_t *bias, int prenum);
|
dl_matrix2dq_t *bias, int prenum);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Allocate a fixed-point multi channel convolution queue
|
* @brief Allocate a fixed-point multi channel convolution queue
|
||||||
|
|||||||
@ -2,8 +2,16 @@
|
|||||||
|
|
||||||
#include "esp_nsn_iface.h"
|
#include "esp_nsn_iface.h"
|
||||||
|
|
||||||
// The prefix of nsnet model name is used to filter all wakenet from availabel models.
|
/*
|
||||||
|
The prefix of nset
|
||||||
|
Now there are nsnet1 and nsnet2
|
||||||
|
*/
|
||||||
#define ESP_NSNET_PREFIX "nsnet"
|
#define ESP_NSNET_PREFIX "nsnet"
|
||||||
|
|
||||||
extern const esp_nsn_iface_t esp_nsnet1_quantized;
|
/**
|
||||||
#define ESP_NSN_HANDLE esp_nsnet1_quantized
|
* @brief Get the nsnet handle from model name
|
||||||
|
*
|
||||||
|
* @param model_name The name of model
|
||||||
|
* @returns The handle of multinet
|
||||||
|
*/
|
||||||
|
esp_nsn_iface_t *esp_nsnet_handle_from_name(char *model_name);
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -97,6 +97,8 @@ def copy_nsnet_from_sdkconfig(model_path, sdkconfig_path, target_path):
|
|||||||
models = []
|
models = []
|
||||||
if "CONFIG_SR_NSN_NSNET1" in models_string:
|
if "CONFIG_SR_NSN_NSNET1" in models_string:
|
||||||
models.append('nsnet1')
|
models.append('nsnet1')
|
||||||
|
if "CONFIG_SR_NSN_NSNET2" in models_string:
|
||||||
|
models.append('nsnet2')
|
||||||
|
|
||||||
for item in models:
|
for item in models:
|
||||||
shutil.copytree(model_path + '/nsnet_model/' + item, target_path+'/'+item)
|
shutil.copytree(model_path + '/nsnet_model/' + item, target_path+'/'+item)
|
||||||
|
|||||||
2
model/nsnet_model/nsnet2/_MODEL_INFO_
Normal file
2
model/nsnet_model/nsnet2/_MODEL_INFO_
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# (neural network type)_(model data version)_ns_0_0.0_0.0
|
||||||
|
nsnet2_v1_ns_0_0.0_0.0
|
||||||
BIN
model/nsnet_model/nsnet2/nsnet2_data
Normal file
BIN
model/nsnet_model/nsnet2/nsnet2_data
Normal file
Binary file not shown.
BIN
model/nsnet_model/nsnet2/nsnet2_index
Normal file
BIN
model/nsnet_model/nsnet2/nsnet2_index
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user