Closed azianmike closed 8 years ago
non-issue
How did you solve it? I am experiencing the same issue right now...
Hi @azianmike , I'm experiencing the same problem too. The code I simply tested, directly from the README:
client = Wit(access_token)
resp = None
with open(AUDIO_FILE, 'rb') as f:
resp = client.speech(f, None, {'Content-Type': 'audio/wav'})
print('Yay, got Wit.ai response: ' + str(resp))
Were there any insights on this that helped you solve it?
How is this resolved @azianmike ?
Hey @mohdnizamat this would be caused:
if you could give me an example wav file that fails for you, I'd be happy to take a look
I send over a query and I get back the stack trace
Traceback (most recent call last): File "bot.py", line 74, in
client.interactive()
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/wit/wit.py", line 162, in interactive
context = self.run_actions(session_id, message, context, max_steps)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/wit/wit.py", line 134, in run_actions
return self.run_actions(session_id, message, context, max_steps, verbose)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/wit/wit.py", line 125, in __run_actions
return self.run_actions(session_id, None, context, i - 1, verbose)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/wit/wit.py", line 85, in __run_actions
json = self.converse(session_id, message, context, verbose)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/wit/wit.py", line 79, in converse
resp = req(self.logger, self.access_token, 'POST', '/converse', params, json=context)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/wit/wit.py", line 31, in req
' (' + rsp.reason + ')')
wit.wit.WitError: Wit responded with status: 400 (Bad Request)
Any help? Seems to be the wit code?