watson-developer-cloud / speech-to-text-websockets-python

Python client that interacts with the IBM Watson Speech To Text service through its WebSockets interface
http://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/speech-to-text.html
86 stars 63 forks source link

Passing Credentials #15

Closed saifrahmed closed 8 years ago

saifrahmed commented 8 years ago

I'm trying to run the sample but having trouble with the credentials. The Readme suggests we should pass in the credentials on the commandline as such: python ./sttClient.py -credentials : Should we be using the Bluemix account username/password or the credentials from the service (which looks like the below)? { "credentials": { "url": "https://stream.watsonplatform.net/speech-to-text/api", "password": "xxx", "username": "xxxxx-xxxxx-xxxxxx-xxxxxx-xxxxx" } }

I tried both and always get 401 - Unauthorized:

2016-08-29 16:21:12+0300 [-] ./recordings/0009.wav 2016-08-29 16:21:12+0300 [-] ./recordings/0010.wav 2016-08-29 16:21:12+0300 [-] {'Authorization': 'Basic abcd.....=='} 2016-08-29 16:21:12+0300 [-] Starting factory <main.WSInterfaceFactory object at 0x104057610> 2016-08-29 16:21:12+0300 [-] ./output 2016-08-29 16:21:12+0300 [-] contentType: audio/wav queueSize: 9 2016-08-29 16:21:13+0300 [-] failing WebSocket opening handshake ('WebSocket connection upgrade failed (401 - Unauthorized)') 2016-08-29 16:21:13+0300 [-] onClose

daniel-bolanos commented 8 years ago

Hello @saifrahmed , I saw you closed the issue? Did you figure out what your problem was?