Checklist
How often does this bug occurs?
always
Expected behavior
Actual behavior (suspected bug)
aec之后频谱被限制在4k
Error logs or terminal output
Steps to reproduce the behavior
esp32s3
int ref_num = codec_->input_reference() ? 1 : 0;
std::string input_format = "MRM";
ESP_LOGI(TAG, "AFE Initialize start (input_format=%s, frame_samples=%d)", input_format.c_str(), frame_samples_);
srmodel_list_t *models = esp_srmodel_init("model");
if (!models) {
ESP_LOGE(TAG, "srmodel_init failed, aborting AFE init");
return;
}
char* ns_model_name = esp_srmodel_filter(models, ESP_NSNET_PREFIX, NULL);
char* vad_model_name = esp_srmodel_filter(models, ESP_VADN_PREFIX, NULL);
afe_config_t* afe_config = afe_config_init(input_format.c_str(), NULL, AFE_TYPE_VC, AFE_MODE_HIGH_PERF);
if (!afe_config) {
ESP_LOGE(TAG, "afe_config_init failed");
return;
}
afe_config->agc_mode = AFE_AGC_MODE_WEBRTC;
afe_config->aec_mode = AEC_MODE_VOIP_HIGH_PERF;
afe_config->vad_mode = VAD_MODE_1;
// afe_config->se_init = true;
afe_config->vad_min_noise_ms = 200;
if (vad_model_name) afe_config->vad_model_name = vad_model_name;
afe_config->ns_init = true;
afe_config->afe_ns_mode = AFE_NS_MODE_WEBRTC;
afe_config->afe_perferred_core = 1;
afe_config->afe_perferred_priority = 1;
// afe_config->agc_init = true;
afe_config->memory_alloc_mode = AFE_MEMORY_ALLOC_MORE_PSRAM;
// afe_config->agc_compression_gain_db = 15;
// afe_config->agc_target_level_dbfs = 5;
#ifdef CONFIG_USE_DEVICE_AEC
afe_config->aec_init = true;
afe_config->vad_init = false;
#else
afe_config->aec_init = false;
afe_config->vad_init = true;
#endif
afe_iface_ = esp_afe_handle_from_config(afe_config);
if (!afe_iface_) {
ESP_LOGE(TAG, "esp_afe_handle_from_config failed");
return;
}
afe_data_ = afe_iface_->create_from_config(afe_config);
if (!afe_data_) {
ESP_LOGE(TAG, "afe create_from_config failed");
return;
}
Project release version
sr-2.1.1,idf-5.4.3
System architecture
Intel/AMD 64-bit (modern PC, older Mac)
Operating system
Linux
Operating system version
esp32s3
Shell
ZSH
Additional context
No response
Checklist
How often does this bug occurs?
always
Expected behavior
Actual behavior (suspected bug)
aec之后频谱被限制在4k
Error logs or terminal output
Steps to reproduce the behavior
esp32s3
int ref_num = codec_->input_reference() ? 1 : 0;
std::string input_format = "MRM";
#ifdef CONFIG_USE_DEVICE_AEC
afe_config->aec_init = true;
afe_config->vad_init = false;
#else
afe_config->aec_init = false;
afe_config->vad_init = true;
#endif
Project release version
sr-2.1.1,idf-5.4.3
System architecture
Intel/AMD 64-bit (modern PC, older Mac)
Operating system
Linux
Operating system version
esp32s3
Shell
ZSH
Additional context
No response