Integração: falantes + dublagem + vídeo final
- editor_api: importa dub e speakers juntos. - voice_chunks (falantes) vira a migração v15, depois da v14 do vídeo final (antes era criada fora das migrações). - dub.voice_for: qualquer voz que não é o streamer (other1, other2…) usa a segunda voz da dublagem. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,7 @@ import { CLIP_STATUS, SOURCE_LABEL, clipperCall, formatClock, formatDuration, la
|
||||
import {
|
||||
ChatSignals, ClipActions, ClipMedia, ClipVideoState, DeleteControl, FaceSignal, JudgeVerdict, TrimControl, situationLabel, type DeleteClip,
|
||||
} from "./clipper-clip-parts";
|
||||
import { isOther, speakerLabel } from "./clip-editor-model";
|
||||
import { Dialog } from "./dialog";
|
||||
import { ArrowLeftIcon, ArrowRightIcon, CheckIcon, ClockIcon } from "./icons";
|
||||
import type { PublishJob } from "./publishing-client";
|
||||
@@ -171,6 +172,8 @@ function Portuguese({ clip, pending, run }: {
|
||||
const pt = clip.judge && "pt" in clip.judge ? clip.judge.pt : undefined;
|
||||
const lines = clip.translation?.lines ?? [];
|
||||
const english = (clip.language ?? "").toLowerCase().startsWith("en");
|
||||
// Quem fala cada frase (doc/clipador/FALANTES.md): o streamer ou outra pessoa (colega no Discord, voz do jogo).
|
||||
const others = lines.some((l) => isOther(l.speaker));
|
||||
if (!english && !pt && !lines.length) return null;
|
||||
const translate = () => run("translate", () => clipperCall<Clip>(`clips/${clip.id}/translate`, "POST"), "Fala traduzida.");
|
||||
return (
|
||||
@@ -183,12 +186,19 @@ function Portuguese({ clip, pending, run }: {
|
||||
{pt?.caption && <p className="text-[0.8125rem] leading-relaxed text-fg-muted">{pt.caption}</p>}
|
||||
{lines.length > 0 ? (
|
||||
<details className="text-[0.8125rem]">
|
||||
<summary className="cursor-pointer text-fg-muted select-none hover:text-fg">O que ele fala ({lines.length} frases)</summary>
|
||||
<summary className="cursor-pointer text-fg-muted select-none hover:text-fg">
|
||||
{others ? "O que falam" : "O que ele fala"} ({lines.length} frases)
|
||||
</summary>
|
||||
<ol className="mt-2 grid gap-2">
|
||||
{lines.map((line, i) => (
|
||||
<li key={i} className="grid grid-cols-[3.25rem_minmax(0,1fr)] gap-2">
|
||||
<span className="pt-px font-mono text-[0.6875rem] text-fg-subtle tabular-nums">{formatClock(line.s - clip.startS)}</span>
|
||||
<span className="grid gap-0.5">
|
||||
<span className={cx("grid gap-0.5", isOther(line.speaker) && "border-l-2 border-info/60 pl-2")}>
|
||||
{others && (
|
||||
<span className={cx("text-[0.6875rem] font-semibold", isOther(line.speaker) ? "text-info" : "text-fg-muted")}>
|
||||
{speakerLabel(line.speaker)}
|
||||
</span>
|
||||
)}
|
||||
<span className="text-fg">{line.pt}</span>
|
||||
<span className="text-xs text-fg-subtle italic">{line.text}</span>
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user