per-campaign settings, default campaign folders, custom prompt fix
All checks were successful
Build and Push / build (push) Successful in 12m10s
All checks were successful
Build and Push / build (push) Successful in 12m10s
This commit is contained in:
@@ -84,8 +84,9 @@ def get_session(session_id: str):
|
||||
return session
|
||||
|
||||
|
||||
def _run_transcription(session_id: str, video_path: Path, audio_path: Path, transcript_path: Path):
|
||||
settings = db.get_settings()
|
||||
def _run_transcription(session_id: str, video_path: Path, audio_path: Path, transcript_path: Path, campaign_id: str | None = None):
|
||||
cid = campaign_id or "default"
|
||||
settings = db.get_campaign_settings(cid)
|
||||
|
||||
def run(progress_cb):
|
||||
db.get_conn() # ensure thread-local connection exists in this worker thread
|
||||
@@ -159,7 +160,7 @@ async def create_session(
|
||||
|
||||
audio_path = audio_dir / f"{session_id}.wav"
|
||||
transcript_path = transcript_dir / f"{session_id}.json"
|
||||
job_id = _run_transcription(session_id, video_path, audio_path, transcript_path)
|
||||
job_id = _run_transcription(session_id, video_path, audio_path, transcript_path, campaign_id)
|
||||
|
||||
return {"session_id": session_id, "job_id": job_id}
|
||||
|
||||
@@ -179,7 +180,7 @@ def retry_transcription(session_id: str):
|
||||
else:
|
||||
audio_path = config.AUDIO_DIR / f"{session_id}.wav"
|
||||
transcript_path = config.TRANSCRIPT_DIR / f"{session_id}.json"
|
||||
job_id = _run_transcription(session_id, video_path, audio_path, transcript_path)
|
||||
job_id = _run_transcription(session_id, video_path, audio_path, transcript_path, campaign_id)
|
||||
return {"job_id": job_id}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user