Update modules/whisper/whisper_base.py
Browse files
modules/whisper/whisper_base.py
CHANGED
@@ -553,13 +553,25 @@ class WhisperBase(ABC):
|
|
553 |
minutes, seconds = divmod(rem, 60)
|
554 |
|
555 |
time_str = ""
|
|
|
556 |
if hours:
|
557 |
-
|
|
|
|
|
|
|
|
|
558 |
if minutes:
|
559 |
-
|
|
|
|
|
|
|
|
|
560 |
seconds = round(seconds)
|
561 |
-
|
562 |
-
|
|
|
|
|
|
|
563 |
return time_str.strip()
|
564 |
|
565 |
@staticmethod
|
|
|
553 |
minutes, seconds = divmod(rem, 60)
|
554 |
|
555 |
time_str = ""
|
556 |
+
|
557 |
if hours:
|
558 |
+
if hours == 1:
|
559 |
+
time_str += f"{hours} hour "
|
560 |
+
else:
|
561 |
+
time_str += f"{hours} hours "
|
562 |
+
|
563 |
if minutes:
|
564 |
+
if minutes == 1:
|
565 |
+
time_str += f"{minutes} minute "
|
566 |
+
else:
|
567 |
+
time_str += f"{minutes} minutes "
|
568 |
+
|
569 |
seconds = round(seconds)
|
570 |
+
if seconds == 1:
|
571 |
+
time_str += f"{seconds} second"
|
572 |
+
else:
|
573 |
+
time_str += f"{seconds} seconds"
|
574 |
+
|
575 |
return time_str.strip()
|
576 |
|
577 |
@staticmethod
|