Created
July 28, 2015 13:46
-
-
Save sieroshtan/67e0c9d21c396aad642e to your computer and use it in GitHub Desktop.
Simple example using Speech To Text API of IBM's Bluemix platform in python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://console.ng.bluemix.net/catalog/speech-to-text/ | |
# pip requests module required | |
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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment