Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -33,9 +33,9 @@ def process_audio(params):
|
|
33 |
|
34 |
# text = response['results']['channels'][0]['alternatives'][0]['transcript']
|
35 |
print(audio)
|
36 |
-
response = requests.get(
|
37 |
-
|
38 |
-
text = transcribe(
|
39 |
|
40 |
answer_dict = {}
|
41 |
answer_dict.update({'audioURL':audio, 'solutions':text, "qcUserId": None, "normalfileID": file_id})
|
|
|
33 |
|
34 |
# text = response['results']['channels'][0]['alternatives'][0]['transcript']
|
35 |
print(audio)
|
36 |
+
response = requests.get(audio)
|
37 |
+
audio2 = BytesIO(response.content)
|
38 |
+
text = transcribe(audio2)["text"]
|
39 |
|
40 |
answer_dict = {}
|
41 |
answer_dict.update({'audioURL':audio, 'solutions':text, "qcUserId": None, "normalfileID": file_id})
|