Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -32,18 +32,18 @@ def inference(audio):
|
|
32 |
])
|
33 |
|
34 |
error = jiwer.wer(
|
35 |
-
passage,
|
36 |
result.text,
|
37 |
truth_transform=transformation,
|
38 |
hypothesis_transform=transformation
|
39 |
)
|
40 |
# error = jiwer.wer(passage, result.text)
|
41 |
-
|
42 |
-
print(
|
43 |
-
print(
|
|
|
44 |
|
45 |
-
return f"For a {audio_length} second audio,
|
46 |
-
|
47 |
|
48 |
|
49 |
|
|
|
32 |
])
|
33 |
|
34 |
error = jiwer.wer(
|
35 |
+
passage,
|
36 |
result.text,
|
37 |
truth_transform=transformation,
|
38 |
hypothesis_transform=transformation
|
39 |
)
|
40 |
# error = jiwer.wer(passage, result.text)
|
41 |
+
we_num = error * len(passage.split())
|
42 |
+
# print(f"WER is {we_num}")
|
43 |
+
# print(result.text)
|
44 |
+
# print(passage)
|
45 |
|
46 |
+
return f"For a {audio_length} second audio, {we_num} errors were made, resulting in a final time of {audio_length + we_num}.\n\n{result.text}", gr.update(visible=True), gr.update(visible=True), gr.update(visible=True)
|
|
|
47 |
|
48 |
|
49 |
|