Created
November 22, 2018 19:44
-
-
Save bowbowbow/2f0b0ef3f8f53e2f9bf62e300dc24c22 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
import requests | |
filenames = ['10_1_mic1.wav','10_1_mic2.wav'] | |
files = dict() | |
for filename in filenames: | |
f = open(filename, 'rb') | |
files[filename] = f | |
res = requests.post('http://localhost:8080/upload', files=files) | |
print('res :', res) | |
r = requests.get('http://localhost:8080/download') | |
with open('result.wav', 'wb') as f: | |
f.write(r.content) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment