Spaces:
Sleeping
Sleeping
update
Browse files
main.py
CHANGED
|
@@ -122,14 +122,14 @@ def process(
|
|
| 122 |
start = time.time()
|
| 123 |
|
| 124 |
text = decode.decode_by_recognizer(recognizer=recognizer,
|
| 125 |
-
filename=out_filename,
|
| 126 |
)
|
| 127 |
|
| 128 |
date_time = now.strftime("%Y-%m-%d %H:%M:%S.%f")
|
| 129 |
end = time.time()
|
| 130 |
|
| 131 |
# statistics
|
| 132 |
-
metadata = torchaudio.info(out_filename)
|
| 133 |
duration = metadata.num_frames / 16000
|
| 134 |
rtf = (end - start) / duration
|
| 135 |
|
|
|
|
| 122 |
start = time.time()
|
| 123 |
|
| 124 |
text = decode.decode_by_recognizer(recognizer=recognizer,
|
| 125 |
+
filename=out_filename.as_posix(),
|
| 126 |
)
|
| 127 |
|
| 128 |
date_time = now.strftime("%Y-%m-%d %H:%M:%S.%f")
|
| 129 |
end = time.time()
|
| 130 |
|
| 131 |
# statistics
|
| 132 |
+
metadata = torchaudio.info(out_filename.as_posix())
|
| 133 |
duration = metadata.num_frames / 16000
|
| 134 |
rtf = (end - start) / duration
|
| 135 |
|