Spaces:
Runtime error
Runtime error
Commit
·
e575f73
1
Parent(s):
01f48d7
added example, fixing subtitle
Browse files
app.py
CHANGED
@@ -38,9 +38,6 @@ def transcribe(audiofile, model, preprocesamiento):
|
|
38 |
#Archivo
|
39 |
nombre_archivo = guardar_en_archivo(out)
|
40 |
|
41 |
-
results_short = result
|
42 |
-
results_short["segments"] = results_short["segments"][0:10]
|
43 |
-
|
44 |
##########################################################################
|
45 |
#SRT
|
46 |
from pathlib import Path
|
@@ -58,6 +55,9 @@ def transcribe(audiofile, model, preprocesamiento):
|
|
58 |
srt_writer(result, file_path, writter_args)
|
59 |
###########################################################################
|
60 |
|
|
|
|
|
|
|
61 |
return audio_path, audio_normalized_path, vocal_path, novocal_path, nombre_archivo, nombre_archivo_srt, "\n".join(out), json.dumps(results_short)
|
62 |
|
63 |
def transcribeWhisperX(audiofile, model, language, preprocesamiento
|
|
|
38 |
#Archivo
|
39 |
nombre_archivo = guardar_en_archivo(out)
|
40 |
|
|
|
|
|
|
|
41 |
##########################################################################
|
42 |
#SRT
|
43 |
from pathlib import Path
|
|
|
55 |
srt_writer(result, file_path, writter_args)
|
56 |
###########################################################################
|
57 |
|
58 |
+
results_short = result
|
59 |
+
results_short["segments"] = results_short["segments"][0:10]
|
60 |
+
|
61 |
return audio_path, audio_normalized_path, vocal_path, novocal_path, nombre_archivo, nombre_archivo_srt, "\n".join(out), json.dumps(results_short)
|
62 |
|
63 |
def transcribeWhisperX(audiofile, model, language, preprocesamiento
|