Update modules/whisper/whisper_base.py
Browse files
modules/whisper/whisper_base.py
CHANGED
@@ -281,19 +281,17 @@ class WhisperBase(ABC):
|
|
281 |
total_time += info["time_for_task"]
|
282 |
total_info += f'Input file: {info["input_source_file"]}\nLanguage prediction: {info["lang"]}\n'
|
283 |
|
284 |
-
#result_str = f"Processing of file '{file_name}{file_ext}' done in {self.format_time(total_time)}:\n\n{total_result}"
|
285 |
total_info += f"\nTranscription duration: {self.format_time(total_time)}"
|
286 |
result_str = total_result
|
287 |
-
result_file_path = [info['path'] for info in files_to_download.values()]
|
|
|
288 |
|
289 |
return [result_str, result_file_path, total_info]
|
290 |
-
|
291 |
except Exception as e:
|
292 |
print(f"Error transcribing file: {e}")
|
293 |
finally:
|
294 |
self.release_cuda_memory()
|
295 |
-
|
296 |
-
return ["","",""]
|
297 |
|
298 |
def transcribe_mic(self,
|
299 |
mic_audio: str,
|
|
|
281 |
total_time += info["time_for_task"]
|
282 |
total_info += f'Input file: {info["input_source_file"]}\nLanguage prediction: {info["lang"]}\n'
|
283 |
|
|
|
284 |
total_info += f"\nTranscription duration: {self.format_time(total_time)}"
|
285 |
result_str = total_result
|
286 |
+
#result_file_path = [info['path'] for info in files_to_download.values()]
|
287 |
+
result_file_path = [info['path'] for info in files_info.values()]
|
288 |
|
289 |
return [result_str, result_file_path, total_info]
|
290 |
+
|
291 |
except Exception as e:
|
292 |
print(f"Error transcribing file: {e}")
|
293 |
finally:
|
294 |
self.release_cuda_memory()
|
|
|
|
|
295 |
|
296 |
def transcribe_mic(self,
|
297 |
mic_audio: str,
|