Last active
January 19, 2017 13:56
-
-
Save amit4111989/7a810bf6450cbd281d3d0ca74cf05cd1 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| with open(tmp_path + 'recording.wav') as inf: | |
| files = [ | |
| ('file', ('request', json.dumps(data), 'application/json; charset=UTF-8')), | |
| ('file', ('audio', inf, 'audio/L16; rate=16000; channels=1')) | |
| ] | |
| resp = requests.post(url, headers=headers, files=files) | |
| resp_copy = requests.post('http://speech-analysis-server-ip-address/recording', files=[files[1]]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment