Spaces:
Runtime error
Runtime error
Commit
·
aea5cb5
1
Parent(s):
1378b33
Initial commit
Browse files
app.py
CHANGED
@@ -37,12 +37,13 @@ def process_audio(audio_file):
|
|
37 |
{"label": "bird", "confidence": 0.6}
|
38 |
]
|
39 |
return json.dumps(output_data)
|
|
|
40 |
def process(audio):
|
41 |
-
result = pipe(
|
42 |
for item in result:
|
43 |
item['timestamp'] = list(item['timestamp'])
|
44 |
return result
|
45 |
|
46 |
|
47 |
-
iface = gr.Interface(fn=
|
48 |
iface.launch()
|
|
|
37 |
{"label": "bird", "confidence": 0.6}
|
38 |
]
|
39 |
return json.dumps(output_data)
|
40 |
+
|
41 |
def process(audio):
|
42 |
+
result = pipe(audio)['chunks']
|
43 |
for item in result:
|
44 |
item['timestamp'] = list(item['timestamp'])
|
45 |
return result
|
46 |
|
47 |
|
48 |
+
iface = gr.Interface(fn=process, inputs="audio", outputs="text")
|
49 |
iface.launch()
|