Update modules/whisper/whisper_base.py
Browse files
modules/whisper/whisper_base.py
CHANGED
|
@@ -236,7 +236,7 @@ class WhisperBase(ABC):
|
|
| 236 |
if key == str(max(probs, key=probs.get)):
|
| 237 |
file_language = value.capitalize()
|
| 238 |
max_k, max_v = max(probs.items(), key=lambda x: x[1])
|
| 239 |
-
file_lang_probs = str(round(max_v,2))
|
| 240 |
break
|
| 241 |
|
| 242 |
transcribed_segments, time_for_task = self.run(
|
|
@@ -284,7 +284,7 @@ class WhisperBase(ABC):
|
|
| 284 |
for file_name, info in files_info.items():
|
| 285 |
total_result += f'{info["subtitle"]}'
|
| 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"]}
|
| 288 |
|
| 289 |
#total_info += f"\nTranscription duration: {self.format_time(total_time)}"
|
| 290 |
time_end = datetime.now()
|
|
|
|
| 236 |
if key == str(max(probs, key=probs.get)):
|
| 237 |
file_language = value.capitalize()
|
| 238 |
max_k, max_v = max(probs.items(), key=lambda x: x[1])
|
| 239 |
+
file_lang_probs = str((round(max_v,2))*100)
|
| 240 |
break
|
| 241 |
|
| 242 |
transcribed_segments, time_for_task = self.run(
|
|
|
|
| 284 |
for file_name, info in files_info.items():
|
| 285 |
total_result += f'{info["subtitle"]}'
|
| 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()
|