Update modules/whisper/whisper_base.py
Browse files
modules/whisper/whisper_base.py
CHANGED
@@ -198,10 +198,10 @@ class WhisperBase(ABC):
|
|
198 |
if bool_diarization_enable_offload:
|
199 |
self.diarizer.offload()
|
200 |
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
|
206 |
if not result:
|
207 |
print(f"Whisper did not detected any speech segments in the audio.")
|
@@ -387,8 +387,8 @@ class WhisperBase(ABC):
|
|
387 |
|
388 |
return [result_str,result_file_path,total_info]
|
389 |
|
390 |
-
|
391 |
-
|
392 |
finally:
|
393 |
self.release_cuda_memory()
|
394 |
|
|
|
198 |
if bool_diarization_enable_offload:
|
199 |
self.diarizer.offload()
|
200 |
|
201 |
+
# self.cache_parameters(
|
202 |
+
# whisper_params=params,
|
203 |
+
# add_timestamp=add_timestamp
|
204 |
+
# )
|
205 |
|
206 |
if not result:
|
207 |
print(f"Whisper did not detected any speech segments in the audio.")
|
|
|
387 |
|
388 |
return [result_str,result_file_path,total_info]
|
389 |
|
390 |
+
except Exception as e:
|
391 |
+
print(f"Error transcribing file: {e}")
|
392 |
finally:
|
393 |
self.release_cuda_memory()
|
394 |
|