Update modules/whisper/whisper_base.py
Browse files
modules/whisper/whisper_base.py
CHANGED
@@ -234,9 +234,10 @@ class WhisperBase(ABC):
|
|
234 |
return result, elapsed_time
|
235 |
|
236 |
def transcribe_file(self,
|
237 |
-
|
|
|
238 |
files_multi: Optional[List] = None,
|
239 |
-
input_multi: str = "
|
240 |
input_folder_path: Optional[str] = None,
|
241 |
file_format: list = ["CSV"],
|
242 |
add_timestamp: bool = True,
|
@@ -252,8 +253,10 @@ class WhisperBase(ABC):
|
|
252 |
|
253 |
Parameters
|
254 |
----------
|
255 |
-
|
256 |
-
List of files to transcribe from gr.
|
|
|
|
|
257 |
files_multi: list
|
258 |
List of files to transcribe from gr.Files_multi()
|
259 |
input_multi: bool
|
@@ -288,7 +291,13 @@ class WhisperBase(ABC):
|
|
288 |
|
289 |
try:
|
290 |
file_count_total = 0
|
291 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
292 |
files = files_multi
|
293 |
file_count_total = len(files)
|
294 |
|
|
|
234 |
return result, elapsed_time
|
235 |
|
236 |
def transcribe_file(self,
|
237 |
+
files_audio: Optional[List] = None,
|
238 |
+
files_video: Optional[List] = None,
|
239 |
files_multi: Optional[List] = None,
|
240 |
+
input_multi: str = "Audio",
|
241 |
input_folder_path: Optional[str] = None,
|
242 |
file_format: list = ["CSV"],
|
243 |
add_timestamp: bool = True,
|
|
|
253 |
|
254 |
Parameters
|
255 |
----------
|
256 |
+
files_audio: list
|
257 |
+
List of files to transcribe from gr.Audio()
|
258 |
+
files_video: list
|
259 |
+
List of files to transcribe from gr.Video()
|
260 |
files_multi: list
|
261 |
List of files to transcribe from gr.Files_multi()
|
262 |
input_multi: bool
|
|
|
291 |
|
292 |
try:
|
293 |
file_count_total = 0
|
294 |
+
files = ""
|
295 |
+
|
296 |
+
if input_multi == "Audio":
|
297 |
+
files = files_audio
|
298 |
+
elif input_multi == "Video":
|
299 |
+
files = files_video
|
300 |
+
else:
|
301 |
files = files_multi
|
302 |
file_count_total = len(files)
|
303 |
|