Closed patrickkeenan closed 2 months ago
HI @patrickkeenan Based on the logs you provided, it appears that the issue is caused by the socket not being connected (errno is 128). To use this example, you need to ensure two things:
Yes, I've ensured both of those things, also, the file is written on the server, so its connecting. Here are the server logs:
Serving HTTP on 192.168.86.22 port 8000 Do Post...... Audio information, sample rates: 16000, bits: 16, channel(s): 1 Total bytes received: 82800 192.168.86.59 - - [09/Oct/2023 09:46:07] "POST /upload HTTP/1.1" 200 -
Hi @patrickkeenan I'm using the same ADF and IDF for testing, and indeed, there is a “_HTTP_CLIENT: esp_transportread returned:-1 and errno:128” log out in the IDF. The correct approach in IDF should be as follows, but this is just an erroneous log. The server-side does have the correct audio recording data.
diff --git a/components/esp_http_client/esp_http_client.c b/components/esp_http_client/esp_http_client.c
index 59273915ec..b4e8a74c96 100644
--- a/components/esp_http_client/esp_http_client.c
+++ b/components/esp_http_client/esp_http_client.c
@@ -1160,8 +1160,9 @@ int esp_http_client_read(esp_http_client_handle_t client, char *buffer, int len)
http_parser_execute(client->parser, client->parser_settings, res_buffer->data, 0);
/* ...and lowering the message severity, as closed connection from server side is expected in chunked transport */
sev = ESP_LOG_DEBUG;
+ } else if (rlen != ERR_TCP_TRANSPORT_CONNECTION_CLOSED_BY_FIN) {
+ ESP_LOG_LEVEL(sev, TAG, "esp_transport_read returned:%d and errno:%d ", rlen, errno);
}
- ESP_LOG_LEVEL(sev, TAG, "esp_transport_read returned:%d and errno:%d ", rlen, errno);
}
if (rlen == ERR_TCP_TRANSPORT_CONNECTION_TIMEOUT) {
Hi! I'm having the same issue with the same board. I'm not sure but it might be something to do with the board itself? Even the google speech example returns an empty response, so it could be that the i2s_read is simply not sending proper audio data for LyraT-Mini-1.2
EDIT: I'm getting one more line of error when running the example.
E (29102) transport_base: poll_read select error 104, errno = Connection reset by peer, fd = 54 E (29102) HTTP_CLIENT: transport_read: error - 57347 | ERROR I (29112) REC_RAW_HTTP: Got HTTP Response = File 20240202T090357Z_16000_16_1.wav was written, size 126000
What does this error mean? I'm not able to find any documentation for it anywhere. Thanks
Okay I was able to solve the issue for the google cloud speech example. I'm fairly certain it's the same issue in this case too. Has to do with LyraT-mini's I2S configuration being different.
See here (https://github.com/espressif/esp-adf/issues/934#issuecomment-1923532342)
Environment
git describe --tags
in $IDF_PATH folder to find it): v5.1.1-439-gcb174b0fe1git describe --tags
in $ADF_PATH folder to find it): v2.6-23-gef058daxtensa-esp32-elf-gcc --version
in your project folder to find it): xtensa-esp32-elf-gcc (crosstool-NG esp-12.2.0_20230208) 12.2.0Problem Description
Building the pipeline_raw_http example doesn't work. Things I've tried
Perhaps this is an issue with the out dated I2S library, but it's quite hard to know. I would assume these examples should work with the latest builds.
Expected Behavior
The wav file should have audio in it.
Actual Behavior
Python server receives the http request and its the right length, but its just silence.
Steps to Reproduce
Debug Logs