@escapeaihq/client-core 0.140.0 → 0.141.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/dist/api.d.ts +99 -0
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +46 -0
- package/dist/api.js.map +1 -1
- package/dist/domains/adventureDefinitions.d.ts +14 -4
- package/dist/domains/adventureDefinitions.d.ts.map +1 -1
- package/dist/domains/adventureDefinitions.js +14 -4
- package/dist/domains/adventureDefinitions.js.map +1 -1
- package/dist/domains/showcase.d.ts +16 -1
- package/dist/domains/showcase.d.ts.map +1 -1
- package/dist/domains/showcase.js +15 -0
- package/dist/domains/showcase.js.map +1 -1
- package/dist/generated/contract.d.ts +7 -1
- package/dist/generated/contract.d.ts.map +1 -1
- package/dist/generated/contract.js.map +1 -1
- package/dist/voiceCloneCaption.d.ts +7 -1
- package/dist/voiceCloneCaption.d.ts.map +1 -1
- package/dist/voiceCloneCaption.js +26 -1
- package/dist/voiceCloneCaption.js.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/api.adventure-definitions.test.ts +16 -0
- package/src/__tests__/castFramePipelinePending.test.ts +56 -1
- package/src/__tests__/voiceCloneCaption.test.ts +56 -0
- package/src/api.ts +123 -0
- package/src/domains/adventureDefinitions.ts +14 -4
- package/src/domains/showcase.ts +24 -1
- package/src/generated/contract.ts +10 -0
- package/src/voiceCloneCaption.ts +36 -2
|
@@ -42,6 +42,7 @@ import type {
|
|
|
42
42
|
ArcGenerationStage,
|
|
43
43
|
ArcProposalStatus,
|
|
44
44
|
ArcVariantProgressState,
|
|
45
|
+
CastFrameChainState,
|
|
45
46
|
CastMembershipAction,
|
|
46
47
|
CurationAction,
|
|
47
48
|
CutsceneAudioReason,
|
|
@@ -94,6 +95,7 @@ import type {
|
|
|
94
95
|
VideoGenJobStatus,
|
|
95
96
|
VisemeBundleStatus,
|
|
96
97
|
VisemeRegenStatusValue,
|
|
98
|
+
VoiceCloneSkipCause,
|
|
97
99
|
VoiceCloneStatus,
|
|
98
100
|
WorkflowArtifactKind,
|
|
99
101
|
WorkflowEpochStatus,
|
|
@@ -247,6 +249,10 @@ export type Assert_ArtifactStatus = Expect<MutuallyAssignable<ArtifactStatus, Ge
|
|
|
247
249
|
export type Generated_ArtifactType = "video" | "image" | "document" | "audio" | "cutscene" | "storyboard";
|
|
248
250
|
export type Assert_ArtifactType = Expect<MutuallyAssignable<ArtifactType, Generated_ArtifactType>>;
|
|
249
251
|
|
|
252
|
+
/** Backend single source: `shared/ingestion_jobs.py::CastFrameChainState`. */
|
|
253
|
+
export type Generated_CastFrameChainState = "settled" | "in_flight" | "stalled";
|
|
254
|
+
export type Assert_CastFrameChainState = Expect<MutuallyAssignable<CastFrameChainState, Generated_CastFrameChainState>>;
|
|
255
|
+
|
|
250
256
|
/** Backend single source: `shared/cast_curation.py::DirectCastAction`. */
|
|
251
257
|
export type Generated_CastMembershipAction = "keep" | "remove" | "reset" | "restore";
|
|
252
258
|
export type Assert_CastMembershipAction = Expect<MutuallyAssignable<CastMembershipAction, Generated_CastMembershipAction>>;
|
|
@@ -583,6 +589,10 @@ export type Assert_VisemeRegenStatusValue = Expect<MutuallyAssignable<VisemeRege
|
|
|
583
589
|
export type Generated_VisemeSymbol = "rest" | "aei" | "o" | "ee" | "bmp" | "fv" | "l" | "r" | "th" | "qw" | "cdgknstxyz";
|
|
584
590
|
export type Assert_VisemeSymbol = Expect<MutuallyAssignable<VisemeSymbol, Generated_VisemeSymbol>>;
|
|
585
591
|
|
|
592
|
+
/** Backend single source: `shared/persona_models.py::VoiceCloneSkipCause`. */
|
|
593
|
+
export type Generated_VoiceCloneSkipCause = "no_character" | "speech_unverified" | "speech_untimed" | "lines_unusable" | "lines_too_short" | "lines_unreadable" | "audio_unusable" | "no_speech_matched" | "no_lines_matched";
|
|
594
|
+
export type Assert_VoiceCloneSkipCause = Expect<MutuallyAssignable<VoiceCloneSkipCause, Generated_VoiceCloneSkipCause>>;
|
|
595
|
+
|
|
586
596
|
/** Backend single source: `shared/persona_models.py::VoiceCloneStatus`. */
|
|
587
597
|
export type Generated_VoiceCloneStatus = "cloned" | "skipped_no_dialogue" | "skipped_insufficient_audio" | "refused" | "failed";
|
|
588
598
|
export type Assert_VoiceCloneStatus = Expect<MutuallyAssignable<VoiceCloneStatus, Generated_VoiceCloneStatus>>;
|
package/src/voiceCloneCaption.ts
CHANGED
|
@@ -9,7 +9,13 @@
|
|
|
9
9
|
* persona's `voice_clone_outcome` record proves.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
import type {
|
|
12
|
+
import type {
|
|
13
|
+
PersonaConfig,
|
|
14
|
+
RecloneIneligibleReason,
|
|
15
|
+
VoiceCloneOutcome,
|
|
16
|
+
VoiceCloneSkipCause,
|
|
17
|
+
VoiceCloneStatus,
|
|
18
|
+
} from './api';
|
|
13
19
|
|
|
14
20
|
/** Statuses where the persona ended on the default voice although a clone was
|
|
15
21
|
* wanted — mirror of `shared/persona_models.py` `VOICE_CLONE_FALLBACK_STATUSES`. */
|
|
@@ -20,6 +26,34 @@ export const VOICE_CLONE_FALLBACK_STATUSES: ReadonlySet<VoiceCloneStatus> = new
|
|
|
20
26
|
'failed',
|
|
21
27
|
]);
|
|
22
28
|
|
|
29
|
+
/**
|
|
30
|
+
* §Q PERS.130 — the plain reason shown for each `skipped_no_dialogue` cause
|
|
31
|
+
* (`VoiceCloneOutcome.cause`). Before this, every empty harvest read "no
|
|
32
|
+
* dialogue to clone", including the clone the speech-grounding gate refused.
|
|
33
|
+
*/
|
|
34
|
+
export const VOICE_CLONE_SKIP_CAPTIONS: Readonly<Record<VoiceCloneSkipCause, string>> = {
|
|
35
|
+
no_character: 'not linked to a character in the video',
|
|
36
|
+
speech_unverified: 'their voice was not confirmed as theirs; pick their voice sample to allow a clone',
|
|
37
|
+
speech_untimed: 'their confirmed speech has no usable timing to sample',
|
|
38
|
+
lines_unusable: 'their lines have no usable timing to sample',
|
|
39
|
+
lines_too_short: 'each of their lines is too short to sample',
|
|
40
|
+
lines_unreadable: 'their lines could not be read back from the video',
|
|
41
|
+
audio_unusable: 'no usable audio could be cut from their lines',
|
|
42
|
+
no_speech_matched: 'no speech in this video is matched to a speaker yet',
|
|
43
|
+
no_lines_matched: 'no lines in this video are matched to them',
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/** The caption for a `skipped_no_dialogue` row that names no cause this build
|
|
47
|
+
* knows (a row written before the field, or a newer backend's cause). */
|
|
48
|
+
const LEGACY_NO_DIALOGUE_REASON = 'no dialogue to clone';
|
|
49
|
+
|
|
50
|
+
function skipReason(cause: VoiceCloneSkipCause | null | undefined): string {
|
|
51
|
+
if (cause && Object.prototype.hasOwnProperty.call(VOICE_CLONE_SKIP_CAPTIONS, cause)) {
|
|
52
|
+
return VOICE_CLONE_SKIP_CAPTIONS[cause];
|
|
53
|
+
}
|
|
54
|
+
return LEGACY_NO_DIALOGUE_REASON;
|
|
55
|
+
}
|
|
56
|
+
|
|
23
57
|
/** The reason shown in a caption is shortened to this many characters. */
|
|
24
58
|
export const VOICE_CLONE_CAPTION_REASON_MAX_CHARS = 120;
|
|
25
59
|
|
|
@@ -47,7 +81,7 @@ export function voiceCloneCaption(
|
|
|
47
81
|
case 'failed':
|
|
48
82
|
return `voice: stock (clone failed${reason ? `: ${reason}` : ''})`;
|
|
49
83
|
case 'skipped_no_dialogue':
|
|
50
|
-
return
|
|
84
|
+
return `voice: stock (${skipReason(outcome.cause)})`;
|
|
51
85
|
case 'skipped_insufficient_audio':
|
|
52
86
|
return 'voice: stock (too little dialogue audio to clone)';
|
|
53
87
|
default:
|