@nodaro/shared 1.10.0 → 1.11.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/index.cjs +18 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20 -7
- package/dist/index.d.ts +20 -7
- package/dist/index.js +18 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/credit-identifiers.test.ts +24 -12
- package/src/__tests__/video-audio-capability.test.ts +34 -6
- package/src/credit-identifiers.ts +8 -2
- package/src/model-constants.ts +36 -10
package/dist/index.cjs
CHANGED
|
@@ -2946,9 +2946,22 @@ var VIDEO_AUDIO_CAPABILITY = {
|
|
|
2946
2946
|
veo3: { mode: "native_speech", alwaysOn: true },
|
|
2947
2947
|
"veo3.1": { mode: "native_speech", alwaysOn: true },
|
|
2948
2948
|
veo3_lite: { mode: "native_speech", alwaysOn: true },
|
|
2949
|
-
// Kling 2.6 / 3.0 —
|
|
2950
|
-
|
|
2951
|
-
|
|
2949
|
+
// Kling 2.6 / 3.0 — native spoken dialogue + lip sync behind the `sound`
|
|
2950
|
+
// toggle (probe-verified on the KIE path 2026-07-16: scripted quoted lines
|
|
2951
|
+
// are spoken verbatim with articulated lips; the official Kling 2.6 audio
|
|
2952
|
+
// guide documents speech/dialogue/narration/singing with [Character@Voice]
|
|
2953
|
+
// binding, zh+en voices). Cost-affecting: `:audio` credit suffix.
|
|
2954
|
+
// kling-3.0's model default is sound ON (kie models.ts extraParams +
|
|
2955
|
+
// kling3-client `?? true`) → defaultOn keeps billing aligned with what an
|
|
2956
|
+
// intent-less request actually generates; kling 2.6 defaults OFF.
|
|
2957
|
+
kling: { mode: "native_speech", field: "sound", affectsCost: true },
|
|
2958
|
+
"kling-3.0": { mode: "native_speech", field: "sound", affectsCost: true, defaultOn: true },
|
|
2959
|
+
// Kling 3.0 Omni (Replicate kwaivgi/kling-v3-omni-video) — the Omni tier's
|
|
2960
|
+
// headline feature IS native dialogue (per-character voices, unified audio
|
|
2961
|
+
// timeline). Lever is Replicate's `generate_audio` (default true in our
|
|
2962
|
+
// provider config → defaultOn); audio is priced into the flat per-duration
|
|
2963
|
+
// rate, so NOT cost-affecting (no :audio composite).
|
|
2964
|
+
"kling-3-omni": { mode: "native_speech", field: "generateAudio", defaultOn: true },
|
|
2952
2965
|
// Seedance 1.x — optional ambient audio (generate_audio); not dialogue.
|
|
2953
2966
|
seedance: { mode: "ambient", field: "generateAudio" },
|
|
2954
2967
|
// Seedance 2.0 — multimodal; lip-syncs to a supplied reference-audio track.
|
|
@@ -3710,7 +3723,8 @@ function buildVideoCreditModelIdentifier(provider, duration, sound, nodeType, mo
|
|
|
3710
3723
|
if (!tiers) return effectiveProvider;
|
|
3711
3724
|
const tier = tiers.find((t2) => durationSec <= t2.maxSeconds) ?? tiers[tiers.length - 1];
|
|
3712
3725
|
let identifier = `${effectiveProvider}:${tier.suffix}`;
|
|
3713
|
-
|
|
3726
|
+
const soundOn = sound ?? getVideoAudioCapability(effectiveProvider).defaultOn === true;
|
|
3727
|
+
if (AUDIO_ADDON_PROVIDERS.has(effectiveProvider) && soundOn) {
|
|
3714
3728
|
identifier += ":audio";
|
|
3715
3729
|
}
|
|
3716
3730
|
if (MODE_ADDON_PROVIDERS.has(effectiveProvider) && (mode === "high" || mode === "pro")) {
|