import { diarizeChannelAction } from "../../../channels/[slug]/whisperActions"; import { jobResponse, ops, reqSlug } from "../_lib"; export const dynamic = "force-dynamic"; // POST { slug } — the Cleanup stage's "Diarize speakers", as a job on the // channel's queue ({ ok, jobId }; --wait follows it): diarize every video of // the channel that still holds audio and has no current diarization.json, and // give an existing one its voice fingerprints from its own turns (no // re-clustering) — the voiceprint backfill, one channel at a time. Runs whether // or not the Speakers lane is paused; `lane {"lane":"backfill","speakers":"work"}` // is the whole-corpus way. export async function POST(request: Request) { return ops(request, ["slug"], async (body) => { const slug = reqSlug(body, "slug"); return jobResponse(await diarizeChannelAction(slug)); }); }