Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request timeout #141

Closed
yusuf-madkour opened this issue Mar 27, 2020 · 2 comments
Closed

Request timeout #141

yusuf-madkour opened this issue Mar 27, 2020 · 2 comments

Comments

@yusuf-madkour
Copy link

yusuf-madkour commented Mar 27, 2020

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

@yusuf-madkour
Copy link
Author

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

@yusuf-madkour yusuf-madkour reopened this Mar 27, 2020
@patapizza
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants