Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -16,18 +16,21 @@ def greet(grabacion):
|
|
16 |
y = y.astype(np.float32)
|
17 |
y /= np.max(np.abs(y))
|
18 |
|
|
|
19 |
result_base = "base:" + pipe_base({"sampling_rate": sr, "raw": y})["text"]
|
20 |
fin_base = time.time()
|
21 |
-
|
|
|
22 |
result_small = "small:" + pipe_small({"sampling_rate": sr, "raw": y})["text"]
|
23 |
fin_small = time.time()
|
24 |
-
|
|
|
25 |
result_base_1600 = "base_2000:" + pipe_base_1600({"sampling_rate": sr, "raw": y})["text"]
|
26 |
fin_1600 = time.time()
|
27 |
|
28 |
fin = time.time()
|
29 |
|
30 |
-
return result_base, fin_base -
|
31 |
#return result_base, result_small, fin - inicio
|
32 |
|
33 |
demo = gr.Interface(fn=greet,
|
|
|
16 |
y = y.astype(np.float32)
|
17 |
y /= np.max(np.abs(y))
|
18 |
|
19 |
+
inicio_base = time.time()
|
20 |
result_base = "base:" + pipe_base({"sampling_rate": sr, "raw": y})["text"]
|
21 |
fin_base = time.time()
|
22 |
+
|
23 |
+
inicio_small = time.time()
|
24 |
result_small = "small:" + pipe_small({"sampling_rate": sr, "raw": y})["text"]
|
25 |
fin_small = time.time()
|
26 |
+
|
27 |
+
inicio_1600 = time.time()
|
28 |
result_base_1600 = "base_2000:" + pipe_base_1600({"sampling_rate": sr, "raw": y})["text"]
|
29 |
fin_1600 = time.time()
|
30 |
|
31 |
fin = time.time()
|
32 |
|
33 |
+
return result_base, fin_base - inicio_base, result_small, fin_small - inicio_small, result_base_1600, fin_1600 - inicio_1600, fin - inicio
|
34 |
#return result_base, result_small, fin - inicio
|
35 |
|
36 |
demo = gr.Interface(fn=greet,
|