vidspotai-shared 1.0.30 → 1.0.31
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/lib/globals/aiModels/enums.d.ts +40 -0
- package/lib/globals/aiModels/enums.d.ts.map +1 -0
- package/lib/globals/aiModels/enums.js +46 -0
- package/lib/globals/aiModels/index.d.ts +6 -0
- package/lib/globals/aiModels/index.d.ts.map +1 -0
- package/lib/globals/aiModels/index.js +35 -0
- package/lib/globals/aiModels/providers/bytedance.d.ts +4 -0
- package/lib/globals/aiModels/providers/bytedance.d.ts.map +1 -0
- package/lib/globals/aiModels/providers/bytedance.js +65 -0
- package/lib/globals/aiModels/providers/google.d.ts +4 -0
- package/lib/globals/aiModels/providers/google.d.ts.map +1 -0
- package/lib/globals/aiModels/providers/google.js +111 -0
- package/lib/globals/aiModels/providers/kling.d.ts +4 -0
- package/lib/globals/aiModels/providers/kling.d.ts.map +1 -0
- package/lib/globals/aiModels/providers/kling.js +129 -0
- package/lib/globals/aiModels/providers/minimax.d.ts +4 -0
- package/lib/globals/aiModels/providers/minimax.d.ts.map +1 -0
- package/lib/globals/aiModels/providers/minimax.js +66 -0
- package/lib/globals/aiModels/providers/openai.d.ts +4 -0
- package/lib/globals/aiModels/providers/openai.d.ts.map +1 -0
- package/lib/globals/aiModels/providers/openai.js +82 -0
- package/lib/globals/aiModels/providers/pixverse.d.ts +4 -0
- package/lib/globals/aiModels/providers/pixverse.d.ts.map +1 -0
- package/lib/globals/aiModels/providers/pixverse.js +108 -0
- package/lib/globals/aiModels/providers/runway.d.ts +4 -0
- package/lib/globals/aiModels/providers/runway.d.ts.map +1 -0
- package/lib/globals/aiModels/providers/runway.js +52 -0
- package/lib/globals/aiModels/types.d.ts +45 -0
- package/lib/globals/aiModels/types.d.ts.map +1 -0
- package/lib/globals/aiModels/types.js +2 -0
- package/lib/globals/aiModels.d.ts +9 -14
- package/lib/globals/aiModels.d.ts.map +1 -1
- package/lib/globals/aiModels.js +187 -495
- package/lib/globals/index.d.ts +1 -0
- package/lib/globals/index.d.ts.map +1 -1
- package/lib/globals/index.js +1 -0
- package/lib/globals/ttsModels/index.d.ts +6 -0
- package/lib/globals/ttsModels/index.d.ts.map +1 -0
- package/lib/globals/ttsModels/index.js +25 -0
- package/lib/globals/ttsModels/providers/elevenlabs.d.ts +3 -0
- package/lib/globals/ttsModels/providers/elevenlabs.d.ts.map +1 -0
- package/lib/globals/ttsModels/providers/elevenlabs.js +13 -0
- package/lib/globals/ttsModels/types.d.ts +15 -0
- package/lib/globals/ttsModels/types.d.ts.map +1 -0
- package/lib/globals/ttsModels/types.js +2 -0
- package/lib/globals/ttsModels/voices.d.ts +21 -0
- package/lib/globals/ttsModels/voices.d.ts.map +1 -0
- package/lib/globals/ttsModels/voices.js +135 -0
- package/lib/models/user.model.d.ts +2 -0
- package/lib/models/user.model.d.ts.map +1 -1
- package/lib/models/video.model.d.ts +9 -0
- package/lib/models/video.model.d.ts.map +1 -1
- package/lib/services/aiGen/aiGenFactory.service.d.ts.map +1 -1
- package/lib/services/aiGen/aiGenFactory.service.js +36 -12
- package/lib/services/aiGen/providers/bytedance/bytedance.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/bytedance/bytedance.service.js +36 -7
- package/lib/services/aiGen/providers/google/google.service.js +1 -1
- package/lib/services/aiGen/providers/kling/kling.service.d.ts +7 -2
- package/lib/services/aiGen/providers/kling/kling.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/kling/kling.service.js +126 -10
- package/lib/services/aiGen/providers/kling/types.d.ts +13 -0
- package/lib/services/aiGen/providers/kling/types.d.ts.map +1 -1
- package/lib/services/aiGen/providers/pixverse/pixverse.service.d.ts +9 -0
- package/lib/services/aiGen/providers/pixverse/pixverse.service.d.ts.map +1 -0
- package/lib/services/aiGen/providers/pixverse/pixverse.service.js +188 -0
- package/lib/services/aiGen/providers/runway/runway.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/runway/runway.service.js +16 -4
- package/lib/services/aiGen/providers/types.d.ts +6 -0
- package/lib/services/aiGen/providers/types.d.ts.map +1 -1
- package/lib/services/credit.service.d.ts +1 -0
- package/lib/services/credit.service.d.ts.map +1 -1
- package/lib/services/credit.service.js +17 -0
- package/lib/services/index.d.ts +1 -0
- package/lib/services/index.d.ts.map +1 -1
- package/lib/services/index.js +1 -0
- package/lib/services/tts/index.d.ts +4 -0
- package/lib/services/tts/index.d.ts.map +1 -0
- package/lib/services/tts/index.js +19 -0
- package/lib/services/tts/providers/elevenlabs.service.d.ts +7 -0
- package/lib/services/tts/providers/elevenlabs.service.d.ts.map +1 -0
- package/lib/services/tts/providers/elevenlabs.service.js +44 -0
- package/lib/services/tts/ttsFactory.service.d.ts +4 -0
- package/lib/services/tts/ttsFactory.service.d.ts.map +1 -0
- package/lib/services/tts/ttsFactory.service.js +12 -0
- package/lib/services/tts/types.d.ts +14 -0
- package/lib/services/tts/types.d.ts.map +1 -0
- package/lib/services/tts/types.js +6 -0
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.d.ts.map +1 -1
- package/lib/utils/index.js +1 -0
- package/lib/utils/ttsUtils.d.ts +11 -0
- package/lib/utils/ttsUtils.d.ts.map +1 -0
- package/lib/utils/ttsUtils.js +16 -0
- package/package.json +1 -1
package/lib/globals/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/globals/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/globals/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC"}
|
package/lib/globals/index.js
CHANGED
|
@@ -18,4 +18,5 @@ __exportStar(require("./aiModels"), exports);
|
|
|
18
18
|
__exportStar(require("./config"), exports);
|
|
19
19
|
__exportStar(require("./plans"), exports);
|
|
20
20
|
__exportStar(require("./schemas"), exports);
|
|
21
|
+
__exportStar(require("./ttsModels"), exports);
|
|
21
22
|
__exportStar(require("./types"), exports);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from "./types";
|
|
2
|
+
export * from "./voices";
|
|
3
|
+
import { TtsProvider, ITtsProviderConfig } from "./types";
|
|
4
|
+
export { elevenlabsConfig } from "./providers/elevenlabs";
|
|
5
|
+
export declare const ttsProviderConfigs: Record<TtsProvider, ITtsProviderConfig>;
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/globals/ttsModels/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AAEzB,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAG1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,WAAW,EAAE,kBAAkB,CAEtE,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.ttsProviderConfigs = exports.elevenlabsConfig = void 0;
|
|
18
|
+
__exportStar(require("./types"), exports);
|
|
19
|
+
__exportStar(require("./voices"), exports);
|
|
20
|
+
const elevenlabs_1 = require("./providers/elevenlabs");
|
|
21
|
+
var elevenlabs_2 = require("./providers/elevenlabs");
|
|
22
|
+
Object.defineProperty(exports, "elevenlabsConfig", { enumerable: true, get: function () { return elevenlabs_2.elevenlabsConfig; } });
|
|
23
|
+
exports.ttsProviderConfigs = {
|
|
24
|
+
elevenlabs: elevenlabs_1.elevenlabsConfig,
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"elevenlabs.d.ts","sourceRoot":"","sources":["../../../../src/globals/ttsModels/providers/elevenlabs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAE9C,eAAO,MAAM,gBAAgB,EAAE,kBAS9B,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.elevenlabsConfig = void 0;
|
|
4
|
+
exports.elevenlabsConfig = {
|
|
5
|
+
name: "ElevenLabs",
|
|
6
|
+
/** eleven_multilingual_v2 pay-as-you-go rate */
|
|
7
|
+
costPer1KChars: 0.3,
|
|
8
|
+
/** Sarah — neutral, clear default voice */
|
|
9
|
+
defaultVoiceId: "EXAVITQu4vr4xnSDxMaL",
|
|
10
|
+
modelId: "eleven_multilingual_v2",
|
|
11
|
+
/** ~150 words/min = 2.5 words/sec */
|
|
12
|
+
wordsPerSecond: 2.5,
|
|
13
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Union of all supported TTS provider keys. Extend as new providers are added. */
|
|
2
|
+
export type TtsProvider = "elevenlabs";
|
|
3
|
+
export interface ITtsProviderConfig {
|
|
4
|
+
/** Human-readable provider name */
|
|
5
|
+
name: string;
|
|
6
|
+
/** Cost in USD per 1,000 characters (pay-as-you-go rate) */
|
|
7
|
+
costPer1KChars: number;
|
|
8
|
+
/** Default voice ID sent to the provider API */
|
|
9
|
+
defaultVoiceId: string;
|
|
10
|
+
/** Model/engine identifier used by the provider */
|
|
11
|
+
modelId: string;
|
|
12
|
+
/** Average spoken words per second for duration estimation (~150 wpm = 2.5 wps) */
|
|
13
|
+
wordsPerSecond: number;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/globals/ttsModels/types.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,MAAM,MAAM,WAAW,GAAG,YAAY,CAAC;AAEvC,MAAM,WAAW,kBAAkB;IACjC,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,4DAA4D;IAC5D,cAAc,EAAE,MAAM,CAAC;IACvB,gDAAgD;IAChD,cAAc,EAAE,MAAM,CAAC;IACvB,mDAAmD;IACnD,OAAO,EAAE,MAAM,CAAC;IAChB,mFAAmF;IACnF,cAAc,EAAE,MAAM,CAAC;CACxB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface ITtsVoice {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
gender: "male" | "female";
|
|
5
|
+
accent: string;
|
|
6
|
+
/** Public preview MP3 hosted by ElevenLabs */
|
|
7
|
+
previewUrl: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Curated list of ElevenLabs voices compatible with eleven_multilingual_v2.
|
|
11
|
+
* Any voice can speak any supported language via the language_code parameter.
|
|
12
|
+
*/
|
|
13
|
+
export declare const ELEVENLABS_VOICES: ITtsVoice[];
|
|
14
|
+
/** Default voice ID — Sarah (female, American) */
|
|
15
|
+
export declare const DEFAULT_ELEVENLABS_VOICE_ID = "EXAVITQu4vr4xnSDxMaL";
|
|
16
|
+
/**
|
|
17
|
+
* Maps frontend language keys → ElevenLabs language_code (ISO 639-1).
|
|
18
|
+
* Used to improve pronunciation when eleven_multilingual_v2 is the model.
|
|
19
|
+
*/
|
|
20
|
+
export declare const LANG_TO_ELEVENLABS_CODE: Record<string, string>;
|
|
21
|
+
//# sourceMappingURL=voices.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"voices.d.ts","sourceRoot":"","sources":["../../../src/globals/ttsModels/voices.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,8CAA8C;IAC9C,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAAS,EAuFxC,CAAC;AAEF,kDAAkD;AAClD,eAAO,MAAM,2BAA2B,yBAAyB,CAAC;AAElE;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAiC1D,CAAC"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LANG_TO_ELEVENLABS_CODE = exports.DEFAULT_ELEVENLABS_VOICE_ID = exports.ELEVENLABS_VOICES = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Curated list of ElevenLabs voices compatible with eleven_multilingual_v2.
|
|
6
|
+
* Any voice can speak any supported language via the language_code parameter.
|
|
7
|
+
*/
|
|
8
|
+
exports.ELEVENLABS_VOICES = [
|
|
9
|
+
// ── Female ──────────────────────────────────────────────────────────────
|
|
10
|
+
{
|
|
11
|
+
id: "EXAVITQu4vr4xnSDxMaL",
|
|
12
|
+
name: "Sarah",
|
|
13
|
+
gender: "female",
|
|
14
|
+
accent: "American",
|
|
15
|
+
previewUrl: "https://storage.googleapis.com/eleven-public-prod/premade/voices/EXAVITQu4vr4xnSDxMaL/preview.mp3",
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
id: "21m00Tcm4TlvDq8ikWAM",
|
|
19
|
+
name: "Rachel",
|
|
20
|
+
gender: "female",
|
|
21
|
+
accent: "American",
|
|
22
|
+
previewUrl: "https://storage.googleapis.com/eleven-public-prod/premade/voices/21m00Tcm4TlvDq8ikWAM/preview.mp3",
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
id: "XrExE9yKIg1WjnnlVkGX",
|
|
26
|
+
name: "Matilda",
|
|
27
|
+
gender: "female",
|
|
28
|
+
accent: "American",
|
|
29
|
+
previewUrl: "https://storage.googleapis.com/eleven-public-prod/premade/voices/XrExE9yKIg1WjnnlVkGX/preview.mp3",
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: "9BWtsMINqrJLrRacOk9x",
|
|
33
|
+
name: "Aria",
|
|
34
|
+
gender: "female",
|
|
35
|
+
accent: "American",
|
|
36
|
+
previewUrl: "https://storage.googleapis.com/eleven-public-prod/premade/voices/9BWtsMINqrJLrRacOk9x/preview.mp3",
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
id: "XB0fDUnXU5powFXDhCwa",
|
|
40
|
+
name: "Charlotte",
|
|
41
|
+
gender: "female",
|
|
42
|
+
accent: "Swedish",
|
|
43
|
+
previewUrl: "https://storage.googleapis.com/eleven-public-prod/premade/voices/XB0fDUnXU5powFXDhCwa/preview.mp3",
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
id: "ThT5KcBeYPX3keUQqHPh",
|
|
47
|
+
name: "Dorothy",
|
|
48
|
+
gender: "female",
|
|
49
|
+
accent: "British",
|
|
50
|
+
previewUrl: "https://storage.googleapis.com/eleven-public-prod/premade/voices/ThT5KcBeYPX3keUQqHPh/preview.mp3",
|
|
51
|
+
},
|
|
52
|
+
// ── Male ────────────────────────────────────────────────────────────────
|
|
53
|
+
{
|
|
54
|
+
id: "pNInz6obpgDQGcFmaJgB",
|
|
55
|
+
name: "Adam",
|
|
56
|
+
gender: "male",
|
|
57
|
+
accent: "American",
|
|
58
|
+
previewUrl: "https://storage.googleapis.com/eleven-public-prod/premade/voices/pNInz6obpgDQGcFmaJgB/preview.mp3",
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
id: "IKne3meq5aSn9XLyUdCD",
|
|
62
|
+
name: "Charlie",
|
|
63
|
+
gender: "male",
|
|
64
|
+
accent: "Australian",
|
|
65
|
+
previewUrl: "https://storage.googleapis.com/eleven-public-prod/premade/voices/IKne3meq5aSn9XLyUdCD/preview.mp3",
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
id: "JBFqnCBsd6RMkjVDRZzb",
|
|
69
|
+
name: "George",
|
|
70
|
+
gender: "male",
|
|
71
|
+
accent: "British",
|
|
72
|
+
previewUrl: "https://storage.googleapis.com/eleven-public-prod/premade/voices/JBFqnCBsd6RMkjVDRZzb/preview.mp3",
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
id: "N2lVS1w4EtoT3dr4eOWO",
|
|
76
|
+
name: "Callum",
|
|
77
|
+
gender: "male",
|
|
78
|
+
accent: "American",
|
|
79
|
+
previewUrl: "https://storage.googleapis.com/eleven-public-prod/premade/voices/N2lVS1w4EtoT3dr4eOWO/preview.mp3",
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
id: "TX3LPaxmHKxFdv7VOQHJ",
|
|
83
|
+
name: "Liam",
|
|
84
|
+
gender: "male",
|
|
85
|
+
accent: "American",
|
|
86
|
+
previewUrl: "https://storage.googleapis.com/eleven-public-prod/premade/voices/TX3LPaxmHKxFdv7VOQHJ/preview.mp3",
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
id: "onwK4e9ZLuTAKqWW03F9",
|
|
90
|
+
name: "Daniel",
|
|
91
|
+
gender: "male",
|
|
92
|
+
accent: "British",
|
|
93
|
+
previewUrl: "https://storage.googleapis.com/eleven-public-prod/premade/voices/onwK4e9ZLuTAKqWW03F9/preview.mp3",
|
|
94
|
+
},
|
|
95
|
+
];
|
|
96
|
+
/** Default voice ID — Sarah (female, American) */
|
|
97
|
+
exports.DEFAULT_ELEVENLABS_VOICE_ID = "EXAVITQu4vr4xnSDxMaL";
|
|
98
|
+
/**
|
|
99
|
+
* Maps frontend language keys → ElevenLabs language_code (ISO 639-1).
|
|
100
|
+
* Used to improve pronunciation when eleven_multilingual_v2 is the model.
|
|
101
|
+
*/
|
|
102
|
+
exports.LANG_TO_ELEVENLABS_CODE = {
|
|
103
|
+
en: "en",
|
|
104
|
+
ar: "ar",
|
|
105
|
+
bg: "bg",
|
|
106
|
+
ca: "ca",
|
|
107
|
+
"zh-cn": "zh",
|
|
108
|
+
hr: "hr",
|
|
109
|
+
cs: "cs",
|
|
110
|
+
da: "da",
|
|
111
|
+
nl: "nl",
|
|
112
|
+
tl: "fil",
|
|
113
|
+
fi: "fi",
|
|
114
|
+
fr: "fr",
|
|
115
|
+
de: "de",
|
|
116
|
+
el: "el",
|
|
117
|
+
iw: "he",
|
|
118
|
+
hu: "hu",
|
|
119
|
+
id: "id",
|
|
120
|
+
it: "it",
|
|
121
|
+
ja: "ja",
|
|
122
|
+
ko: "ko",
|
|
123
|
+
ms: "ms",
|
|
124
|
+
no: "no",
|
|
125
|
+
pl: "pl",
|
|
126
|
+
pt: "pt",
|
|
127
|
+
ro: "ro",
|
|
128
|
+
sk: "sk",
|
|
129
|
+
es: "es",
|
|
130
|
+
sv: "sv",
|
|
131
|
+
th: "th",
|
|
132
|
+
tr: "tr",
|
|
133
|
+
uk: "uk",
|
|
134
|
+
vi: "vi",
|
|
135
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.model.d.ts","sourceRoot":"","sources":["../../src/models/user.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EACL,SAAS,EACT,kBAAkB,EAElB,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,YAAY,CAAC;IACtC,SAAS,EAAE,UAAU,CAAC;IACtB,SAAS,EAAE,UAAU,CAAC;IACtB,QAAQ,EAAE,YAAY,GAAG,UAAU,GAAG,WAAW,GAAG,MAAM,CAAC;IAC3D,aAAa,EAAE,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE;QAEf,SAAS,EAAE,MAAM,CAAC;QAClB,aAAa,EAAE,YAAY,GAAG,WAAW,GAAG,QAAQ,CAAC;QACrD,aAAa,EAAE,IAAI,CAAC;KACrB,CAAC;IACF,QAAQ,CAAC,EAAE;QACT,SAAS,CAAC,EAAE,UAAU,CAAC;QACvB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,oBAAoB,CAAC;IAE7B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,mBAAmB,CAAC;IAC/B,IAAI,CAAC,EAAE,kBAAkB,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"user.model.d.ts","sourceRoot":"","sources":["../../src/models/user.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EACL,SAAS,EACT,kBAAkB,EAElB,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,YAAY,CAAC;IACtC,SAAS,EAAE,UAAU,CAAC;IACtB,SAAS,EAAE,UAAU,CAAC;IACtB,QAAQ,EAAE,YAAY,GAAG,UAAU,GAAG,WAAW,GAAG,MAAM,CAAC;IAC3D,aAAa,EAAE,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE;QAEf,SAAS,EAAE,MAAM,CAAC;QAClB,aAAa,EAAE,YAAY,GAAG,WAAW,GAAG,QAAQ,CAAC;QACrD,aAAa,EAAE,IAAI,CAAC;KACrB,CAAC;IACF,QAAQ,CAAC,EAAE;QACT,SAAS,CAAC,EAAE,UAAU,CAAC;QACvB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,oBAAoB,CAAC;IAE7B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,mBAAmB,CAAC;IAC/B,IAAI,CAAC,EAAE,kBAAkB,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAOrC"}
|
|
@@ -10,6 +10,7 @@ export interface IVideoScene {
|
|
|
10
10
|
outputVideoUrl?: string;
|
|
11
11
|
inputVideoUrl?: string;
|
|
12
12
|
inputImageUrl?: string;
|
|
13
|
+
inputAudioUrl?: string;
|
|
13
14
|
status: EVideoSceneStatus;
|
|
14
15
|
creditsUsed?: number;
|
|
15
16
|
errorMessage?: string;
|
|
@@ -39,11 +40,19 @@ export interface IVideoJobModel {
|
|
|
39
40
|
};
|
|
40
41
|
duration?: number;
|
|
41
42
|
mode?: EVideoMode;
|
|
43
|
+
audio?: boolean;
|
|
42
44
|
dimensions?: string;
|
|
43
45
|
resolution?: string;
|
|
44
46
|
aspectRatio?: string;
|
|
45
47
|
inputVideoUrl?: string;
|
|
46
48
|
inputImageUrl?: string;
|
|
49
|
+
inputAudioUrl?: string;
|
|
50
|
+
contentType?: "video" | "avatar-video";
|
|
51
|
+
ttsText?: string;
|
|
52
|
+
ttsProvider?: string;
|
|
53
|
+
ttsVoiceId?: string;
|
|
54
|
+
ttsLanguageCode?: string;
|
|
55
|
+
generatedAudioUrl?: string;
|
|
47
56
|
createdAt: FieldValue;
|
|
48
57
|
updatedAt: FieldValue;
|
|
49
58
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"video.model.d.ts","sourceRoot":"","sources":["../../src/models/video.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,
|
|
1
|
+
{"version":3,"file":"video.model.d.ts","sourceRoot":"","sources":["../../src/models/video.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,WAAW,EACZ,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IAEnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAGhB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CAOpB;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,eAAe,CAAC;IAC1B,MAAM,EAAE,eAAe,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,WAAW,EAAE,CAAC;IACvB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAClC,QAAQ,CAAC,EAAE;QACT,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,SAAS,CAAC,EAAE,UAAU,CAAC;KACxB,CAAA;IAGD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IAGvB,WAAW,CAAC,EAAE,OAAO,GAAG,cAAc,CAAC;IACvC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAG3B,SAAS,EAAE,UAAU,CAAC;IACtB,SAAS,EAAE,UAAU,CAAC;CACvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aiGenFactory.service.d.ts","sourceRoot":"","sources":["../../../src/services/aiGen/aiGenFactory.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EACL,cAAc,EACd,eAAe,EACf,WAAW,EACZ,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"aiGenFactory.service.d.ts","sourceRoot":"","sources":["../../../src/services/aiGen/aiGenFactory.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EACL,cAAc,EACd,eAAe,EACf,WAAW,EACZ,MAAM,wBAAwB,CAAC;AAYhC,KAAK,uBAAuB,GAAG,UAAU,wBAAwB,CAAC;AAElE,eAAO,MAAM,gBAAgB,EAAE,MAAM,CACnC,eAAe,EACf,uBAAuB,CAmDxB,CAAC;AAUF,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,cAAc,EAAE,uBAAuB,CAQzE,CAAC;AAEJ,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,WAAW,GACpB,wBAAwB,CAY1B"}
|
|
@@ -7,28 +7,52 @@ const kling_service_1 = require("./providers/kling/kling.service");
|
|
|
7
7
|
const minimax_service_1 = require("./providers/minimax/minimax.service");
|
|
8
8
|
const openai_service_1 = require("./providers/openai/openai.service");
|
|
9
9
|
const runway_service_1 = require("./providers/runway/runway.service");
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
// import { AlibabaService } from "./providers/alibaba/alibaba";
|
|
11
|
+
// import { AzureService } from "./providers/azure";
|
|
12
|
+
const pixverse_service_1 = require("./providers/pixverse/pixverse.service");
|
|
13
|
+
const bytedance_service_1 = require("./providers/bytedance/bytedance.service");
|
|
12
14
|
exports.videoServicesMap = {
|
|
13
|
-
|
|
14
|
-
"
|
|
15
|
+
// --- Pixverse ---
|
|
16
|
+
"pixverse-v5.6": pixverse_service_1.PixVerseService,
|
|
17
|
+
"pixverse-v5.5": pixverse_service_1.PixVerseService,
|
|
18
|
+
"pixverse-v5": pixverse_service_1.PixVerseService,
|
|
19
|
+
// --- ByteDance ---
|
|
20
|
+
"bytedance-seedance-1.5-pro": bytedance_service_1.ByteDanceService,
|
|
21
|
+
"bytedance-seedance-1.0-pro-fast": bytedance_service_1.ByteDanceService,
|
|
22
|
+
"bytedance-seedance-1.0-pro": bytedance_service_1.ByteDanceService,
|
|
23
|
+
// --- Google ---
|
|
24
|
+
"google-veo-3.1": google_service_1.GoogleService,
|
|
25
|
+
"google-veo-3.1-fast": google_service_1.GoogleService,
|
|
15
26
|
"google-veo-3": google_service_1.GoogleService,
|
|
16
|
-
"google-veo-2": google_service_1.GoogleService,
|
|
17
27
|
"google-veo-3-fast": google_service_1.GoogleService,
|
|
28
|
+
"google-veo-2": google_service_1.GoogleService,
|
|
29
|
+
// --- Runway ---
|
|
30
|
+
"runway-gen4.5": runway_service_1.RunwayService,
|
|
18
31
|
"runway-gen4-turbo": runway_service_1.RunwayService,
|
|
19
32
|
"runway-gen4-aleph": runway_service_1.RunwayService,
|
|
20
|
-
|
|
21
|
-
"kling-
|
|
33
|
+
// --- Kling ---
|
|
34
|
+
"kling-v2.6": kling_service_1.KlingService,
|
|
35
|
+
"kling-v2.5-turbo": kling_service_1.KlingService,
|
|
22
36
|
"kling-v2-master": kling_service_1.KlingService,
|
|
37
|
+
"kling-v2.1": kling_service_1.KlingService,
|
|
23
38
|
"kling-v2.1-master": kling_service_1.KlingService,
|
|
24
|
-
"
|
|
25
|
-
"
|
|
39
|
+
"kling-avatar": kling_service_1.KlingService,
|
|
40
|
+
// "kling-v1.6": KlingService,
|
|
41
|
+
// "kling-v1": KlingService,
|
|
42
|
+
// --- MiniMax ---
|
|
43
|
+
"minimax-hailuo-2.3-fast": minimax_service_1.MinimaxService,
|
|
44
|
+
"minimax-hailuo-2.3": minimax_service_1.MinimaxService,
|
|
26
45
|
"minimax-hailuo-02": minimax_service_1.MinimaxService,
|
|
27
|
-
"
|
|
46
|
+
// "T2V-01-Director": MinimaxService,
|
|
47
|
+
// "T2V-01": MinimaxService,
|
|
48
|
+
// --- Azure ---
|
|
49
|
+
// "azure-sora": AzureService,
|
|
50
|
+
// --- OpenAI ---
|
|
28
51
|
"openai-sora-2": openai_service_1.OpenaiService,
|
|
29
52
|
"openai-sora-2-pro": openai_service_1.OpenaiService,
|
|
30
|
-
|
|
31
|
-
"alibaba-wan-2.
|
|
53
|
+
// --- Alibaba ---
|
|
54
|
+
// "alibaba-wan-2.5": AlibabaService,
|
|
55
|
+
// "alibaba-wan-2.2": AlibabaService,
|
|
32
56
|
};
|
|
33
57
|
// export const imageServicesMap: Record<imageGenModel, BaseAiGenProviderService> = {
|
|
34
58
|
// "openai-dalle-3": DalleService,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bytedance.service.d.ts","sourceRoot":"","sources":["../../../../../src/services/aiGen/providers/bytedance/bytedance.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,UAAU,CAAC;AASlB,qBAAa,gBAAiB,SAAQ,wBAAwB;IAC5D,OAAO,CAAC,QAAQ,CAAC,OAAO,CACsD;IAExE,aAAa,CACjB,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"bytedance.service.d.ts","sourceRoot":"","sources":["../../../../../src/services/aiGen/providers/bytedance/bytedance.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,UAAU,CAAC;AASlB,qBAAa,gBAAiB,SAAQ,wBAAwB;IAC5D,OAAO,CAAC,QAAQ,CAAC,OAAO,CACsD;IAExE,aAAa,CACjB,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,qBAAqB,CAAC;IA6D3B,gBAAgB,CAAC,EACrB,IAAI,EACJ,cAAc,EACd,cAAyB,GAC1B,EAAE,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IA8FjD,aAAa,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM;CAoCjD"}
|
|
@@ -38,6 +38,7 @@ class ByteDanceService extends baseAiGenProvider_service_1.BaseAiGenProviderServ
|
|
|
38
38
|
const body = {
|
|
39
39
|
model: modelId,
|
|
40
40
|
content,
|
|
41
|
+
generate_audio: params.audio || false,
|
|
41
42
|
ratio: params.aspectRatio, // e.g. 16:9
|
|
42
43
|
resolution: params.resolution, // e.g. 720p
|
|
43
44
|
duration: params.duration, // seconds
|
|
@@ -125,8 +126,10 @@ class ByteDanceService extends baseAiGenProvider_service_1.BaseAiGenProviderServ
|
|
|
125
126
|
contentType: "video/mp4",
|
|
126
127
|
resumable: false,
|
|
127
128
|
metadata: {
|
|
128
|
-
firebaseStorageDownloadTokens: downloadToken,
|
|
129
129
|
cacheControl: "public, max-age=31536000",
|
|
130
|
+
metadata: {
|
|
131
|
+
firebaseStorageDownloadTokens: downloadToken,
|
|
132
|
+
},
|
|
130
133
|
},
|
|
131
134
|
});
|
|
132
135
|
const publicVideoUrl = `https://firebasestorage.googleapis.com/v0/b/${bucket.name}` +
|
|
@@ -138,10 +141,10 @@ class ByteDanceService extends baseAiGenProvider_service_1.BaseAiGenProviderServ
|
|
|
138
141
|
}
|
|
139
142
|
getCreditUsed(params) {
|
|
140
143
|
const modelConfig = aiModels_1.aiModelConfigs[params.modelKey];
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
144
|
+
const per1KTokens = params.audio
|
|
145
|
+
? modelConfig.cost?.audio?.per1KTokens
|
|
146
|
+
: modelConfig.cost?.noAudio?.per1KTokens ?? modelConfig.cost?.per1KTokens;
|
|
147
|
+
if (!per1KTokens || !params.resolution || !params.aspectRatio || !params.duration) {
|
|
145
148
|
logger_1.logger.warn(`Missing cost or parameters for credit calculation. Returning default credits. Params: ${JSON.stringify(params)}, ModelConfig: ${JSON.stringify(modelConfig)}`);
|
|
146
149
|
return 10; // default fallback
|
|
147
150
|
}
|
|
@@ -151,9 +154,35 @@ class ByteDanceService extends baseAiGenProvider_service_1.BaseAiGenProviderServ
|
|
|
151
154
|
return 10; // default fallback
|
|
152
155
|
}
|
|
153
156
|
const FRAME_RATE = 24;
|
|
154
|
-
const tokensConsumed = Math.ceil((dims
|
|
155
|
-
const cost = (
|
|
157
|
+
const tokensConsumed = Math.ceil((dims.width * dims.height * FRAME_RATE * params.duration) / 1024);
|
|
158
|
+
const cost = (per1KTokens * tokensConsumed) / 1000;
|
|
156
159
|
return (0, helpers_2.getCreditsFromCost)(cost);
|
|
157
160
|
}
|
|
158
161
|
}
|
|
159
162
|
exports.ByteDanceService = ByteDanceService;
|
|
163
|
+
const dimensionsMap = {
|
|
164
|
+
"480p": {
|
|
165
|
+
"16:9": { width: 848, height: 480 },
|
|
166
|
+
"9:16": { width: 480, height: 848 },
|
|
167
|
+
"1:1": { width: 480, height: 480 },
|
|
168
|
+
"4:3": { width: 640, height: 480 },
|
|
169
|
+
"3:4": { width: 480, height: 640 },
|
|
170
|
+
"21:9": { width: 1008, height: 432 },
|
|
171
|
+
},
|
|
172
|
+
"720p": {
|
|
173
|
+
"16:9": { width: 1280, height: 720 },
|
|
174
|
+
"9:16": { width: 720, height: 1280 },
|
|
175
|
+
"1:1": { width: 720, height: 720 },
|
|
176
|
+
"4:3": { width: 960, height: 720 },
|
|
177
|
+
"3:4": { width: 720, height: 960 },
|
|
178
|
+
"21:9": { width: 1680, height: 720 },
|
|
179
|
+
},
|
|
180
|
+
"1080p": {
|
|
181
|
+
"16:9": { width: 1920, height: 1080 },
|
|
182
|
+
"9:16": { width: 1080, height: 1920 },
|
|
183
|
+
"1:1": { width: 1080, height: 1080 },
|
|
184
|
+
"4:3": { width: 1440, height: 1080 },
|
|
185
|
+
"3:4": { width: 1080, height: 1440 },
|
|
186
|
+
"21:9": { width: 2520, height: 1080 },
|
|
187
|
+
},
|
|
188
|
+
};
|
|
@@ -24,7 +24,7 @@ class GoogleService extends baseAiGenProvider_service_1.BaseAiGenProviderService
|
|
|
24
24
|
(0, helpers_2.validateParams)(params);
|
|
25
25
|
const modelConfig = aiModels_1.aiModelConfigs[params.modelKey];
|
|
26
26
|
const modelId = modelConfig.modelId;
|
|
27
|
-
console.log("GoogleService.generateVideo - modelId:", modelId, params);
|
|
27
|
+
// console.log("GoogleService.generateVideo - modelId:", modelId, params);
|
|
28
28
|
const request = {
|
|
29
29
|
model: modelId,
|
|
30
30
|
prompt: params.prompt,
|
|
@@ -2,11 +2,16 @@ import { BaseAiGenProviderService } from "../baseAiGenProvider.service";
|
|
|
2
2
|
import { CreditUsageParams, VideoGenerationParams, VideoGenerationResult, VideoStatusParams, VideoStatusResult } from "../types";
|
|
3
3
|
export declare class KlingService extends BaseAiGenProviderService {
|
|
4
4
|
private readonly baseUrl;
|
|
5
|
-
private readonly
|
|
5
|
+
private readonly generateTimeout;
|
|
6
|
+
private readonly statusTimeout;
|
|
6
7
|
constructor();
|
|
7
8
|
private request;
|
|
8
9
|
generateVideo(params: VideoGenerationParams): Promise<VideoGenerationResult>;
|
|
9
|
-
|
|
10
|
+
private generateAvatarVideo;
|
|
11
|
+
private requestWithTimeoutRetry;
|
|
12
|
+
checkVideoStatus(params: VideoStatusParams): Promise<VideoStatusResult>;
|
|
13
|
+
private checkRegularVideoStatus;
|
|
14
|
+
private checkAvatarVideoStatus;
|
|
10
15
|
encodeJwtToken(): string;
|
|
11
16
|
getCreditUsed({ modelKey, mode, duration, }: CreditUsageParams): number;
|
|
12
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kling.service.d.ts","sourceRoot":"","sources":["../../../../../src/services/aiGen/providers/kling/kling.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"kling.service.d.ts","sourceRoot":"","sources":["../../../../../src/services/aiGen/providers/kling/kling.service.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,UAAU,CAAC;AAYlB,qBAAa,YAAa,SAAQ,wBAAwB;IACxD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAuC;IAC/D,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAW;IAC3C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAU;;YAW1B,OAAO;IA8Bf,aAAa,CACjB,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,qBAAqB,CAAC;YAqCnB,mBAAmB;YAqCnB,uBAAuB;IAmC/B,gBAAgB,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC;YAO/D,uBAAuB;YAgEvB,sBAAsB;IA6DpC,cAAc,IAAI,MAAM;IAexB,aAAa,CAAC,EACZ,QAAQ,EACR,IAA8B,EAC9B,QAAY,GACb,EAAE,iBAAiB,GAAG,MAAM;CAc9B"}
|