python - IBM Speech to text api , unable to make a HTTP POST call -


i making python program supposed send small .wav audio clip , response , have tried several things unable make successful request till

more details : https://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/apis/#!/speech-to-text/recognizesessionless

those have tried platform

please try code below:

import requests  url = 'https://stream.watsonplatform.net/speech-to-text/api/v1/recognize' username = '<username>' password = '<password>'  headers={'content-type': 'audio/wav'}  audio = open('./sheet.wav', 'rb')  r = requests.post(url, data=audio, headers=headers, auth=(username, password))  print(r.text) 

Comments

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -