Spaces:
Sleeping
Sleeping
Commit
·
d6817dc
1
Parent(s):
6bac6fb
Add application file
Browse files
main.py
CHANGED
|
@@ -89,10 +89,13 @@ async def transcribe_video(
|
|
| 89 |
|
| 90 |
# Transcribe the file
|
| 91 |
result_str, result_files = whisper_inf.transcribe_file(
|
| 92 |
-
|
|
|
|
|
|
|
|
|
|
| 93 |
*whisper_params.as_list() # Expand whisper_params as individual arguments
|
| 94 |
)
|
| 95 |
-
|
| 96 |
# Check if transcription was successful
|
| 97 |
if not result_files:
|
| 98 |
return JSONResponse(status_code=500, content={"message": "Transcription failed."})
|
|
|
|
| 89 |
|
| 90 |
# Transcribe the file
|
| 91 |
result_str, result_files = whisper_inf.transcribe_file(
|
| 92 |
+
files=[input_file_path],
|
| 93 |
+
input_folder_path="",
|
| 94 |
+
file_format=file_format,
|
| 95 |
+
add_timestamp=add_timestamp,
|
| 96 |
*whisper_params.as_list() # Expand whisper_params as individual arguments
|
| 97 |
)
|
| 98 |
+
|
| 99 |
# Check if transcription was successful
|
| 100 |
if not result_files:
|
| 101 |
return JSONResponse(status_code=500, content={"message": "Transcription failed."})
|