mirror of
https://github.com/espressif/esp-sr.git
synced 2025-09-15 15:28:44 +08:00
Merge branch 'feat/add_nsnet2_model' into 'master'
feat/add_nsnet2 See merge request speech-recognition-framework/esp-sr!93
This commit is contained in:
commit
e8035ae394
@ -46,7 +46,9 @@ choice SR_NSN_MODEL_LOAD
|
||||
config SR_NSN_NSNET1
|
||||
bool "Deep noise suppression v1 (nsnet1)"
|
||||
depends on IDF_TARGET_ESP32S3
|
||||
|
||||
config SR_NSN_NSNET2
|
||||
bool "Deep noise suppression v2 (nsnet2)"
|
||||
depends on IDF_TARGET_ESP32S3
|
||||
endchoice
|
||||
|
||||
config USE_WAKENET
|
||||
@ -136,6 +138,10 @@ choice SR_WN_MODEL_LOAD
|
||||
bool "Hi,Xiaoxing (wn9_hixiaoxing_tts)"
|
||||
depends on IDF_TARGET_ESP32S3
|
||||
|
||||
config SR_WN_WN9_MYCROFT_TTS
|
||||
bool "Mycroft (wn9_mycroft_tts)"
|
||||
depends on IDF_TARGET_ESP32S3
|
||||
|
||||
config SR_WN_WN9_CUSTOMWORD
|
||||
bool "customized word (wn9_customword)"
|
||||
depends on IDF_TARGET_ESP32S3
|
||||
@ -189,6 +195,10 @@ menu "Load Multiple Wake Words"
|
||||
bool "xiaomeitongxue (wn9_xiaomeitongxue_tts)"
|
||||
depends on IDF_TARGET_ESP32S3
|
||||
|
||||
config SR_WN_WN9_MYCROFT_TTS_MULTI
|
||||
bool "Mycroft (wn9_mycroft_tts)"
|
||||
depends on IDF_TARGET_ESP32S3
|
||||
|
||||
endmenu
|
||||
|
||||
config USE_MULTINET
|
||||
|
||||
@ -41,6 +41,7 @@ The following wake words are supported in esp-sr:
|
||||
|Computer | | wn9_computer_tts |
|
||||
|Hey,Willow | | wn9_heywillow_tts |
|
||||
|Sophia | | wn9_sophia_tts |
|
||||
|Mycroft | | wn9_mycroft_tts |
|
||||
|你好小鑫 | | wn9_nihaoxiaoxin_tts |
|
||||
|小美同学 | | wn9_xiaomeitongxue_tts |
|
||||
|Hi,小星 | | wn9_hixiaoxing_tts |
|
||||
|
||||
@ -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`
|
||||
*
|
||||
* @param prt Pointer to free
|
||||
* @param ptr Pointer to free
|
||||
*/
|
||||
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
|
||||
|
||||
@ -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_convq(dl_convq_queue_t *cq, int offset);
|
||||
void dl_relu_convq8(dl_convq8_queue_t *cq);
|
||||
|
||||
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,
|
||||
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 *state_h, const dl_matrix2dq_t *in_weight, const dl_matrix2dq_t *h_weight,
|
||||
const dl_matrix2dq_t *bias, int prenum);
|
||||
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, dl_matrix2dq_t *in_weight, dl_matrix2dq_t *h_weight,
|
||||
dl_matrix2dq_t *bias, int prenum);
|
||||
|
||||
/**
|
||||
* @brief Allocate a fixed-point multi channel convolution queue
|
||||
|
||||
@ -2,8 +2,16 @@
|
||||
|
||||
#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"
|
||||
|
||||
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 = []
|
||||
if "CONFIG_SR_NSN_NSNET1" in models_string:
|
||||
models.append('nsnet1')
|
||||
if "CONFIG_SR_NSN_NSNET2" in models_string:
|
||||
models.append('nsnet2')
|
||||
|
||||
for item in models:
|
||||
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.
1
model/wakenet_model/wn9_mycroft_tts/_MODEL_INFO_
Normal file
1
model/wakenet_model/wn9_mycroft_tts/_MODEL_INFO_
Normal file
@ -0,0 +1 @@
|
||||
wakenet9l_tts1h8_Mycroft_3_0.625_0.629
|
||||
BIN
model/wakenet_model/wn9_mycroft_tts/wn9_data
Normal file
BIN
model/wakenet_model/wn9_mycroft_tts/wn9_data
Normal file
Binary file not shown.
BIN
model/wakenet_model/wn9_mycroft_tts/wn9_index
Normal file
BIN
model/wakenet_model/wn9_mycroft_tts/wn9_index
Normal file
Binary file not shown.
@ -57,10 +57,11 @@ def test_sr_afe(dut: Dut)-> None:
|
||||
'config',
|
||||
[
|
||||
'nsnet1',
|
||||
'nsnet2',
|
||||
],
|
||||
)
|
||||
def test_vc_afe(dut: Dut)-> None:
|
||||
# dut.run_all_single_board_cases(group="afe")
|
||||
dut.expect_exact('Press ENTER to see the list of tests.')
|
||||
dut.write('[afe_vc]')
|
||||
dut.expect_unity_test_output(timeout = 100000)
|
||||
dut.expect_unity_test_output(timeout = 100000)
|
||||
|
||||
1902
test_apps/esp-sr/sdkconfig.ci.nsnet2
Normal file
1902
test_apps/esp-sr/sdkconfig.ci.nsnet2
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user