Request timeout
yusuf-madkour opened this issue · comments
Do you want to request a feature, report a bug, or ask a question about pywit?
I want to report a bug.
What is the current behaviour?
WitError: Wit responded with status: 408 (Request Timeout)
If the current behaviour is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
from wit import Wit
access_token = "4GPORKFP43N4XC56IFGVAAHTAZJBBCEZ"
client = Wit(access_token)
resp = None
with open('Arabic_short.wav', 'rb') as f:
resp = client.speech(f, None, {'Content-Type': 'audio/wav'})
print('Yay, got Wit.ai response: ' + str(resp))
What is the expected behaviour?
It should have printed the response containing the speech from the .wav file.
If applicable, what is the App ID where you are experiencing this issue? If you do not provide this, we cannot help.
634145797167106
I closed this issue because I found out that I was using a .wav file of length more than 20 seconds, however, I am still receiving the same response even after trimming the file to 15 seconds only.
Here is the file for your reference:
Arabic_short.wav.gz
Please don't provide your access token. You probably want to refresh the token in your app settings to make sure other people don't use your app.
The wave length would be my first guess.
Is this a new behavior? Have you tried with shorter waves? Can you reproduce consistently?
Thanks.