Code: Select all
static const sys_param_t g_default_sys_param = {
.need_hint = 1,
.sr_lang = SR_LANG_CN,
.volume = 70, // default volume is 70%
};
2.是否有详细的API文档?
Code: Select all
static const sys_param_t g_default_sys_param = {
.need_hint = 1,
.sr_lang = SR_LANG_CN,
.volume = 70, // default volume is 70%
};
Code: Select all
esp_err_t app_sr_start(bool record_en)
{
......
esp_task_wdt_reset();
g_sr_data->afe_handle = &ESP_AFE_HANDLE;
afe_config_t afe_config = AFE_CONFIG_DEFAULT();
afe_config.aec_init = false;
// afe_config.vad_init = false;
g_sr_data->afe_data = g_sr_data->afe_handle->create_from_config(&afe_config);
const sys_param_t *param = settings_get_parameter();
g_sr_data->lang = SR_LANG_MAX;
ret = app_sr_set_language(param->sr_lang); // <<<<<<<<<<<在此处直接设置吗?我改成 app_sr_set_language(SR_LANG_CN) 后,发现可以听懂中文了,但是回答的依然是英语 OK,这是为什么?
ESP_GOTO_ON_FALSE(ESP_OK == ret, ESP_FAIL, err, TAG, "Failed to set language");
.......
app_sr_stop();
return ret;
}
Users browsing this forum: No registered users and 7 guests