"use client"; import { useActionState } from "react"; import type { SiteSettings } from "yt-dlp-transcript-common/lib/settings"; import { Field, SeededSelect } from "../../../components/forms/Field"; import { seedChecked } from "../../../lib/formState"; import { saveDiarizationSettingsAction } from "../../settingsActions"; import type { SaveResult } from "../../../settings/actions"; // The `diarization` block of settings.json, on /operations/diarization. // Moved off /settings by slice 3. Legend and field names verbatim. export function DiarizationSettingsForm({ initial, }: { initial: SiteSettings["diarization"]; }) { const [state, formAction, pending] = useActionState< SaveResult | undefined, FormData >(saveDiarizationSettingsAction, undefined); return (
Diarization

Who is speaking when, captured to diarization.json beside each transcript. This runs on audio, and audio is the one input here that goes away — the Clean-audio sweep deletes it once a video is transcribed. So this is a one-shot window per video: the speaker turns can be captured now or not at all, while everything built on top of them can be redone from the saved file at any time.

{state?.ok === true && ( Saved. )} {state?.ok === false && ( {state.error} )}
); }