Merge branch 'feat/support_two_wn' into 'master'

Feat/support two wn

See merge request speech-recognition-framework/esp-sr!50
This commit is contained in:
Sun Xiang Yu 2023-08-08 15:03:07 +08:00
commit 7bf87d98fe
8 changed files with 14 additions and 4 deletions

View File

@ -4,6 +4,11 @@
- Available storage is less than the remaining flash space on IDF v5.0.
If you can not map model partition successfully, please check the left free storage by `spi_flash_mmap_get_free_pages(ESP_PARTITION_MMAP_DATA)` or update IDF to v5.1 or later.
## 1.4.0
- Add ci tests to check the APIs of wakenet, multinet and AFE work fine
- Support to load and run two wakenet9 models at the same time in AFE
- Reduce the latency of multinet6
## 1.3.4
- Fix the bug of multinet5q8 whrn adding new speech commands

View File

@ -1,4 +1,4 @@
version: "1.3.4"
version: "1.4.0"
description: esp_sr provides basic algorithms for Speech Recognition applications
url: https://github.com/espressif/esp-sr
dependencies:
@ -7,7 +7,8 @@ dependencies:
files:
exclude:
- ".github"
- "docs"
- "docs/**/*"
- "test_apps/**/*"
targets:
- esp32
- esp32s2

View File

@ -64,7 +64,8 @@ typedef struct {
bool voice_communication_agc_init; // AGC swich for voice communication
int voice_communication_agc_gain; // AGC gain(dB) for voice communication
vad_mode_t vad_mode; // The value can be: VAD_MODE_0, VAD_MODE_1, VAD_MODE_2, VAD_MODE_3, VAD_MODE_4
char *wakenet_model_name; // The model name of wakenet
char *wakenet_model_name; // The model name of wakenet 1
char *wakenet_model_name_2; // The model name of wakenet 2 if has wakenet 2
det_mode_t wakenet_mode;
afe_sr_mode_t afe_mode;
int afe_perferred_core;
@ -89,6 +90,7 @@ typedef struct {
.voice_communication_agc_gain = 15, \
.vad_mode = VAD_MODE_3, \
.wakenet_model_name = NULL, \
.wakenet_model_name_2 = NULL, \
.wakenet_mode = DET_MODE_90, \
.afe_mode = SR_MODE_HIGH_PERF, \
.afe_perferred_core = 0, \
@ -114,6 +116,7 @@ typedef struct {
.voice_communication_agc_gain = 15, \
.vad_mode = VAD_MODE_3, \
.wakenet_model_name = NULL, \
.wakenet_model_name_2 = NULL, \
.wakenet_mode = DET_MODE_2CH_90, \
.afe_mode = SR_MODE_LOW_COST, \
.afe_perferred_core = 0, \

View File

@ -27,6 +27,7 @@ typedef struct afe_fetch_result_t
int data_size; // the size of data. The unit is byte.
wakenet_state_t wakeup_state; // the value is wakenet_state_t
int wake_word_index; // if the wake word is detected. It will store the wake word index which start from 1.
int wakenet_model_index; // if there are multiple wakenets, this value identifies which model be wakes up. Index start from 1.
afe_vad_state_t vad_state; // the value is afe_vad_state_t
int trigger_channel_id; // the channel index of output
int wake_word_length; // the length of wake word. It's unit is the number of samples.
@ -111,7 +112,7 @@ typedef int (*esp_afe_sr_iface_op_reset_buffer_t)(esp_afe_sr_data_t *afe);
/**
* @brief Initial wakenet and wake words coefficient, or reset wakenet and wake words coefficient
* when wakenet has been initialized.
* when wakenet has been initialized. It's only support wakenet 1 now.
*
* @param afe The AFE_SR object to query
* @param wakenet_word The wakenet word, should be DEFAULT_WAKE_WORD or EXTRA_WAKE_WORD

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.