WS刚连接成功可以进行 对话,超过30sWS断开后,语音上行停止,需要修复
This commit is contained in:
@@ -24,6 +24,8 @@
|
||||
#define CONFIG_TQ_BOOT_SOUND_FILE ""
|
||||
#endif
|
||||
|
||||
#define CONTROL_PLANE_WIFI_SUCCESS_PROMPT_FILE "/littlefs/audio_prompts/network_connect_success.opus"
|
||||
|
||||
#define CONTROL_PLANE_STA_CONNECT_MAX_ATTEMPTS 3
|
||||
#define CONTROL_PLANE_STA_RETRY_BASE_DELAY_MS 300
|
||||
|
||||
@@ -79,8 +81,13 @@ static int control_plane_normalize_connect_timeout_ms(int timeout_ms, int min_ti
|
||||
static void control_plane_play_wifi_success_prompt(void)
|
||||
{
|
||||
bool played = false;
|
||||
esp_err_t audio_err = domain_runtime_multimodal_audio_init();
|
||||
if (audio_err != ESP_OK && audio_err != ESP_ERR_INVALID_STATE) {
|
||||
ESP_LOGW(TAG, "Prepare audio for Wi-Fi success prompt failed: %s", esp_err_to_name(audio_err));
|
||||
}
|
||||
played = (control_plane_wifi_play_prompt_file(CONTROL_PLANE_WIFI_SUCCESS_PROMPT_FILE) == ESP_OK);
|
||||
#ifdef CONFIG_VOICE_PROMPT_WIFI_SUCCESS_FILE
|
||||
if (CONFIG_VOICE_PROMPT_WIFI_SUCCESS_FILE[0] != '\0') {
|
||||
if (!played && CONFIG_VOICE_PROMPT_WIFI_SUCCESS_FILE[0] != '\0') {
|
||||
played = (control_plane_wifi_play_prompt_file(CONFIG_VOICE_PROMPT_WIFI_SUCCESS_FILE) == ESP_OK);
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user