-
Notifications
You must be signed in to change notification settings - Fork 178
Description
Checklist
- Checked the issue tracker for similar issues to ensure this is not a duplicate
- Read the documentation to confirm the issue is not addressed there and your configuration is set correctly
- Tested with the latest version to ensure the issue hasn't been fixed
How often does this bug occurs?
always
Expected behavior
版本:
2.2.1
代码:
afe_config = afe_config_init(config_str, models, AFE_TYPE_SR, AFE_MODE_HIGH_PERF);
#if 1
afe_config->se_init = true;
afe_config->ns_init = true;
afe_config->afe_ns_mode = AFE_NS_MODE_NET;
afe_config->agc_init = true;
afe_config->agc_mode = AFE_NS_MODE_NET;
#endif
afe_config->vad_init = true;
afe_config->vad_mode = VAD_MODE_2;
afe_config->vad_min_speech_ms = 64;
afe_config->vad_min_noise_ms = 1000;
afe_config->agc_init = true;
afe_config->memory_alloc_mode = AFE_MEMORY_ALLOC_MORE_PSRAM;
afe_config->wakenet_init = true;
afe_config->aec_init = true;
afe_config->wakenet_model_name = esp_srmodel_filter(models, ESP_WN_PREFIX, NULL);
Actual behavior (suspected bug)
如下任务获取到的res->vad_state总是: VAD_SILENCE,但如果喊“小明同学”,唤醒一次后,就正常了,希望初始化就正常,而不是必须唤醒一次。
void audio_detect_task(void *pvParam)
{
int64_t temp_time = 0;
vad_state_t vad_state = VAD_SILENCE;
esp_afe_sr_data_t *afe_data = (esp_afe_sr_data_t *) pvParam;
/* Check audio data chunksize */
int afe_chunksize = afe_handle->get_fetch_chunksize(afe_data);
ESP_LOGI(TAG, "------------detect start------------\n");
ESP_LOGI(TAG, "afe_chunksize: %d", afe_chunksize);
//fetch一定要快,否则会出现rb_out slow
while (true)
{
afe_fetch_result_t *res = afe_handle->fetch(afe_data);
vad_state = res->vad_state;
Error logs or terminal output
Steps to reproduce the behavior
同上
Project release version
2.2.1
System architecture
Intel/AMD 64-bit (modern PC, older Mac)
Operating system
Linux
Operating system version
windows11
Shell
ZSH
Additional context
No response