diff --git a/main/audio.c b/main/audio.c index 7267f80c..1fbb6012 100644 --- a/main/audio.c +++ b/main/audio.c @@ -59,8 +59,7 @@ #define DEFAULT_WIS_TTS_URL "https://infer.tovera.io/api/tts" #define DEFAULT_WIS_URL "https://infer.tovera.io/api/willow" -#define HTTP_STREAM_TIMEOUT_MS 2 * 1000 -#define HTTP_STREAM_TIMEOUT_MS_POST_REQUEST 10 * 1000 +#define HTTP_STREAM_TIMEOUT_MS 10 * 1000 #define MULTINET_TWDT 30 #define STR_WAKE_LEN 25 @@ -225,9 +224,6 @@ static esp_err_t hdl_ev_hs_esp_audio(http_stream_event_msg_t *msg) esp_http_client_set_authtype(http, HTTP_AUTH_TYPE_BASIC); esp_http_client_set_timeout_ms(http, HTTP_STREAM_TIMEOUT_MS); break; - case HTTP_STREAM_POST_REQUEST: - esp_http_client_set_timeout_ms(http, HTTP_STREAM_TIMEOUT_MS_POST_REQUEST); - break; default: break; } @@ -556,7 +552,6 @@ static esp_err_t hdl_ev_hs_to_api(http_stream_event_msg_t *msg) return ESP_OK; case HTTP_STREAM_ON_REQUEST: - esp_http_client_set_timeout_ms(http, HTTP_STREAM_TIMEOUT_MS_POST_REQUEST); wlen = sprintf(len_buf, "%x\r\n", msg->buffer_len); if (esp_http_client_write(http, len_buf, wlen) <= 0) { return ESP_FAIL; @@ -589,7 +584,6 @@ static esp_err_t hdl_ev_hs_to_api(http_stream_event_msg_t *msg) if (http_status != 200) { // when ESP HTTP Client terminates connection due to timeout we get -1 if (http_status == -1) { - ESP_LOGE(TAG, "WIS response took longer than %dms, connection aborted", HTTP_STREAM_TIMEOUT_MS); ui_pr_err("WIS timeout", "Check server performance"); } else if (http_status == 401) { ESP_LOGE(TAG, "WIS returned Unauthorized Access (HTTP 401)");