🪻 distributed transcription service thistle.dunkirk.sh

feat: add a finalizing state

dunkirk.sh c1a25049 dc90294a

verified
Changed files
+24
src
+24
src/lib/transcription.ts
···
| "uploading"
| "processing"
| "transcribing"
| "completed"
| "failed";
···
transcript: transcript || undefined,
});
} else if (update.status === "completed") {
// Fetch and save VTT file from Murmur
const whisperJobId = this.db
.query<{ whisper_job_id: string }, [string]>(
···
);
}
this.updateTranscription(transcriptionId, {
status: "completed",
progress: 100,
···
| "uploading"
| "processing"
| "transcribing"
+
| "finalizing"
| "completed"
| "failed";
···
transcript: transcript || undefined,
});
} else if (update.status === "completed") {
+
// Set to finalizing state while we fetch and process the VTT
+
this.updateTranscription(transcriptionId, {
+
status: "finalizing",
+
progress: 100,
+
});
+
+
this.events.emit(transcriptionId, {
+
status: "finalizing",
+
progress: 100,
+
});
+
// Fetch and save VTT file from Murmur
const whisperJobId = this.db
.query<{ whisper_job_id: string }, [string]>(
···
);
}
+
// Set to finalizing state while we process
+
this.updateTranscription(transcriptionId, {
+
status: "finalizing",
+
progress: 100,
+
});
+
+
this.events.emit(transcriptionId, {
+
status: "finalizing",
+
progress: 100,
+
});
+
+
// Then immediately mark as completed
this.updateTranscription(transcriptionId, {
status: "completed",
progress: 100,