Upload 5 files
Browse files
api.py
CHANGED
|
@@ -142,6 +142,13 @@ def serve_character_file(video_name: str, char_id: str, filename: str):
|
|
| 142 |
|
| 143 |
return FileResponse(file_path)
|
| 144 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 145 |
def process_video_job(job_id: str):
|
| 146 |
"""
|
| 147 |
Procesa el vídeo de forma asíncrona.
|
|
|
|
| 142 |
|
| 143 |
return FileResponse(file_path)
|
| 144 |
|
| 145 |
+
@app.get("/audio/{video_name}/{filename}")
|
| 146 |
+
def serve_audio_file(video_name: str, filename: str):
|
| 147 |
+
file_path = TEMP_ROOT / video_name / "clips" / filename
|
| 148 |
+
if not file_path.exists():
|
| 149 |
+
raise HTTPException(status_code=404, detail="File not found")
|
| 150 |
+
return FileResponse(file_path)
|
| 151 |
+
|
| 152 |
def process_video_job(job_id: str):
|
| 153 |
"""
|
| 154 |
Procesa el vídeo de forma asíncrona.
|