Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -63,8 +63,11 @@ def format_as_srt(transcription):
|
|
| 63 |
return ''.join(srt_output)
|
| 64 |
|
| 65 |
def process_audio(file):
|
|
|
|
|
|
|
|
|
|
| 66 |
# Transcribir el audio y generar subtítulos
|
| 67 |
-
transcription = transcribe_audio(
|
| 68 |
srt_content = format_as_srt(transcription)
|
| 69 |
|
| 70 |
# Guardar el contenido SRT en un archivo
|
|
|
|
| 63 |
return ''.join(srt_output)
|
| 64 |
|
| 65 |
def process_audio(file):
|
| 66 |
+
# Extraer el camino del archivo de audio de la tupla
|
| 67 |
+
audio_file_path = file[0] if isinstance(file, tuple) else file
|
| 68 |
+
|
| 69 |
# Transcribir el audio y generar subtítulos
|
| 70 |
+
transcription = transcribe_audio(audio_file_path)
|
| 71 |
srt_content = format_as_srt(transcription)
|
| 72 |
|
| 73 |
# Guardar el contenido SRT en un archivo
|