Update modules/whisper/whisper_base.py
Browse files
modules/whisper/whisper_base.py
CHANGED
@@ -221,6 +221,8 @@ class WhisperBase(ABC):
|
|
221 |
|
222 |
files_info = {}
|
223 |
files_to_download = {}
|
|
|
|
|
224 |
for file in files:
|
225 |
|
226 |
## Detect language
|
@@ -284,7 +286,10 @@ class WhisperBase(ABC):
|
|
284 |
total_time += info["time_for_task"]
|
285 |
total_info += f'Input file: {info["input_source_file"]}\nLanguage prediction: {info["lang"]} with probability {info["lang_prob"]}\n'
|
286 |
|
287 |
-
total_info += f"\nTranscription duration: {self.format_time(total_time)}"
|
|
|
|
|
|
|
288 |
result_str = total_result
|
289 |
result_file_path = [info['path'] for info in files_to_download.values()]
|
290 |
|
|
|
221 |
|
222 |
files_info = {}
|
223 |
files_to_download = {}
|
224 |
+
time_start = datetime.now()
|
225 |
+
|
226 |
for file in files:
|
227 |
|
228 |
## Detect language
|
|
|
286 |
total_time += info["time_for_task"]
|
287 |
total_info += f'Input file: {info["input_source_file"]}\nLanguage prediction: {info["lang"]} with probability {info["lang_prob"]}\n'
|
288 |
|
289 |
+
#total_info += f"\nTranscription duration: {self.format_time(total_time)}"
|
290 |
+
time_end = datetime.now()
|
291 |
+
total_info += f"\nTranscription duration: {self.format_time(time_end-time_start)}"
|
292 |
+
|
293 |
result_str = total_result
|
294 |
result_file_path = [info['path'] for info in files_to_download.values()]
|
295 |
|