I'm working on a TTS app using AWS Polly in Raspberry PI 3 B+ and when I post a text using Python requests
it take a long time receive the response, around 16-17 seconds. This happens only with a certain wifi connection. I have tried 3 different wifi connections in which 2 of them are mobile hot spots and the request.post
gives a response within 2 seconds. When I connect to a wifi modem which is a 4G/5G connection it takes around 16-17 seconds. Modem speed is not an issue here as it gives minimum 120Mbps speed. Pi connects only with the 4G connection here not 5G.
I have enabled the "Disable IPV6
" option in in the wifi settings.
Why it's slow only with a certain connection which is a faster network?
import requests
import time
start = time.time()
res = requests.post('https://myawsAPI_XXXXXXX', json={"body":"Activate barn door protocol."})
print("Elapsed time1:", time.time() - start)
Blockquote
Elapsed time1: 17.350016117095947