mirror of
https://github.com/espressif/esp-sr.git
synced 2025-09-15 15:28:44 +08:00
feat/add multinet6 en v1
This commit is contained in:
parent
ce5d3786a2
commit
b4cb56808e
@ -160,6 +160,10 @@ choice ENGLISH_SR_MN_MODEL_SEL
|
||||
config SR_MN_EN_MULTINET5_SINGLE_RECOGNITION_QUANT8
|
||||
bool "english recognition (mn5q8_en)"
|
||||
depends on IDF_TARGET_ESP32S3
|
||||
|
||||
config SR_MN_EN_MULTINET6_QUANT
|
||||
bool "english recognition (mn6_en)"
|
||||
depends on IDF_TARGET_ESP32S3
|
||||
|
||||
endchoice
|
||||
|
||||
|
||||
@ -50,6 +50,16 @@ dl_convq8_queue_t *dl_convq8_queue_alloc(int n, int c);
|
||||
*/
|
||||
dl_convq8_queue_t *dl_convq8_queue_alloc_mc(int n, int c, int nch);
|
||||
|
||||
/**
|
||||
* @brief Allocate a bit fixed-point convolution queue from PSRAM
|
||||
*
|
||||
* @param n The length of queue
|
||||
* @param c The number of elements in the queue
|
||||
* @param nch The channel of queue
|
||||
* @return The convolution queue, or NULL if out of memory
|
||||
*/
|
||||
dl_convq8_queue_t *dl_convq8_queue_alloc_mc_from_psram(int n, int c, int nch);
|
||||
|
||||
/**
|
||||
* @brief Free a fixed-point convolution queue
|
||||
*
|
||||
|
||||
@ -93,8 +93,8 @@ void dl_convq_queue_bzero(dl_convq_queue_t *cq);
|
||||
* @param cq Input fixed-point convolution queue
|
||||
* @return Pointer of oldest element
|
||||
*/
|
||||
inline qtp_t *dl_convq_queue_pop(dl_convq_queue_t *cq);
|
||||
inline qtp_t *dl_convq_queue_popn(dl_convq_queue_t *cq, int n);
|
||||
qtp_t *dl_convq_queue_pop(dl_convq_queue_t *cq);
|
||||
qtp_t *dl_convq_queue_popn(dl_convq_queue_t *cq, int n);
|
||||
/**
|
||||
* @brief Remove the oldest element, then insert the input element at the end of queue
|
||||
*
|
||||
@ -125,7 +125,7 @@ dl_conv_queue_t *dl_queue_from_convq(dl_convq_queue_t *cq1);
|
||||
* @param last_num Offset from the front of the queue
|
||||
* @return Pointer of the element
|
||||
*/
|
||||
inline qtp_t *dl_get_queue_itemq(dl_convq_queue_t *cq, int last_num);
|
||||
qtp_t *dl_get_queue_itemq(dl_convq_queue_t *cq, int last_num);
|
||||
|
||||
/**
|
||||
* @brief Get the pointer of element in the queue by offset
|
||||
|
||||
@ -17,6 +17,17 @@ typedef enum {
|
||||
ESP_MN_STATE_TIMEOUT = 2, // time out
|
||||
} esp_mn_state_t;
|
||||
|
||||
typedef enum {
|
||||
ESP_MN_GREEDY_SEARCH = 0, // greedy search
|
||||
ESP_MN_BEAM_SEARCH = 1, // beam search
|
||||
ESP_MN_BEAM_SEARCH_WIRH_LM = 2, // beam search with language model
|
||||
} esp_mn_search_method_t;
|
||||
|
||||
typedef enum {
|
||||
CHINESE_ID = 1, // Chinese language
|
||||
ENGLISH_ID = 2, // English language
|
||||
} language_id_t;
|
||||
|
||||
// Return all possible recognition results
|
||||
typedef struct{
|
||||
esp_mn_state_t state;
|
||||
@ -24,8 +35,10 @@ typedef struct{
|
||||
int command_id[ESP_MN_RESULT_MAX_NUM]; // The list of command id.
|
||||
int phrase_id[ESP_MN_RESULT_MAX_NUM]; // The list of phrase id.
|
||||
float prob[ESP_MN_RESULT_MAX_NUM]; // The list of probability.
|
||||
char string[256];
|
||||
} esp_mn_results_t;
|
||||
|
||||
|
||||
typedef struct{
|
||||
int16_t num; // The number of error phrases, which can not added into model
|
||||
int16_t phrase_idx[ESP_MN_MAX_PHRASE_NUM]; // The error phrase index in singly linked list.
|
||||
|
||||
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.
@ -73,6 +73,8 @@ if "CONFIG_SR_MN_EN_MULTINET5_SINGLE_RECOGNITION_QUANT8" in MN_STRING and len(mu
|
||||
multinet_model.append('mn5q8_en')
|
||||
elif "CONFIG_SR_MN_EN_MULTINET5_SINGLE_RECOGNITION" in MN_STRING and len(multinet_model) < 2:
|
||||
multinet_model.append('mn5_en')
|
||||
elif "CONFIG_SR_MN_EN_MULTINET6_QUANT" in MN_STRING and len(multinet_model) < 2:
|
||||
multinet_model.append('mn6_en')
|
||||
|
||||
print(wakenet_model)
|
||||
print(multinet_model)
|
||||
|
||||
2
model/multinet_model/mn6_en/_MODEL_INFO_
Normal file
2
model/multinet_model/mn6_en/_MODEL_INFO_
Normal file
@ -0,0 +1,2 @@
|
||||
# (neural network type)_(model data version)_(lable1_detection windown length_threshold for 90%_threshold for 95%)_(lable2 ...)_...
|
||||
MN6_v1_english_8_0.9_0.90
|
||||
BIN
model/multinet_model/mn6_en/mn6_data
Normal file
BIN
model/multinet_model/mn6_en/mn6_data
Normal file
Binary file not shown.
BIN
model/multinet_model/mn6_en/mn6_index
Normal file
BIN
model/multinet_model/mn6_en/mn6_index
Normal file
Binary file not shown.
2
model/multinet_model/mn6s_en/_MODEL_INFO_
Normal file
2
model/multinet_model/mn6s_en/_MODEL_INFO_
Normal file
@ -0,0 +1,2 @@
|
||||
# (neural network type)_(model data version)_(lable1_detection windown length_threshold for 90%_threshold for 95%)_(lable2 ...)_...
|
||||
MN6_v1_english_8_0.9_0.90
|
||||
BIN
model/multinet_model/mn6s_en/mn6_data
Normal file
BIN
model/multinet_model/mn6s_en/mn6_data
Normal file
Binary file not shown.
BIN
model/multinet_model/mn6s_en/mn6_index
Normal file
BIN
model/multinet_model/mn6s_en/mn6_index
Normal file
Binary file not shown.
@ -1 +1,2 @@
|
||||
WakeNet9_v1h24_xiaoaitongxue_3_0.620_0.627
|
||||
# (neural network type)_(model data version)_(lable1_detection windown length_threshold for 90%_threshold for 95%)_(lable2 ...)_...
|
||||
wakeNet9l_v2h8_bangwotiaocheng_3_0.98_0.99_bangwodakai_3_0.98_0.99_bangwoguanbi_3_0.98_0.99
|
||||
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user