watson-developer-cloud / python-sdk

:snake: Client library to use the IBM Watson services in Python and available in pip as watson-developer-cloud
https://pypi.org/project/ibm-watson/
Apache License 2.0
1.46k stars 827 forks source link

Error in Speech to Text Demo #169

Closed belgort closed 7 years ago

belgort commented 7 years ago

Hello,

When I try to run the demo of speech to text using the example wave file I get the following error:

Traceback (most recent call last): File "/Users/bruceelgort/Dropbox/bluemix/speech_to_text.py", line 19, in word_confidence=True), File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/watson_developer_cloud/speech_to_text_v1.py", line 60, in recognize stream=True, accept_json=True) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/watson_developer_cloud/watson_developer_cloud_service.py", line 320, in request raise WatsonException(error_message) watson_developer_cloud.watson_developer_cloud_service.WatsonException: Error: unable to transcode data stream audio/wav -> audio/x-float-array , Code: 400

kognate commented 7 years ago

That error means the service doesn't think the data you are uploading is audio.

can you play the file locally?

belgort commented 7 years ago

It’s now working correctly after re-download the file. Sorry for the bother.

jeffeisen commented 7 years ago

Glad to hear it's working for you and that you are checking out the service. As always, anything we can do to help, Bruce. Always happy to see the name of a longtime partner fly by.

-Jeff