[30988f42] feat(transcription-tool): stabilize transcription with plain text parsing and add retry feature

This commit is contained in:
2026-02-16 14:35:21 +00:00
parent 1d9a3fbc39
commit 8fc401f191
9 changed files with 270 additions and 18 deletions

View File

@@ -99,6 +99,31 @@ async def upload_audio(
return meeting
@app.post("/api/meetings/{meeting_id}/retry")
def retry_meeting(
meeting_id: int,
background_tasks: BackgroundTasks,
db: Session = Depends(get_db)
):
meeting = db.query(Meeting).filter(Meeting.id == meeting_id).first()
if not meeting:
raise HTTPException(404, detail="Meeting not found")
# Check if chunks directory exists
chunk_dir = os.path.join(settings.UPLOAD_DIR, "chunks", str(meeting_id))
if not os.path.exists(chunk_dir) or not os.listdir(chunk_dir):
raise HTTPException(400, detail="Original audio chunks not found. Please re-upload.")
# Reset status
meeting.status = "QUEUED"
db.commit()
# Trigger Retry Task
from .services.orchestrator import retry_meeting_task
background_tasks.add_task(retry_meeting_task, meeting.id, SessionLocal)
return {"status": "started", "message": "Retrying transcription..."}
from pydantic import BaseModel
class InsightRequest(BaseModel):
@@ -201,9 +226,16 @@ def delete_meeting(meeting_id: int, db: Session = Depends(get_db)):
# Serve Frontend
# This must be the last route definition to avoid catching API routes
static_path = "/frontend_static"
# PRIORITY 1: Mounted Volume (Development / Live Update)
static_path = "/app/frontend/dist"
# PRIORITY 2: Built-in Image Path (Production)
if not os.path.exists(static_path):
static_path = "/frontend_static"
# PRIORITY 3: Local Development (running python directly)
if not os.path.exists(static_path):
# Fallback for local development if not in Docker
static_path = os.path.join(os.path.dirname(__file__), "../frontend/dist")
if os.path.exists(static_path):