Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions main/audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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)");
Expand Down
Loading