@clipwright/core 0.33.0 → 0.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +251 -0
- package/README.md +3 -1
- package/dist/account-actors.d.ts +173 -14
- package/dist/account-actors.js +142 -10
- package/dist/account-actors.js.map +1 -1
- package/dist/actor-bounds.d.ts +4 -0
- package/dist/actor-bounds.js +4 -0
- package/dist/actor-bounds.js.map +1 -1
- package/dist/actors.d.ts +31 -0
- package/dist/actors.js +26 -0
- package/dist/actors.js.map +1 -1
- package/dist/api-failure.js +2 -1
- package/dist/api-failure.js.map +1 -1
- package/dist/asset-identity.d.ts +6 -0
- package/dist/asset-identity.js +7 -0
- package/dist/asset-identity.js.map +1 -0
- package/dist/assets.d.ts +403 -8
- package/dist/assets.js +132 -22
- package/dist/assets.js.map +1 -1
- package/dist/billing-terms.d.ts +69 -0
- package/dist/billing-terms.js +8 -0
- package/dist/billing-terms.js.map +1 -1
- package/dist/caption-language.d.ts +2 -0
- package/dist/caption-language.js +17 -0
- package/dist/caption-language.js.map +1 -0
- package/dist/contract-dispositions.d.ts +1617 -8
- package/dist/contract-dispositions.js +75 -11
- package/dist/contract-dispositions.js.map +1 -1
- package/dist/contracts/v1/workflow-brief.d.ts +3166 -78
- package/dist/contracts/v1/workflow-brief.js +4 -0
- package/dist/contracts/v1/workflow-brief.js.map +1 -1
- package/dist/contracts/v1/workflow-catalog.d.ts +3712 -8
- package/dist/contracts/v1/workflow-catalog.js +4 -2
- package/dist/contracts/v1/workflow-catalog.js.map +1 -1
- package/dist/contracts/v1/workflow-client.d.ts +2466 -4
- package/dist/contracts/v1/workflow-client.js +6 -3
- package/dist/contracts/v1/workflow-client.js.map +1 -1
- package/dist/contracts/v1/workflow-execution.d.ts +163 -9
- package/dist/contracts/v1/workflow-execution.js +15 -7
- package/dist/contracts/v1/workflow-execution.js.map +1 -1
- package/dist/contracts/v1/workflow-plan.d.ts +6014 -487
- package/dist/contracts/v1/workflow-primitives.d.ts +3 -1
- package/dist/contracts/v1/workflow-primitives.js +1 -1
- package/dist/contracts/v1/workflow-primitives.js.map +1 -1
- package/dist/contracts/v1/workflow-run-read.d.ts +114 -1
- package/dist/edit-billing.d.ts +12 -0
- package/dist/edit-billing.js +8 -0
- package/dist/edit-billing.js.map +1 -1
- package/dist/edit-long-form.d.ts +1 -1
- package/dist/edit-long-form.js +12 -2
- package/dist/edit-long-form.js.map +1 -1
- package/dist/endpoint-notes.d.ts +3 -0
- package/dist/endpoint-notes.js +66 -0
- package/dist/endpoint-notes.js.map +1 -0
- package/dist/endpoints.d.ts +4 -0
- package/dist/endpoints.js +15 -0
- package/dist/endpoints.js.map +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.js +7 -0
- package/dist/errors.js.map +1 -1
- package/dist/face-billing.d.ts +55 -0
- package/dist/face-billing.js +22 -0
- package/dist/face-billing.js.map +1 -1
- package/dist/faceless-price.d.ts +26 -2
- package/dist/faceless-price.js +33 -6
- package/dist/faceless-price.js.map +1 -1
- package/dist/faceless-public.d.ts +6 -1
- package/dist/faceless-public.js +2 -2
- package/dist/faceless-public.js.map +1 -1
- package/dist/generations.d.ts +32 -6
- package/dist/generations.js +82 -27
- package/dist/generations.js.map +1 -1
- package/dist/idempotency.d.ts +2 -0
- package/dist/idempotency.js +7 -4
- package/dist/idempotency.js.map +1 -1
- package/dist/index.d.ts +15 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -1
- package/dist/long-form-pricing.d.ts +7 -4
- package/dist/long-form-pricing.js +13 -10
- package/dist/long-form-pricing.js.map +1 -1
- package/dist/long-form-revision.js +1 -1
- package/dist/long-form-revision.js.map +1 -1
- package/dist/openapi.d.ts +154 -0
- package/dist/openapi.js +334 -0
- package/dist/openapi.js.map +1 -0
- package/dist/pacing.d.ts +15 -0
- package/dist/pacing.js +30 -0
- package/dist/pacing.js.map +1 -1
- package/dist/parts-pricing.d.ts +84 -0
- package/dist/parts-pricing.js +105 -0
- package/dist/parts-pricing.js.map +1 -0
- package/dist/presenter-beats.d.ts +45 -0
- package/dist/presenter-beats.js +144 -0
- package/dist/presenter-beats.js.map +1 -0
- package/dist/prices.d.ts +98 -0
- package/dist/prices.js +189 -0
- package/dist/prices.js.map +1 -0
- package/dist/public-endpoints.d.ts +2 -0
- package/dist/public-endpoints.js +2 -0
- package/dist/public-endpoints.js.map +1 -1
- package/dist/public-responses.d.ts +23 -0
- package/dist/public-responses.js +11 -0
- package/dist/public-responses.js.map +1 -0
- package/dist/reference-analysis.d.ts +683 -0
- package/dist/reference-analysis.js +91 -0
- package/dist/reference-analysis.js.map +1 -0
- package/dist/reference-kinds.d.ts +6 -0
- package/dist/reference-kinds.js +8 -0
- package/dist/reference-kinds.js.map +1 -0
- package/dist/reference-profile.d.ts +633 -0
- package/dist/reference-profile.js +151 -0
- package/dist/reference-profile.js.map +1 -0
- package/dist/reference-staging.d.ts +571 -0
- package/dist/reference-staging.js +151 -0
- package/dist/reference-staging.js.map +1 -0
- package/dist/reference-voice.d.ts +305 -0
- package/dist/reference-voice.js +108 -0
- package/dist/reference-voice.js.map +1 -0
- package/dist/resolved-timeline.d.ts +206 -1
- package/dist/resolved-timeline.js +96 -4
- package/dist/resolved-timeline.js.map +1 -1
- package/dist/run-static-warnings.js +19 -7
- package/dist/run-static-warnings.js.map +1 -1
- package/dist/runs.d.ts +75 -3
- package/dist/runs.js +6 -1
- package/dist/runs.js.map +1 -1
- package/dist/semantic-inserts.d.ts +7 -0
- package/dist/semantic-inserts.js +19 -9
- package/dist/semantic-inserts.js.map +1 -1
- package/dist/skills.d.ts +5838 -22
- package/dist/skills.js +380 -25
- package/dist/skills.js.map +1 -1
- package/dist/templates/callout.d.ts +34 -0
- package/dist/templates/callout.js +51 -0
- package/dist/templates/callout.js.map +1 -0
- package/dist/templates/checklist.d.ts +42 -0
- package/dist/templates/checklist.js +47 -0
- package/dist/templates/checklist.js.map +1 -0
- package/dist/templates/compare.d.ts +26 -0
- package/dist/templates/compare.js +35 -0
- package/dist/templates/compare.js.map +1 -0
- package/dist/templates/end-card.d.ts +16 -0
- package/dist/templates/end-card.js +25 -0
- package/dist/templates/end-card.js.map +1 -0
- package/dist/templates/index.d.ts +171 -0
- package/dist/templates/index.js +394 -0
- package/dist/templates/index.js.map +1 -0
- package/dist/templates/lower-third.d.ts +18 -0
- package/dist/templates/lower-third.js +26 -0
- package/dist/templates/lower-third.js.map +1 -0
- package/dist/templates/notification.d.ts +30 -0
- package/dist/templates/notification.js +32 -0
- package/dist/templates/notification.js.map +1 -0
- package/dist/templates/phone-call.d.ts +27 -0
- package/dist/templates/phone-call.js +43 -0
- package/dist/templates/phone-call.js.map +1 -0
- package/dist/templates/progress.d.ts +22 -0
- package/dist/templates/progress.js +42 -0
- package/dist/templates/progress.js.map +1 -0
- package/dist/templates/quote.d.ts +21 -0
- package/dist/templates/quote.js +29 -0
- package/dist/templates/quote.js.map +1 -0
- package/dist/templates/rating.d.ts +22 -0
- package/dist/templates/rating.js +29 -0
- package/dist/templates/rating.js.map +1 -0
- package/dist/templates/size.d.ts +13 -0
- package/dist/templates/size.js +10 -0
- package/dist/templates/size.js.map +1 -0
- package/dist/templates/slot.d.ts +10 -0
- package/dist/templates/slot.js +5 -0
- package/dist/templates/slot.js.map +1 -0
- package/dist/templates/sounds.d.ts +701 -0
- package/dist/templates/sounds.js +89 -0
- package/dist/templates/sounds.js.map +1 -0
- package/dist/templates/stat.d.ts +20 -0
- package/dist/templates/stat.js +33 -0
- package/dist/templates/stat.js.map +1 -0
- package/dist/templates/tag.d.ts +23 -0
- package/dist/templates/tag.js +31 -0
- package/dist/templates/tag.js.map +1 -0
- package/dist/templates/theme.d.ts +29 -0
- package/dist/templates/theme.js +47 -0
- package/dist/templates/theme.js.map +1 -0
- package/dist/templates/title-card.d.ts +21 -0
- package/dist/templates/title-card.js +30 -0
- package/dist/templates/title-card.js.map +1 -0
- package/dist/tts-backend.d.ts +9 -0
- package/dist/tts-backend.js +21 -0
- package/dist/tts-backend.js.map +1 -1
- package/dist/ugc-call.d.ts +89 -0
- package/dist/ugc-call.js +111 -0
- package/dist/ugc-call.js.map +1 -0
- package/dist/ugc-framing.d.ts +26 -0
- package/dist/ugc-framing.js +64 -0
- package/dist/ugc-framing.js.map +1 -0
- package/dist/ugc-layers.d.ts +88 -0
- package/dist/ugc-layers.js +142 -0
- package/dist/ugc-layers.js.map +1 -0
- package/dist/ugc-video-media.d.ts +12 -0
- package/dist/ugc-video-media.js +39 -0
- package/dist/ugc-video-media.js.map +1 -0
- package/dist/vendor-response.d.ts +4 -0
- package/dist/vendor-response.js +12 -0
- package/dist/vendor-response.js.map +1 -1
- package/dist/voice-admission.d.ts +1244 -1
- package/dist/voice-listing.js +7 -1
- package/dist/voice-listing.js.map +1 -1
- package/dist/voice-pace.d.ts +34 -0
- package/dist/voice-pace.generated.json +72 -0
- package/dist/voice-pace.js +34 -0
- package/dist/voice-pace.js.map +1 -0
- package/dist/voices.d.ts +21 -8
- package/dist/voices.js +44 -19
- package/dist/voices.js.map +1 -1
- package/dist/workflows/catalog.js +2 -1
- package/dist/workflows/catalog.js.map +1 -1
- package/dist/workflows/index.d.ts +2 -0
- package/dist/workflows/index.js +2 -0
- package/dist/workflows/index.js.map +1 -1
- package/dist/workflows/methods/faceless-explainer.d.ts +697 -3
- package/dist/workflows/methods/kinetic-launch.d.ts +697 -3
- package/dist/workflows/methods/product-image-story.d.ts +697 -3
- package/dist/workflows/methods/reference-remake.d.ts +870 -0
- package/dist/workflows/methods/reference-remake.js +26 -0
- package/dist/workflows/methods/reference-remake.js.map +1 -0
- package/dist/workflows/methods/shared.d.ts +697 -3
- package/dist/workflows/methods/ugc-faq-answer.d.ts +697 -3
- package/dist/workflows/methods/ugc-product-intro.d.ts +697 -3
- package/dist/workflows/methods/website-proof-demo.d.ts +697 -3
- package/dist/workflows/reference-remake.d.ts +663 -0
- package/dist/workflows/reference-remake.js +598 -0
- package/dist/workflows/reference-remake.js.map +1 -0
- package/dist/workflows/validate.js +19 -11
- package/dist/workflows/validate.js.map +1 -1
- package/package.json +9 -3
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { REFERENCE_SOURCE_KINDS } from "./reference-kinds.js";
|
|
3
|
+
// Staging measured from a reference (#914 D1): each element's place, entry, exit, layer and motion, and each freeze's pose. Every number names the
|
|
4
|
+
// method that produced it; an absent field was not measured and `analysis.warnings` says why. Words come from closed lists, never the reference.
|
|
5
|
+
export const REFERENCE_STAGING_VERSION = "reference-staging-v1";
|
|
6
|
+
export const STAGING_METHODS = ["cv-cells/v1", "cv-template/v1", "cv-parallax/v1", "cv-before-after/v1", "yunet-native/v1", "vision-video",
|
|
7
|
+
"vision-still"];
|
|
8
|
+
export const STAGING_ANCHOR_KINDS = ["cut", "flash", "freeze_start", "freeze_end", "beat"];
|
|
9
|
+
export const STAGING_ENTRY_STYLES = ["pop", "fade", "blur_in", "slide", "scale_up", "tilt_in", "typewriter", "wipe", "unknown"];
|
|
10
|
+
export const STAGING_EXIT_STYLES = [...STAGING_ENTRY_STYLES, "cut", "flash"];
|
|
11
|
+
export const STAGING_SIDES = ["left", "right", "top", "bottom", "lower_left", "lower_right", "upper_left", "upper_right", "none"];
|
|
12
|
+
export const STAGING_LAYERS = ["in_front_of_presenter", "behind_presenter", "no_overlap", "presenter_absent", "unknown"];
|
|
13
|
+
export const STAGING_COVERS = ["hair", "face", "shoulder", "hand", "body", "chair", "microphone", "desk", "other"];
|
|
14
|
+
export const STAGING_MOTIONS = ["static", "float", "drift", "scale", "moves_with_frame", "pushed"];
|
|
15
|
+
export const STAGING_GAZES = ["camera", "up_left", "up_right", "left", "right", "down", "element", "closed"];
|
|
16
|
+
/** The image side the top of the head leans to; a roll within ±5° is upright. */
|
|
17
|
+
export const STAGING_HEAD_ROLLS = ["left", "right", "upright"];
|
|
18
|
+
export const STAGING_EXPRESSIONS = ["neutral", "smile", "surprised", "thinking", "other"];
|
|
19
|
+
export const STAGING_HANDS = ["at_chest", "gesturing", "out_of_frame", "other"];
|
|
20
|
+
export const STAGING_FREEZE_ENDS = ["cut", "flash", "unfreeze", "end"];
|
|
21
|
+
const frac = z.number().min(0).max(1);
|
|
22
|
+
const seconds = z.number().min(0);
|
|
23
|
+
const anchorId = z.string().regex(new RegExp(`^(${STAGING_ANCHOR_KINDS.join("|")})#\\d+$`));
|
|
24
|
+
const method = z.enum(STAGING_METHODS);
|
|
25
|
+
export const stagingRect = z.strictObject({ left: frac, top: frac, width: frac, height: frac });
|
|
26
|
+
/** A rect in face units: origin the face centre, unit the face height in pixels, so x and y share one scale. */
|
|
27
|
+
const faceUnits = z.number().min(-20).max(20);
|
|
28
|
+
export const stagingFaceRect = z.strictObject({ left: faceUnits, top: faceUnits, width: z.number().positive().max(20), height: z.number().positive().max(20) });
|
|
29
|
+
/** A moment named by its anchor: the nearest anchor on a side is never used, because it moves when the edit does. */
|
|
30
|
+
export const stagingAnchorRef = z.strictObject({ id: anchorId, offset_s: z.number() });
|
|
31
|
+
const entry = z.strictObject({
|
|
32
|
+
first_visible_s: seconds, settled_s: seconds, anchors: z.array(stagingAnchorRef).max(3),
|
|
33
|
+
style: z.enum(STAGING_ENTRY_STYLES), from: z.enum(STAGING_SIDES), duration_s: seconds,
|
|
34
|
+
displacement: z.tuple([z.number(), z.number()]).describe("Settled minus first position, in shares of width and height."),
|
|
35
|
+
scale_from: z.number().positive().optional(), method,
|
|
36
|
+
}).partial();
|
|
37
|
+
const exit = z.strictObject({
|
|
38
|
+
last_visible_s: seconds, anchors: z.array(stagingAnchorRef).max(3), style: z.enum(STAGING_EXIT_STYLES), to: z.enum(STAGING_SIDES),
|
|
39
|
+
duration_s: seconds, displacement: z.tuple([z.number(), z.number()]), method,
|
|
40
|
+
}).partial();
|
|
41
|
+
export const stagingElement = z.strictObject({
|
|
42
|
+
id: z.string().regex(/^[a-z0-9_]{1,24}$/),
|
|
43
|
+
beat_index: z.number().int().min(0),
|
|
44
|
+
graphic_index: z.number().int().min(0).nullable().describe("Its graphic in beats[beat_index].graphics; null when the beat pass missed it."),
|
|
45
|
+
kind: z.enum(REFERENCE_SOURCE_KINDS),
|
|
46
|
+
rect_hold: stagingRect.optional(),
|
|
47
|
+
rect_hold_face: stagingFaceRect.optional(),
|
|
48
|
+
rect_method: method.optional(),
|
|
49
|
+
rects: z.array(z.strictObject({ t_s: seconds, rect: stagingRect, visible: frac })).max(60).optional(),
|
|
50
|
+
entry: entry.optional(),
|
|
51
|
+
exit: exit.optional(),
|
|
52
|
+
layer: z.strictObject({
|
|
53
|
+
value: z.enum(STAGING_LAYERS), method,
|
|
54
|
+
covered_by: z.array(z.enum(STAGING_COVERS)).max(6),
|
|
55
|
+
face_clear: z.boolean().optional().describe("The face core stays clear in every measured frame of the element's life."),
|
|
56
|
+
face_core_cover_max: frac.optional().describe("The largest share of the face core the element covers in any measured frame."),
|
|
57
|
+
face_covered_share: frac.optional().describe("The share of measured frames in which the element covers the face core."),
|
|
58
|
+
blurs_presenter: z.boolean().optional(),
|
|
59
|
+
}).optional(),
|
|
60
|
+
motion: z.strictObject({
|
|
61
|
+
kind: z.enum(STAGING_MOTIONS), drift_per_s: z.tuple([z.number(), z.number()]).optional(), scale_per_s: z.number().optional(),
|
|
62
|
+
wobble: z.strictObject({ amplitude: frac, period_s: seconds }).optional(),
|
|
63
|
+
}).partial().optional(),
|
|
64
|
+
});
|
|
65
|
+
export const stagingFreeze = z.strictObject({
|
|
66
|
+
start_s: seconds, end_s: seconds, anchors: z.array(stagingAnchorRef).max(3),
|
|
67
|
+
face_box_start: stagingRect, face_box_end: stagingRect,
|
|
68
|
+
roll_deg: z.number().min(-90).max(90), yaw: z.number().min(-3).max(3), pitch: z.number().min(0).max(3),
|
|
69
|
+
gaze: z.enum(STAGING_GAZES).optional(), head_roll: z.enum(STAGING_HEAD_ROLLS),
|
|
70
|
+
expression: z.enum(STAGING_EXPRESSIONS).optional(), hands: z.enum(STAGING_HANDS).optional(),
|
|
71
|
+
frame_motion: z.strictObject({ scale_end: z.number().positive().max(4), centre_shift: z.tuple([z.number(), z.number()]) }).optional(),
|
|
72
|
+
ends_with: z.enum(STAGING_FREEZE_ENDS),
|
|
73
|
+
});
|
|
74
|
+
export const referenceStaging = z.strictObject({
|
|
75
|
+
version: z.literal(REFERENCE_STAGING_VERSION),
|
|
76
|
+
analysis_width: z.number().int().positive(),
|
|
77
|
+
anchors: z.array(z.strictObject({ id: anchorId, t_s: seconds })).max(80),
|
|
78
|
+
elements: z.array(stagingElement).max(40),
|
|
79
|
+
freezes: z.array(stagingFreeze).max(8),
|
|
80
|
+
});
|
|
81
|
+
/** Cross-field checks a profile runs on its staging: the beats and graphics it names exist, its anchors exist, and its times are ordered. */
|
|
82
|
+
export function stagingIssues(staging, beats, duration) {
|
|
83
|
+
const out = [];
|
|
84
|
+
const ids = new Set();
|
|
85
|
+
staging.anchors.forEach((anchor, index) => {
|
|
86
|
+
if (ids.has(anchor.id))
|
|
87
|
+
out.push({ path: ["anchors", index, "id"], message: `${anchor.id} is named twice` });
|
|
88
|
+
ids.add(anchor.id);
|
|
89
|
+
if (anchor.t_s > duration)
|
|
90
|
+
out.push({ path: ["anchors", index, "t_s"], message: `lies past the source's ${duration} s` });
|
|
91
|
+
});
|
|
92
|
+
const refs = (path, list) => list?.forEach((ref, index) => {
|
|
93
|
+
if (!ids.has(ref.id))
|
|
94
|
+
out.push({ path: [...path, index, "id"], message: `${ref.id} is not in staging.anchors` });
|
|
95
|
+
});
|
|
96
|
+
const ordered = (path, times) => {
|
|
97
|
+
const known = times.filter((entry) => entry[1] !== undefined);
|
|
98
|
+
known.forEach(([field, t], index) => {
|
|
99
|
+
if (t > duration)
|
|
100
|
+
out.push({ path: [...path, field], message: `lies past the source's ${duration} s` });
|
|
101
|
+
const before = known[index - 1];
|
|
102
|
+
if (before && t < before[1])
|
|
103
|
+
out.push({ path: [...path, field], message: `comes before ${before[0]}` });
|
|
104
|
+
});
|
|
105
|
+
};
|
|
106
|
+
staging.elements.forEach((element, index) => {
|
|
107
|
+
const path = ["elements", index];
|
|
108
|
+
const beat = beats[element.beat_index];
|
|
109
|
+
if (!beat)
|
|
110
|
+
out.push({ path: [...path, "beat_index"], message: `there are ${beats.length} beats` });
|
|
111
|
+
else if (element.graphic_index !== null && element.graphic_index >= beat.graphics.length) {
|
|
112
|
+
out.push({ path: [...path, "graphic_index"], message: `beat ${element.beat_index} has ${beat.graphics.length} graphics` });
|
|
113
|
+
}
|
|
114
|
+
refs([...path, "entry", "anchors"], element.entry?.anchors);
|
|
115
|
+
refs([...path, "exit", "anchors"], element.exit?.anchors);
|
|
116
|
+
ordered(path, [["entry.first_visible_s", element.entry?.first_visible_s], ["entry.settled_s", element.entry?.settled_s],
|
|
117
|
+
["exit.last_visible_s", element.exit?.last_visible_s]]);
|
|
118
|
+
element.rects?.forEach((sample, at) => { if (sample.t_s > duration)
|
|
119
|
+
out.push({ path: [...path, "rects", at, "t_s"], message: `lies past the source's ${duration} s` }); });
|
|
120
|
+
});
|
|
121
|
+
staging.freezes.forEach((freeze, index) => {
|
|
122
|
+
refs(["freezes", index, "anchors"], freeze.anchors);
|
|
123
|
+
if (freeze.end_s <= freeze.start_s)
|
|
124
|
+
out.push({ path: ["freezes", index, "end_s"], message: "ends where or before the freeze starts" });
|
|
125
|
+
if (freeze.end_s > duration)
|
|
126
|
+
out.push({ path: ["freezes", index, "end_s"], message: `lies past the source's ${duration} s` });
|
|
127
|
+
});
|
|
128
|
+
return out;
|
|
129
|
+
}
|
|
130
|
+
/** A frame rect in face units: origin the face box's centre, unit its height in pixels (Q2: our actor does not sit where theirs does). */
|
|
131
|
+
export function faceRelativeRect(rect, face, width, height) {
|
|
132
|
+
const unit = face.height * height, cx = (face.left + face.width / 2) * width, cy = (face.top + face.height / 2) * height;
|
|
133
|
+
const round = (value) => Math.round(value * 1e4) / 1e4;
|
|
134
|
+
return { left: round((rect.left * width - cx) / unit), top: round((rect.top * height - cy) / unit), width: round((rect.width * width) / unit),
|
|
135
|
+
height: round((rect.height * height) / unit) };
|
|
136
|
+
}
|
|
137
|
+
/** Samples thinned to change points: one is kept when an edge moved more than `tolerance` since the last kept, and the last always stays. */
|
|
138
|
+
export function thinStagingRects(samples, tolerance = 0.003, max = 60) {
|
|
139
|
+
const kept = [];
|
|
140
|
+
samples.forEach((sample, index) => {
|
|
141
|
+
const last = kept.at(-1);
|
|
142
|
+
const moved = !last || ["left", "top", "width", "height"].some(edge => Math.abs(sample.rect[edge] - last.rect[edge]) > tolerance);
|
|
143
|
+
if (moved || index === samples.length - 1)
|
|
144
|
+
kept.push(sample);
|
|
145
|
+
});
|
|
146
|
+
if (kept.length <= max)
|
|
147
|
+
return kept;
|
|
148
|
+
const step = (kept.length - 1) / (max - 1);
|
|
149
|
+
return Array.from({ length: max }, (_, index) => kept[Math.round(index * step)]);
|
|
150
|
+
}
|
|
151
|
+
//# sourceMappingURL=reference-staging.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reference-staging.js","sourceRoot":"","sources":["../src/reference-staging.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,mJAAmJ;AACnJ,iJAAiJ;AAEjJ,MAAM,CAAC,MAAM,yBAAyB,GAAG,sBAAsB,CAAC;AAChE,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,cAAc;IACxI,cAAc,CAAU,CAAC;AAC3B,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,CAAU,CAAC;AACpG,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,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AE,CAAC,CAAC,CAAC,CAAC,CAAC;QACzB,MAAM,KAAK,GAAG,CAAC,IAAI,IAAK,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;QAC7I,IAAI,KAAK,IAAI,KAAK,KAAK,OAAO,CAAC,MAAM,GAAG,CAAC;YAAE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC/D,CAAC,CAAC,CAAC;IACH,IAAI,IAAI,CAAC,MAAM,IAAI,GAAG;QAAE,OAAO,IAAI,CAAC;IACpC,MAAM,IAAI,GAAG,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;IAC3C,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,CAAE,CAAC,CAAC;AACpF,CAAC"}
|
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const REFERENCE_VOICE_VERSION = "voice-profile-v1";
|
|
3
|
+
export declare const REFERENCE_VOICE_WARNINGS: readonly ["no_sentence_terminal_punctuation_pace_uses_turn_spans", "background_music_present_f0_and_intensity_may_be_contaminated"];
|
|
4
|
+
export declare const MAX_REFERENCE_VOICE_SPEAKERS = 6;
|
|
5
|
+
/** Words per second of our English default (eleven_v4) at speed 1 on the reference reel's text, measured 25.10 (tone-reel-atoms.md). */
|
|
6
|
+
export declare const NARRATION_BASELINE_WPS = 2.54;
|
|
7
|
+
/** ElevenLabs' speed range; make_ugc's voice_pace accepts the same. */
|
|
8
|
+
export declare const VOICE_PACE_MIN = 0.7;
|
|
9
|
+
export declare const VOICE_PACE_MAX = 1.2;
|
|
10
|
+
/** No trimmed pause gets shorter than this, whatever the reference measured. */
|
|
11
|
+
export declare const PAUSE_TRIM_FLOOR_S = 0.05;
|
|
12
|
+
/** The longest target make_ugc takes; a reference pause above it is compiled to it, with a plan note. */
|
|
13
|
+
export declare const PAUSE_TRIM_CEILING_S = 2;
|
|
14
|
+
/** make_ugc's opt-in: per gap class, the length a longer pause is cut down to; quiet audio only, a joint that would click is kept. */
|
|
15
|
+
export declare const pauseTrim: z.ZodObject<{
|
|
16
|
+
sentence_end_s: z.ZodOptional<z.ZodNumber>;
|
|
17
|
+
comma_s: z.ZodOptional<z.ZodNumber>;
|
|
18
|
+
mid_phrase_s: z.ZodOptional<z.ZodNumber>;
|
|
19
|
+
}, z.core.$strict>;
|
|
20
|
+
export type PauseTrimTargets = z.infer<typeof pauseTrim>;
|
|
21
|
+
declare const referenceVoiceSpeaker: z.ZodObject<{
|
|
22
|
+
speaker: z.ZodString;
|
|
23
|
+
word_count: z.ZodNumber;
|
|
24
|
+
sentence_count: z.ZodNumber;
|
|
25
|
+
pace: z.ZodObject<{
|
|
26
|
+
status: z.ZodEnum<{
|
|
27
|
+
measured: "measured";
|
|
28
|
+
unmeasured: "unmeasured";
|
|
29
|
+
}>;
|
|
30
|
+
words_per_second: z.ZodNullable<z.ZodNumber>;
|
|
31
|
+
basis: z.ZodEnum<{
|
|
32
|
+
sentence_spans: "sentence_spans";
|
|
33
|
+
turn_spans: "turn_spans";
|
|
34
|
+
}>;
|
|
35
|
+
}, z.core.$strict>;
|
|
36
|
+
pauses: z.ZodObject<{
|
|
37
|
+
sentence_end: z.ZodObject<{
|
|
38
|
+
timestamp: z.ZodObject<{
|
|
39
|
+
count: z.ZodNumber;
|
|
40
|
+
median_s: z.ZodNullable<z.ZodNumber>;
|
|
41
|
+
p90_s: z.ZodNullable<z.ZodNumber>;
|
|
42
|
+
count_ge150ms: z.ZodNumber;
|
|
43
|
+
}, z.core.$strict>;
|
|
44
|
+
acoustic_pause: z.ZodObject<{
|
|
45
|
+
count: z.ZodNumber;
|
|
46
|
+
median_s: z.ZodNullable<z.ZodNumber>;
|
|
47
|
+
p90_s: z.ZodNullable<z.ZodNumber>;
|
|
48
|
+
count_ge150ms: z.ZodNumber;
|
|
49
|
+
}, z.core.$strict>;
|
|
50
|
+
cut_safe: z.ZodObject<{
|
|
51
|
+
count: z.ZodNumber;
|
|
52
|
+
median_s: z.ZodNullable<z.ZodNumber>;
|
|
53
|
+
p90_s: z.ZodNullable<z.ZodNumber>;
|
|
54
|
+
count_ge150ms: z.ZodNumber;
|
|
55
|
+
}, z.core.$strict>;
|
|
56
|
+
acoustic_no_dip_count: z.ZodNumber;
|
|
57
|
+
acoustic_unconfirmed_count: z.ZodNumber;
|
|
58
|
+
}, z.core.$strict>;
|
|
59
|
+
comma: z.ZodObject<{
|
|
60
|
+
timestamp: z.ZodObject<{
|
|
61
|
+
count: z.ZodNumber;
|
|
62
|
+
median_s: z.ZodNullable<z.ZodNumber>;
|
|
63
|
+
p90_s: z.ZodNullable<z.ZodNumber>;
|
|
64
|
+
count_ge150ms: z.ZodNumber;
|
|
65
|
+
}, z.core.$strict>;
|
|
66
|
+
acoustic_pause: z.ZodObject<{
|
|
67
|
+
count: z.ZodNumber;
|
|
68
|
+
median_s: z.ZodNullable<z.ZodNumber>;
|
|
69
|
+
p90_s: z.ZodNullable<z.ZodNumber>;
|
|
70
|
+
count_ge150ms: z.ZodNumber;
|
|
71
|
+
}, z.core.$strict>;
|
|
72
|
+
cut_safe: z.ZodObject<{
|
|
73
|
+
count: z.ZodNumber;
|
|
74
|
+
median_s: z.ZodNullable<z.ZodNumber>;
|
|
75
|
+
p90_s: z.ZodNullable<z.ZodNumber>;
|
|
76
|
+
count_ge150ms: z.ZodNumber;
|
|
77
|
+
}, z.core.$strict>;
|
|
78
|
+
acoustic_no_dip_count: z.ZodNumber;
|
|
79
|
+
acoustic_unconfirmed_count: z.ZodNumber;
|
|
80
|
+
}, z.core.$strict>;
|
|
81
|
+
mid_phrase: z.ZodObject<{
|
|
82
|
+
timestamp: z.ZodObject<{
|
|
83
|
+
count: z.ZodNumber;
|
|
84
|
+
median_s: z.ZodNullable<z.ZodNumber>;
|
|
85
|
+
p90_s: z.ZodNullable<z.ZodNumber>;
|
|
86
|
+
count_ge150ms: z.ZodNumber;
|
|
87
|
+
}, z.core.$strict>;
|
|
88
|
+
acoustic_pause: z.ZodObject<{
|
|
89
|
+
count: z.ZodNumber;
|
|
90
|
+
median_s: z.ZodNullable<z.ZodNumber>;
|
|
91
|
+
p90_s: z.ZodNullable<z.ZodNumber>;
|
|
92
|
+
count_ge150ms: z.ZodNumber;
|
|
93
|
+
}, z.core.$strict>;
|
|
94
|
+
cut_safe: z.ZodObject<{
|
|
95
|
+
count: z.ZodNumber;
|
|
96
|
+
median_s: z.ZodNullable<z.ZodNumber>;
|
|
97
|
+
p90_s: z.ZodNullable<z.ZodNumber>;
|
|
98
|
+
count_ge150ms: z.ZodNumber;
|
|
99
|
+
}, z.core.$strict>;
|
|
100
|
+
acoustic_no_dip_count: z.ZodNumber;
|
|
101
|
+
acoustic_unconfirmed_count: z.ZodNumber;
|
|
102
|
+
}, z.core.$strict>;
|
|
103
|
+
}, z.core.$strict>;
|
|
104
|
+
long_pause_count: z.ZodNumber;
|
|
105
|
+
hinge: z.ZodObject<{
|
|
106
|
+
status: z.ZodEnum<{
|
|
107
|
+
measured: "measured";
|
|
108
|
+
not_evaluated: "not_evaluated";
|
|
109
|
+
}>;
|
|
110
|
+
sentence_share: z.ZodNullable<z.ZodNumber>;
|
|
111
|
+
evaluated_sentences: z.ZodNumber;
|
|
112
|
+
coverage: z.ZodNullable<z.ZodNumber>;
|
|
113
|
+
timestamp_sentence_share: z.ZodNullable<z.ZodNumber>;
|
|
114
|
+
median_position: z.ZodNullable<z.ZodNumber>;
|
|
115
|
+
median_seconds: z.ZodNullable<z.ZodNumber>;
|
|
116
|
+
}, z.core.$strict>;
|
|
117
|
+
pitch: z.ZodObject<{
|
|
118
|
+
status: z.ZodEnum<{
|
|
119
|
+
measured: "measured";
|
|
120
|
+
no_voiced_frames: "no_voiced_frames";
|
|
121
|
+
}>;
|
|
122
|
+
ceiling_hz: z.ZodNumber;
|
|
123
|
+
ceiling_basis: z.ZodEnum<{
|
|
124
|
+
configured: "configured";
|
|
125
|
+
default: "default";
|
|
126
|
+
low_f0: "low_f0";
|
|
127
|
+
}>;
|
|
128
|
+
median_hz: z.ZodNullable<z.ZodNumber>;
|
|
129
|
+
p10_hz: z.ZodNullable<z.ZodNumber>;
|
|
130
|
+
p90_hz: z.ZodNullable<z.ZodNumber>;
|
|
131
|
+
range_st: z.ZodNullable<z.ZodNumber>;
|
|
132
|
+
voiced_frames: z.ZodNumber;
|
|
133
|
+
}, z.core.$strict>;
|
|
134
|
+
loudness: z.ZodObject<{
|
|
135
|
+
status: z.ZodEnum<{
|
|
136
|
+
measured: "measured";
|
|
137
|
+
unmeasured: "unmeasured";
|
|
138
|
+
}>;
|
|
139
|
+
range_db_p10_p90: z.ZodNullable<z.ZodNumber>;
|
|
140
|
+
}, z.core.$strict>;
|
|
141
|
+
warnings: z.ZodArray<z.ZodEnum<{
|
|
142
|
+
background_music_present_f0_and_intensity_may_be_contaminated: "background_music_present_f0_and_intensity_may_be_contaminated";
|
|
143
|
+
no_sentence_terminal_punctuation_pace_uses_turn_spans: "no_sentence_terminal_punctuation_pace_uses_turn_spans";
|
|
144
|
+
}>>;
|
|
145
|
+
}, z.core.$strict>;
|
|
146
|
+
export type ReferenceVoiceSpeaker = z.infer<typeof referenceVoiceSpeaker>;
|
|
147
|
+
export declare const referenceVoice: z.ZodObject<{
|
|
148
|
+
version: z.ZodLiteral<"voice-profile-v1">;
|
|
149
|
+
method: z.ZodObject<{
|
|
150
|
+
pause_drop_db: z.ZodNumber;
|
|
151
|
+
pause_min_run_s: z.ZodNumber;
|
|
152
|
+
cut_safe_db: z.ZodNumber;
|
|
153
|
+
pitch: z.ZodLiteral<"yin">;
|
|
154
|
+
sample_rate: z.ZodNumber;
|
|
155
|
+
}, z.core.$strict>;
|
|
156
|
+
presenter_speaker: z.ZodNullable<z.ZodString>;
|
|
157
|
+
speakers: z.ZodArray<z.ZodObject<{
|
|
158
|
+
speaker: z.ZodString;
|
|
159
|
+
word_count: z.ZodNumber;
|
|
160
|
+
sentence_count: z.ZodNumber;
|
|
161
|
+
pace: z.ZodObject<{
|
|
162
|
+
status: z.ZodEnum<{
|
|
163
|
+
measured: "measured";
|
|
164
|
+
unmeasured: "unmeasured";
|
|
165
|
+
}>;
|
|
166
|
+
words_per_second: z.ZodNullable<z.ZodNumber>;
|
|
167
|
+
basis: z.ZodEnum<{
|
|
168
|
+
sentence_spans: "sentence_spans";
|
|
169
|
+
turn_spans: "turn_spans";
|
|
170
|
+
}>;
|
|
171
|
+
}, z.core.$strict>;
|
|
172
|
+
pauses: z.ZodObject<{
|
|
173
|
+
sentence_end: z.ZodObject<{
|
|
174
|
+
timestamp: z.ZodObject<{
|
|
175
|
+
count: z.ZodNumber;
|
|
176
|
+
median_s: z.ZodNullable<z.ZodNumber>;
|
|
177
|
+
p90_s: z.ZodNullable<z.ZodNumber>;
|
|
178
|
+
count_ge150ms: z.ZodNumber;
|
|
179
|
+
}, z.core.$strict>;
|
|
180
|
+
acoustic_pause: z.ZodObject<{
|
|
181
|
+
count: z.ZodNumber;
|
|
182
|
+
median_s: z.ZodNullable<z.ZodNumber>;
|
|
183
|
+
p90_s: z.ZodNullable<z.ZodNumber>;
|
|
184
|
+
count_ge150ms: z.ZodNumber;
|
|
185
|
+
}, z.core.$strict>;
|
|
186
|
+
cut_safe: z.ZodObject<{
|
|
187
|
+
count: z.ZodNumber;
|
|
188
|
+
median_s: z.ZodNullable<z.ZodNumber>;
|
|
189
|
+
p90_s: z.ZodNullable<z.ZodNumber>;
|
|
190
|
+
count_ge150ms: z.ZodNumber;
|
|
191
|
+
}, z.core.$strict>;
|
|
192
|
+
acoustic_no_dip_count: z.ZodNumber;
|
|
193
|
+
acoustic_unconfirmed_count: z.ZodNumber;
|
|
194
|
+
}, z.core.$strict>;
|
|
195
|
+
comma: z.ZodObject<{
|
|
196
|
+
timestamp: z.ZodObject<{
|
|
197
|
+
count: z.ZodNumber;
|
|
198
|
+
median_s: z.ZodNullable<z.ZodNumber>;
|
|
199
|
+
p90_s: z.ZodNullable<z.ZodNumber>;
|
|
200
|
+
count_ge150ms: z.ZodNumber;
|
|
201
|
+
}, z.core.$strict>;
|
|
202
|
+
acoustic_pause: z.ZodObject<{
|
|
203
|
+
count: z.ZodNumber;
|
|
204
|
+
median_s: z.ZodNullable<z.ZodNumber>;
|
|
205
|
+
p90_s: z.ZodNullable<z.ZodNumber>;
|
|
206
|
+
count_ge150ms: z.ZodNumber;
|
|
207
|
+
}, z.core.$strict>;
|
|
208
|
+
cut_safe: z.ZodObject<{
|
|
209
|
+
count: z.ZodNumber;
|
|
210
|
+
median_s: z.ZodNullable<z.ZodNumber>;
|
|
211
|
+
p90_s: z.ZodNullable<z.ZodNumber>;
|
|
212
|
+
count_ge150ms: z.ZodNumber;
|
|
213
|
+
}, z.core.$strict>;
|
|
214
|
+
acoustic_no_dip_count: z.ZodNumber;
|
|
215
|
+
acoustic_unconfirmed_count: z.ZodNumber;
|
|
216
|
+
}, z.core.$strict>;
|
|
217
|
+
mid_phrase: z.ZodObject<{
|
|
218
|
+
timestamp: z.ZodObject<{
|
|
219
|
+
count: z.ZodNumber;
|
|
220
|
+
median_s: z.ZodNullable<z.ZodNumber>;
|
|
221
|
+
p90_s: z.ZodNullable<z.ZodNumber>;
|
|
222
|
+
count_ge150ms: z.ZodNumber;
|
|
223
|
+
}, z.core.$strict>;
|
|
224
|
+
acoustic_pause: z.ZodObject<{
|
|
225
|
+
count: z.ZodNumber;
|
|
226
|
+
median_s: z.ZodNullable<z.ZodNumber>;
|
|
227
|
+
p90_s: z.ZodNullable<z.ZodNumber>;
|
|
228
|
+
count_ge150ms: z.ZodNumber;
|
|
229
|
+
}, z.core.$strict>;
|
|
230
|
+
cut_safe: z.ZodObject<{
|
|
231
|
+
count: z.ZodNumber;
|
|
232
|
+
median_s: z.ZodNullable<z.ZodNumber>;
|
|
233
|
+
p90_s: z.ZodNullable<z.ZodNumber>;
|
|
234
|
+
count_ge150ms: z.ZodNumber;
|
|
235
|
+
}, z.core.$strict>;
|
|
236
|
+
acoustic_no_dip_count: z.ZodNumber;
|
|
237
|
+
acoustic_unconfirmed_count: z.ZodNumber;
|
|
238
|
+
}, z.core.$strict>;
|
|
239
|
+
}, z.core.$strict>;
|
|
240
|
+
long_pause_count: z.ZodNumber;
|
|
241
|
+
hinge: z.ZodObject<{
|
|
242
|
+
status: z.ZodEnum<{
|
|
243
|
+
measured: "measured";
|
|
244
|
+
not_evaluated: "not_evaluated";
|
|
245
|
+
}>;
|
|
246
|
+
sentence_share: z.ZodNullable<z.ZodNumber>;
|
|
247
|
+
evaluated_sentences: z.ZodNumber;
|
|
248
|
+
coverage: z.ZodNullable<z.ZodNumber>;
|
|
249
|
+
timestamp_sentence_share: z.ZodNullable<z.ZodNumber>;
|
|
250
|
+
median_position: z.ZodNullable<z.ZodNumber>;
|
|
251
|
+
median_seconds: z.ZodNullable<z.ZodNumber>;
|
|
252
|
+
}, z.core.$strict>;
|
|
253
|
+
pitch: z.ZodObject<{
|
|
254
|
+
status: z.ZodEnum<{
|
|
255
|
+
measured: "measured";
|
|
256
|
+
no_voiced_frames: "no_voiced_frames";
|
|
257
|
+
}>;
|
|
258
|
+
ceiling_hz: z.ZodNumber;
|
|
259
|
+
ceiling_basis: z.ZodEnum<{
|
|
260
|
+
configured: "configured";
|
|
261
|
+
default: "default";
|
|
262
|
+
low_f0: "low_f0";
|
|
263
|
+
}>;
|
|
264
|
+
median_hz: z.ZodNullable<z.ZodNumber>;
|
|
265
|
+
p10_hz: z.ZodNullable<z.ZodNumber>;
|
|
266
|
+
p90_hz: z.ZodNullable<z.ZodNumber>;
|
|
267
|
+
range_st: z.ZodNullable<z.ZodNumber>;
|
|
268
|
+
voiced_frames: z.ZodNumber;
|
|
269
|
+
}, z.core.$strict>;
|
|
270
|
+
loudness: z.ZodObject<{
|
|
271
|
+
status: z.ZodEnum<{
|
|
272
|
+
measured: "measured";
|
|
273
|
+
unmeasured: "unmeasured";
|
|
274
|
+
}>;
|
|
275
|
+
range_db_p10_p90: z.ZodNullable<z.ZodNumber>;
|
|
276
|
+
}, z.core.$strict>;
|
|
277
|
+
warnings: z.ZodArray<z.ZodEnum<{
|
|
278
|
+
background_music_present_f0_and_intensity_may_be_contaminated: "background_music_present_f0_and_intensity_may_be_contaminated";
|
|
279
|
+
no_sentence_terminal_punctuation_pace_uses_turn_spans: "no_sentence_terminal_punctuation_pace_uses_turn_spans";
|
|
280
|
+
}>>;
|
|
281
|
+
}, z.core.$strict>>;
|
|
282
|
+
}, z.core.$strict>;
|
|
283
|
+
export type ReferenceVoice = z.infer<typeof referenceVoice>;
|
|
284
|
+
export type NarrationPace = {
|
|
285
|
+
kind: "paced";
|
|
286
|
+
target_wps: number;
|
|
287
|
+
voice_pace: number;
|
|
288
|
+
wanted: number;
|
|
289
|
+
clamped: boolean;
|
|
290
|
+
} | {
|
|
291
|
+
kind: "unmeasured";
|
|
292
|
+
reason: string;
|
|
293
|
+
};
|
|
294
|
+
/** The presenter's pace as make_ugc's voice_pace against our baseline voice, clamped to the vendor's range. */
|
|
295
|
+
export declare function narrationPaceFromVoice(voice: ReferenceVoice | undefined): NarrationPace;
|
|
296
|
+
export type PauseTrimFromVoice = {
|
|
297
|
+
targets: PauseTrimTargets;
|
|
298
|
+
capped: {
|
|
299
|
+
key: keyof PauseTrimTargets;
|
|
300
|
+
median_s: number;
|
|
301
|
+
}[];
|
|
302
|
+
};
|
|
303
|
+
/** The presenter's word-gap medians as trim targets within [floor, ceiling], naming each capped one; undefined when nothing was measured. */
|
|
304
|
+
export declare function pauseTrimFromVoice(voice: ReferenceVoice | undefined): PauseTrimFromVoice | undefined;
|
|
305
|
+
export {};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
// Voice profile of a reference (reference-elements S7): pace, pauses, pitch and loudness per speaker, measured in our worker from the Scribe
|
|
3
|
+
// words and the decoded audio; the method is the owner's analyzer (video-style-analyzer, docs/voice-profile.md). Numbers only, no words.
|
|
4
|
+
export const REFERENCE_VOICE_VERSION = "voice-profile-v1";
|
|
5
|
+
export const REFERENCE_VOICE_WARNINGS = ["no_sentence_terminal_punctuation_pace_uses_turn_spans",
|
|
6
|
+
"background_music_present_f0_and_intensity_may_be_contaminated"];
|
|
7
|
+
export const MAX_REFERENCE_VOICE_SPEAKERS = 6;
|
|
8
|
+
/** Words per second of our English default (eleven_v4) at speed 1 on the reference reel's text, measured 25.10 (tone-reel-atoms.md). */
|
|
9
|
+
export const NARRATION_BASELINE_WPS = 2.54;
|
|
10
|
+
/** ElevenLabs' speed range; make_ugc's voice_pace accepts the same. */
|
|
11
|
+
export const VOICE_PACE_MIN = 0.7;
|
|
12
|
+
export const VOICE_PACE_MAX = 1.2;
|
|
13
|
+
/** No trimmed pause gets shorter than this, whatever the reference measured. */
|
|
14
|
+
export const PAUSE_TRIM_FLOOR_S = 0.05;
|
|
15
|
+
/** The longest target make_ugc takes; a reference pause above it is compiled to it, with a plan note. */
|
|
16
|
+
export const PAUSE_TRIM_CEILING_S = 2;
|
|
17
|
+
const pauseTarget = z.number().min(PAUSE_TRIM_FLOOR_S).max(PAUSE_TRIM_CEILING_S).optional();
|
|
18
|
+
/** make_ugc's opt-in: per gap class, the length a longer pause is cut down to; quiet audio only, a joint that would click is kept. */
|
|
19
|
+
export const pauseTrim = z.strictObject({ sentence_end_s: pauseTarget, comma_s: pauseTarget, mid_phrase_s: pauseTarget })
|
|
20
|
+
.refine(targets => Object.values(targets).some(value => value !== undefined), "name at least one gap class");
|
|
21
|
+
const customIssue = "custom";
|
|
22
|
+
const count = z.number().int().min(0);
|
|
23
|
+
const seconds = z.number().min(0);
|
|
24
|
+
const share = z.number().min(0).max(1);
|
|
25
|
+
const pauseSummary = z.strictObject({ count, median_s: seconds.nullable(), p90_s: seconds.nullable(), count_ge150ms: count });
|
|
26
|
+
/** Three layers per gap kind: the ASR word gap, a local energy dip (12 dB below the neighbouring words, 40 ms), and cut-safe quiet (−40 dB). */
|
|
27
|
+
const pauseKind = z.strictObject({ timestamp: pauseSummary, acoustic_pause: pauseSummary, cut_safe: pauseSummary,
|
|
28
|
+
acoustic_no_dip_count: count, acoustic_unconfirmed_count: count });
|
|
29
|
+
/** A measured value is a number and an unmeasured one null: an absent pitch is never 0 Hz. */
|
|
30
|
+
function pairs(status, measured, values, ctx) {
|
|
31
|
+
const nulls = Object.entries(values).filter(([, value]) => value === null).map(([key]) => key);
|
|
32
|
+
if (status === measured && nulls.length)
|
|
33
|
+
ctx.addIssue({ code: customIssue, message: `${status} needs ${nulls.join(", ")}` });
|
|
34
|
+
if (status !== measured && nulls.length < Object.keys(values).length)
|
|
35
|
+
ctx.addIssue({ code: customIssue, message: `${status} keeps its values null` });
|
|
36
|
+
}
|
|
37
|
+
const referenceVoiceSpeaker = z.strictObject({
|
|
38
|
+
speaker: z.string().regex(/^[A-Za-z0-9_-]{1,40}$/).describe("The transcription vendor's speaker id."),
|
|
39
|
+
word_count: count,
|
|
40
|
+
sentence_count: count,
|
|
41
|
+
pace: z.strictObject({ status: z.enum(["measured", "unmeasured"]), words_per_second: z.number().positive().nullable()
|
|
42
|
+
.describe("Words over the sum of sentence spans: pauses inside a sentence count, gaps between sentences and other speakers do not."),
|
|
43
|
+
basis: z.enum(["sentence_spans", "turn_spans"]) })
|
|
44
|
+
.superRefine((pace, ctx) => pairs(pace.status, "measured", { words_per_second: pace.words_per_second }, ctx)),
|
|
45
|
+
pauses: z.strictObject({ sentence_end: pauseKind, comma: pauseKind, mid_phrase: pauseKind }),
|
|
46
|
+
long_pause_count: count.describe("Same-speaker pauses over two seconds, kept with their punctuation kind."),
|
|
47
|
+
hinge: z.strictObject({ status: z.enum(["measured", "not_evaluated"]),
|
|
48
|
+
sentence_share: share.nullable().describe("Share of acoustically evaluated sentences with an internal pause of 150 ms or more; not all sentences."),
|
|
49
|
+
evaluated_sentences: count, coverage: share.nullable(), timestamp_sentence_share: share.nullable(),
|
|
50
|
+
median_position: share.nullable().describe("Where the hinge falls, as the share of the sentence's words before it."), median_seconds: seconds.nullable() })
|
|
51
|
+
.superRefine((hinge, ctx) => pairs(hinge.status, "measured", { sentence_share: hinge.sentence_share }, ctx)),
|
|
52
|
+
pitch: z.strictObject({ status: z.enum(["measured", "no_voiced_frames"]), ceiling_hz: z.number().positive(),
|
|
53
|
+
ceiling_basis: z.enum(["default", "low_f0", "configured"]).describe("default 400 Hz; low_f0: a median under 165 Hz at 400 is measured again at 300 Hz."),
|
|
54
|
+
median_hz: z.number().positive().nullable(), p10_hz: z.number().positive().nullable(), p90_hz: z.number().positive().nullable(),
|
|
55
|
+
range_st: z.number().min(0).nullable(), voiced_frames: count })
|
|
56
|
+
.superRefine((pitch, ctx) => pairs(pitch.status, "measured", { median_hz: pitch.median_hz, p10_hz: pitch.p10_hz, p90_hz: pitch.p90_hz, range_st: pitch.range_st }, ctx)),
|
|
57
|
+
loudness: z.strictObject({ status: z.enum(["measured", "unmeasured"]), range_db_p10_p90: z.number().min(0).nullable() })
|
|
58
|
+
.superRefine((loudness, ctx) => pairs(loudness.status, "measured", { range_db_p10_p90: loudness.range_db_p10_p90 }, ctx)),
|
|
59
|
+
warnings: z.array(z.enum(REFERENCE_VOICE_WARNINGS)).max(REFERENCE_VOICE_WARNINGS.length),
|
|
60
|
+
});
|
|
61
|
+
export const referenceVoice = z.strictObject({
|
|
62
|
+
version: z.literal(REFERENCE_VOICE_VERSION),
|
|
63
|
+
method: z.strictObject({ pause_drop_db: z.number().positive(), pause_min_run_s: z.number().positive(), cut_safe_db: z.number().negative(),
|
|
64
|
+
pitch: z.literal("yin"), sample_rate: z.number().int().positive() }),
|
|
65
|
+
presenter_speaker: z.string().nullable(),
|
|
66
|
+
speakers: z.array(referenceVoiceSpeaker).min(1).max(MAX_REFERENCE_VOICE_SPEAKERS),
|
|
67
|
+
}).superRefine((voice, ctx) => {
|
|
68
|
+
voice.speakers.forEach((entry, index) => {
|
|
69
|
+
if (voice.speakers.findIndex(other => other.speaker === entry.speaker) < index) {
|
|
70
|
+
ctx.addIssue({ code: customIssue, path: ["speakers", index, "speaker"], message: "names a speaker twice" });
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
if (voice.presenter_speaker !== null && !voice.speakers.some(entry => entry.speaker === voice.presenter_speaker)) {
|
|
74
|
+
ctx.addIssue({ code: customIssue, path: ["presenter_speaker"], message: "is not one of the speakers" });
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
/** The presenter's pace as make_ugc's voice_pace against our baseline voice, clamped to the vendor's range. */
|
|
78
|
+
export function narrationPaceFromVoice(voice) {
|
|
79
|
+
if (!voice)
|
|
80
|
+
return { kind: "unmeasured", reason: "the reference voice was not measured" };
|
|
81
|
+
const presenter = voice.speakers.find(entry => entry.speaker === voice.presenter_speaker);
|
|
82
|
+
if (!presenter)
|
|
83
|
+
return { kind: "unmeasured", reason: "the reference has no presenter voice" };
|
|
84
|
+
const target = presenter.pace.words_per_second;
|
|
85
|
+
if (target === null)
|
|
86
|
+
return { kind: "unmeasured", reason: "the presenter's pace was not measured" };
|
|
87
|
+
const wanted = Math.round((target / NARRATION_BASELINE_WPS) * 100) / 100;
|
|
88
|
+
const pace = Math.min(VOICE_PACE_MAX, Math.max(VOICE_PACE_MIN, wanted));
|
|
89
|
+
return { kind: "paced", target_wps: Math.round(target * 100) / 100, voice_pace: pace, wanted, clamped: pace !== wanted };
|
|
90
|
+
}
|
|
91
|
+
/** The presenter's word-gap medians as trim targets within [floor, ceiling], naming each capped one; undefined when nothing was measured. */
|
|
92
|
+
export function pauseTrimFromVoice(voice) {
|
|
93
|
+
const presenter = voice?.speakers.find(entry => entry.speaker === voice.presenter_speaker);
|
|
94
|
+
if (!presenter)
|
|
95
|
+
return undefined;
|
|
96
|
+
const capped = [];
|
|
97
|
+
const targets = Object.fromEntries([["sentence_end_s", presenter.pauses.sentence_end], ["comma_s", presenter.pauses.comma],
|
|
98
|
+
["mid_phrase_s", presenter.pauses.mid_phrase]].flatMap(([key, kind]) => {
|
|
99
|
+
const median = kind.timestamp.median_s;
|
|
100
|
+
if (median === null)
|
|
101
|
+
return [];
|
|
102
|
+
if (median > PAUSE_TRIM_CEILING_S)
|
|
103
|
+
capped.push({ key, median_s: median });
|
|
104
|
+
return [[key, Math.min(PAUSE_TRIM_CEILING_S, Math.max(PAUSE_TRIM_FLOOR_S, median))]];
|
|
105
|
+
}));
|
|
106
|
+
return Object.keys(targets).length ? { targets, capped } : undefined;
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=reference-voice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reference-voice.js","sourceRoot":"","sources":["../src/reference-voice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,6IAA6I;AAC7I,yIAAyI;AAEzI,MAAM,CAAC,MAAM,uBAAuB,GAAG,kBAAkB,CAAC;AAC1D,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,uDAAuD;IAC9F,+DAA+D,CAAU,CAAC;AAC5E,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC;AAE9C,wIAAwI;AACxI,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAC;AAC3C,uEAAuE;AACvE,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAC;AAClC,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAC;AAElC,gFAAgF;AAChF,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,CAAC;AACvC,yGAAyG;AACzG,MAAM,CAAC,MAAM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