@sync.so/sdk 0.2.3 → 0.2.4
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/api/resources/batch/client/Client.js +3 -3
- package/api/resources/common/types/Audio.d.ts +2 -0
- package/api/resources/common/types/CreateGenerationDto.d.ts +3 -1
- package/api/resources/common/types/GenerationSegment.d.ts +15 -0
- package/api/resources/common/types/GenerationSegment.js +5 -0
- package/api/resources/common/types/GenerationStatus.d.ts +2 -1
- package/api/resources/common/types/GenerationStatus.js +1 -0
- package/api/resources/common/types/SegmentAudioInput.d.ts +14 -0
- package/api/resources/common/types/SegmentAudioInput.js +5 -0
- package/api/resources/common/types/Tts.d.ts +2 -0
- package/api/resources/common/types/Video.d.ts +2 -2
- package/api/resources/common/types/index.d.ts +2 -0
- package/api/resources/common/types/index.js +2 -0
- package/api/resources/generations/client/Client.js +5 -5
- package/dist/api/resources/batch/client/Client.js +3 -3
- package/dist/api/resources/common/types/Audio.d.ts +2 -0
- package/dist/api/resources/common/types/CreateGenerationDto.d.ts +3 -1
- package/dist/api/resources/common/types/GenerationSegment.d.ts +15 -0
- package/dist/api/resources/common/types/GenerationSegment.js +5 -0
- package/dist/api/resources/common/types/GenerationStatus.d.ts +2 -1
- package/dist/api/resources/common/types/GenerationStatus.js +1 -0
- package/dist/api/resources/common/types/SegmentAudioInput.d.ts +14 -0
- package/dist/api/resources/common/types/SegmentAudioInput.js +5 -0
- package/dist/api/resources/common/types/Tts.d.ts +2 -0
- package/dist/api/resources/common/types/Video.d.ts +2 -2
- package/dist/api/resources/common/types/index.d.ts +2 -0
- package/dist/api/resources/common/types/index.js +2 -0
- package/dist/api/resources/generations/client/Client.js +5 -5
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -100,7 +100,7 @@ class Batch {
|
|
|
100
100
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
101
101
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SyncEnvironment.Default, "/v2/batch"),
|
|
102
102
|
method: "POST",
|
|
103
|
-
headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.2.
|
|
103
|
+
headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.2.4", "User-Agent": "@sync.so/sdk/0.2.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
104
104
|
requestType: "file",
|
|
105
105
|
duplex: _maybeEncodedRequest.duplex,
|
|
106
106
|
body: _maybeEncodedRequest.body,
|
|
@@ -170,7 +170,7 @@ class Batch {
|
|
|
170
170
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
171
171
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SyncEnvironment.Default, `/v2/batch/${encodeURIComponent(id)}`),
|
|
172
172
|
method: "GET",
|
|
173
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.2.
|
|
173
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.2.4", "User-Agent": "@sync.so/sdk/0.2.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
174
174
|
contentType: "application/json",
|
|
175
175
|
requestType: "json",
|
|
176
176
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -245,7 +245,7 @@ class Batch {
|
|
|
245
245
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
246
246
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SyncEnvironment.Default, "/v2/batch"),
|
|
247
247
|
method: "GET",
|
|
248
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.2.
|
|
248
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.2.4", "User-Agent": "@sync.so/sdk/0.2.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
249
249
|
contentType: "application/json",
|
|
250
250
|
queryParameters: _queryParams,
|
|
251
251
|
requestType: "json",
|
|
@@ -8,4 +8,6 @@ export interface Audio {
|
|
|
8
8
|
type: "audio";
|
|
9
9
|
/** URL of the audio to be used for generation */
|
|
10
10
|
url: string;
|
|
11
|
+
/** Reference identifier for this audio input, used to link audio inputs to specific segments when using [segments](/api-reference/api/generate-api/create#request.body.segments). Required when using segments array. */
|
|
12
|
+
refId?: string;
|
|
11
13
|
}
|
|
@@ -5,10 +5,12 @@ import * as Sync from "../../../index";
|
|
|
5
5
|
export interface CreateGenerationDto {
|
|
6
6
|
/** name of the model to use for generation. */
|
|
7
7
|
model: Sync.Model;
|
|
8
|
-
/** Array of input objects. Must include one video input item and one audio input item. Audio input items can be provided as either: recorded/captured audio url or a text-to-speech input with tts provider configuration. */
|
|
8
|
+
/** Array of input objects. Must include one video input item and at least one audio input item. Audio input items can be provided as either: recorded/captured audio url or a text-to-speech input with tts provider configuration. When using segments, multiple audio inputs can be provided with unique refId values. */
|
|
9
9
|
input: Sync.Input[];
|
|
10
10
|
/** additional options available for generation. */
|
|
11
11
|
options?: Sync.GenerationOptions;
|
|
12
|
+
/** segments definition list. When provided, allows defining one or more video segments with different audio inputs for each segment. Each segment specifies a time range and references an audio input by refId. */
|
|
13
|
+
segments?: Sync.GenerationSegment[];
|
|
12
14
|
/** webhook url for generation status updates. once the generation completes we will send a POST request to the webhook url with the generation data. */
|
|
13
15
|
webhookUrl?: string;
|
|
14
16
|
/** Base filename for the generated output without extension. The .mp4 extension will be added automatically. Only alphanumeric characters, underscores, and hyphens are allowed, up to 255 characters. */
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Sync from "../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* Defines a video segment with its corresponding audio input. Used for multi-segment lipsync generations where different audio tracks can be applied to different video segments.
|
|
7
|
+
*/
|
|
8
|
+
export interface GenerationSegment {
|
|
9
|
+
/** Segment start time in seconds */
|
|
10
|
+
start_time: number;
|
|
11
|
+
/** Segment end time in seconds */
|
|
12
|
+
end_time: number;
|
|
13
|
+
/** Audio configuration for this segment */
|
|
14
|
+
audio_input: Sync.SegmentAudioInput;
|
|
15
|
+
}
|
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* The status of the generation.
|
|
6
6
|
*/
|
|
7
|
-
export type GenerationStatus = "PENDING" | "PROCESSING" | "COMPLETED" | "FAILED";
|
|
7
|
+
export type GenerationStatus = "PENDING" | "PROCESSING" | "COMPLETED" | "FAILED" | "REJECTED";
|
|
8
8
|
export declare const GenerationStatus: {
|
|
9
9
|
readonly Pending: "PENDING";
|
|
10
10
|
readonly Processing: "PROCESSING";
|
|
11
11
|
readonly Completed: "COMPLETED";
|
|
12
12
|
readonly Failed: "FAILED";
|
|
13
|
+
readonly Rejected: "REJECTED";
|
|
13
14
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Audio input configuration for a specific segment. References an audio input by refId and optionally crops the audio to a specific time range.
|
|
6
|
+
*/
|
|
7
|
+
export interface SegmentAudioInput {
|
|
8
|
+
/** Reference ID of the audio/text-to-speech input to use for this segment */
|
|
9
|
+
refId: string;
|
|
10
|
+
/** Optional start time (in seconds) to crop the referenced audio. When specified, end_time must also be provided. */
|
|
11
|
+
start_time?: number;
|
|
12
|
+
/** Optional end time (in seconds) to crop the referenced audio. When specified, start_time must also be provided. */
|
|
13
|
+
end_time?: number;
|
|
14
|
+
}
|
|
@@ -9,4 +9,6 @@ export interface Tts {
|
|
|
9
9
|
type: "text";
|
|
10
10
|
/** Integration provider configuration */
|
|
11
11
|
provider: Sync.TtsProviderConfig;
|
|
12
|
+
/** Reference identifier for this audio input, used to link audio inputs to specific segments when using [segments](/api-reference/api/generate-api/create#request.body.segments). Required when using segments array. */
|
|
13
|
+
refId?: string;
|
|
12
14
|
}
|
|
@@ -6,8 +6,8 @@ export interface Video {
|
|
|
6
6
|
type: "video";
|
|
7
7
|
/** URL of the video to be used for generation */
|
|
8
8
|
url: string;
|
|
9
|
-
/** Start time and end time (in seconds) of the video segment to apply generation to. Configured as a list of lists, where each inner list contains the start time and end time of the segment. Currently only one segment is supported. ex: [[10.5, 20.5]] will lipsync only the segment between 10.5 and 20.5 seconds of the video. */
|
|
9
|
+
/** [DEPRECATED] Use the top-level segments array instead for multi-segment support. Start time and end time (in seconds) of the video segment to apply generation to. Configured as a list of lists, where each inner list contains the start time and end time of the segment. Currently only one segment is supported. ex: [[10.5, 20.5]] will lipsync only the segment between 10.5 and 20.5 seconds of the video. */
|
|
10
10
|
segments_secs?: Sync.SegmentSecs;
|
|
11
|
-
/** Start frame and end frame of the video segment to apply generation to. Configured as a list of lists, where each inner list contains the start frame and end frame of the segment. Currently only one segment is supported. ex: [[100, 200]] will lipsync only the segment between frames 100 and 200 of the video */
|
|
11
|
+
/** [DEPRECATED] Use the top-level segments array instead for multi-segment support. Start frame and end frame of the video segment to apply generation to. Configured as a list of lists, where each inner list contains the start frame and end frame of the segment. Currently only one segment is supported. ex: [[100, 200]] will lipsync only the segment between frames 100 and 200 of the video */
|
|
12
12
|
segments_frames?: Sync.SegmentFrames;
|
|
13
13
|
}
|
|
@@ -17,6 +17,8 @@ export * from "./Audio";
|
|
|
17
17
|
export * from "./Video";
|
|
18
18
|
export * from "./SegmentSecs";
|
|
19
19
|
export * from "./SegmentFrames";
|
|
20
|
+
export * from "./GenerationSegment";
|
|
21
|
+
export * from "./SegmentAudioInput";
|
|
20
22
|
export * from "./BatchId";
|
|
21
23
|
export * from "./BatchResponse";
|
|
22
24
|
export * from "./BatchStatus";
|
|
@@ -33,6 +33,8 @@ __exportStar(require("./Audio"), exports);
|
|
|
33
33
|
__exportStar(require("./Video"), exports);
|
|
34
34
|
__exportStar(require("./SegmentSecs"), exports);
|
|
35
35
|
__exportStar(require("./SegmentFrames"), exports);
|
|
36
|
+
__exportStar(require("./GenerationSegment"), exports);
|
|
37
|
+
__exportStar(require("./SegmentAudioInput"), exports);
|
|
36
38
|
__exportStar(require("./BatchId"), exports);
|
|
37
39
|
__exportStar(require("./BatchResponse"), exports);
|
|
38
40
|
__exportStar(require("./BatchStatus"), exports);
|
|
@@ -91,7 +91,7 @@ class Generations {
|
|
|
91
91
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
92
92
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SyncEnvironment.Default, "/v2/generate"),
|
|
93
93
|
method: "POST",
|
|
94
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.2.
|
|
94
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.2.4", "User-Agent": "@sync.so/sdk/0.2.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
95
95
|
contentType: "application/json",
|
|
96
96
|
requestType: "json",
|
|
97
97
|
body: request,
|
|
@@ -179,7 +179,7 @@ class Generations {
|
|
|
179
179
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
180
180
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SyncEnvironment.Default, "/v2/generate"),
|
|
181
181
|
method: "POST",
|
|
182
|
-
headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.2.
|
|
182
|
+
headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.2.4", "User-Agent": "@sync.so/sdk/0.2.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
183
183
|
requestType: "file",
|
|
184
184
|
duplex: _maybeEncodedRequest.duplex,
|
|
185
185
|
body: _maybeEncodedRequest.body,
|
|
@@ -243,7 +243,7 @@ class Generations {
|
|
|
243
243
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
244
244
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SyncEnvironment.Default, `/v2/generate/${encodeURIComponent(id)}`),
|
|
245
245
|
method: "GET",
|
|
246
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.2.
|
|
246
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.2.4", "User-Agent": "@sync.so/sdk/0.2.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
247
247
|
contentType: "application/json",
|
|
248
248
|
requestType: "json",
|
|
249
249
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -310,7 +310,7 @@ class Generations {
|
|
|
310
310
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
311
311
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SyncEnvironment.Default, "/v2/generations"),
|
|
312
312
|
method: "GET",
|
|
313
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.2.
|
|
313
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.2.4", "User-Agent": "@sync.so/sdk/0.2.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
314
314
|
contentType: "application/json",
|
|
315
315
|
queryParameters: _queryParams,
|
|
316
316
|
requestType: "json",
|
|
@@ -383,7 +383,7 @@ class Generations {
|
|
|
383
383
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
384
384
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SyncEnvironment.Default, "/v2/analyze/cost"),
|
|
385
385
|
method: "POST",
|
|
386
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.2.
|
|
386
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.2.4", "User-Agent": "@sync.so/sdk/0.2.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
387
387
|
contentType: "application/json",
|
|
388
388
|
requestType: "json",
|
|
389
389
|
body: request,
|
|
@@ -100,7 +100,7 @@ class Batch {
|
|
|
100
100
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
101
101
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SyncEnvironment.Default, "/v2/batch"),
|
|
102
102
|
method: "POST",
|
|
103
|
-
headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.2.
|
|
103
|
+
headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.2.4", "User-Agent": "@sync.so/sdk/0.2.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
104
104
|
requestType: "file",
|
|
105
105
|
duplex: _maybeEncodedRequest.duplex,
|
|
106
106
|
body: _maybeEncodedRequest.body,
|
|
@@ -170,7 +170,7 @@ class Batch {
|
|
|
170
170
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
171
171
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SyncEnvironment.Default, `/v2/batch/${encodeURIComponent(id)}`),
|
|
172
172
|
method: "GET",
|
|
173
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.2.
|
|
173
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.2.4", "User-Agent": "@sync.so/sdk/0.2.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
174
174
|
contentType: "application/json",
|
|
175
175
|
requestType: "json",
|
|
176
176
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -245,7 +245,7 @@ class Batch {
|
|
|
245
245
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
246
246
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SyncEnvironment.Default, "/v2/batch"),
|
|
247
247
|
method: "GET",
|
|
248
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.2.
|
|
248
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.2.4", "User-Agent": "@sync.so/sdk/0.2.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
249
249
|
contentType: "application/json",
|
|
250
250
|
queryParameters: _queryParams,
|
|
251
251
|
requestType: "json",
|
|
@@ -8,4 +8,6 @@ export interface Audio {
|
|
|
8
8
|
type: "audio";
|
|
9
9
|
/** URL of the audio to be used for generation */
|
|
10
10
|
url: string;
|
|
11
|
+
/** Reference identifier for this audio input, used to link audio inputs to specific segments when using [segments](/api-reference/api/generate-api/create#request.body.segments). Required when using segments array. */
|
|
12
|
+
refId?: string;
|
|
11
13
|
}
|
|
@@ -5,10 +5,12 @@ import * as Sync from "../../../index";
|
|
|
5
5
|
export interface CreateGenerationDto {
|
|
6
6
|
/** name of the model to use for generation. */
|
|
7
7
|
model: Sync.Model;
|
|
8
|
-
/** Array of input objects. Must include one video input item and one audio input item. Audio input items can be provided as either: recorded/captured audio url or a text-to-speech input with tts provider configuration. */
|
|
8
|
+
/** Array of input objects. Must include one video input item and at least one audio input item. Audio input items can be provided as either: recorded/captured audio url or a text-to-speech input with tts provider configuration. When using segments, multiple audio inputs can be provided with unique refId values. */
|
|
9
9
|
input: Sync.Input[];
|
|
10
10
|
/** additional options available for generation. */
|
|
11
11
|
options?: Sync.GenerationOptions;
|
|
12
|
+
/** segments definition list. When provided, allows defining one or more video segments with different audio inputs for each segment. Each segment specifies a time range and references an audio input by refId. */
|
|
13
|
+
segments?: Sync.GenerationSegment[];
|
|
12
14
|
/** webhook url for generation status updates. once the generation completes we will send a POST request to the webhook url with the generation data. */
|
|
13
15
|
webhookUrl?: string;
|
|
14
16
|
/** Base filename for the generated output without extension. The .mp4 extension will be added automatically. Only alphanumeric characters, underscores, and hyphens are allowed, up to 255 characters. */
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Sync from "../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* Defines a video segment with its corresponding audio input. Used for multi-segment lipsync generations where different audio tracks can be applied to different video segments.
|
|
7
|
+
*/
|
|
8
|
+
export interface GenerationSegment {
|
|
9
|
+
/** Segment start time in seconds */
|
|
10
|
+
start_time: number;
|
|
11
|
+
/** Segment end time in seconds */
|
|
12
|
+
end_time: number;
|
|
13
|
+
/** Audio configuration for this segment */
|
|
14
|
+
audio_input: Sync.SegmentAudioInput;
|
|
15
|
+
}
|
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* The status of the generation.
|
|
6
6
|
*/
|
|
7
|
-
export type GenerationStatus = "PENDING" | "PROCESSING" | "COMPLETED" | "FAILED";
|
|
7
|
+
export type GenerationStatus = "PENDING" | "PROCESSING" | "COMPLETED" | "FAILED" | "REJECTED";
|
|
8
8
|
export declare const GenerationStatus: {
|
|
9
9
|
readonly Pending: "PENDING";
|
|
10
10
|
readonly Processing: "PROCESSING";
|
|
11
11
|
readonly Completed: "COMPLETED";
|
|
12
12
|
readonly Failed: "FAILED";
|
|
13
|
+
readonly Rejected: "REJECTED";
|
|
13
14
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Audio input configuration for a specific segment. References an audio input by refId and optionally crops the audio to a specific time range.
|
|
6
|
+
*/
|
|
7
|
+
export interface SegmentAudioInput {
|
|
8
|
+
/** Reference ID of the audio/text-to-speech input to use for this segment */
|
|
9
|
+
refId: string;
|
|
10
|
+
/** Optional start time (in seconds) to crop the referenced audio. When specified, end_time must also be provided. */
|
|
11
|
+
start_time?: number;
|
|
12
|
+
/** Optional end time (in seconds) to crop the referenced audio. When specified, start_time must also be provided. */
|
|
13
|
+
end_time?: number;
|
|
14
|
+
}
|
|
@@ -9,4 +9,6 @@ export interface Tts {
|
|
|
9
9
|
type: "text";
|
|
10
10
|
/** Integration provider configuration */
|
|
11
11
|
provider: Sync.TtsProviderConfig;
|
|
12
|
+
/** Reference identifier for this audio input, used to link audio inputs to specific segments when using [segments](/api-reference/api/generate-api/create#request.body.segments). Required when using segments array. */
|
|
13
|
+
refId?: string;
|
|
12
14
|
}
|
|
@@ -6,8 +6,8 @@ export interface Video {
|
|
|
6
6
|
type: "video";
|
|
7
7
|
/** URL of the video to be used for generation */
|
|
8
8
|
url: string;
|
|
9
|
-
/** Start time and end time (in seconds) of the video segment to apply generation to. Configured as a list of lists, where each inner list contains the start time and end time of the segment. Currently only one segment is supported. ex: [[10.5, 20.5]] will lipsync only the segment between 10.5 and 20.5 seconds of the video. */
|
|
9
|
+
/** [DEPRECATED] Use the top-level segments array instead for multi-segment support. Start time and end time (in seconds) of the video segment to apply generation to. Configured as a list of lists, where each inner list contains the start time and end time of the segment. Currently only one segment is supported. ex: [[10.5, 20.5]] will lipsync only the segment between 10.5 and 20.5 seconds of the video. */
|
|
10
10
|
segments_secs?: Sync.SegmentSecs;
|
|
11
|
-
/** Start frame and end frame of the video segment to apply generation to. Configured as a list of lists, where each inner list contains the start frame and end frame of the segment. Currently only one segment is supported. ex: [[100, 200]] will lipsync only the segment between frames 100 and 200 of the video */
|
|
11
|
+
/** [DEPRECATED] Use the top-level segments array instead for multi-segment support. Start frame and end frame of the video segment to apply generation to. Configured as a list of lists, where each inner list contains the start frame and end frame of the segment. Currently only one segment is supported. ex: [[100, 200]] will lipsync only the segment between frames 100 and 200 of the video */
|
|
12
12
|
segments_frames?: Sync.SegmentFrames;
|
|
13
13
|
}
|
|
@@ -17,6 +17,8 @@ export * from "./Audio";
|
|
|
17
17
|
export * from "./Video";
|
|
18
18
|
export * from "./SegmentSecs";
|
|
19
19
|
export * from "./SegmentFrames";
|
|
20
|
+
export * from "./GenerationSegment";
|
|
21
|
+
export * from "./SegmentAudioInput";
|
|
20
22
|
export * from "./BatchId";
|
|
21
23
|
export * from "./BatchResponse";
|
|
22
24
|
export * from "./BatchStatus";
|
|
@@ -33,6 +33,8 @@ __exportStar(require("./Audio"), exports);
|
|
|
33
33
|
__exportStar(require("./Video"), exports);
|
|
34
34
|
__exportStar(require("./SegmentSecs"), exports);
|
|
35
35
|
__exportStar(require("./SegmentFrames"), exports);
|
|
36
|
+
__exportStar(require("./GenerationSegment"), exports);
|
|
37
|
+
__exportStar(require("./SegmentAudioInput"), exports);
|
|
36
38
|
__exportStar(require("./BatchId"), exports);
|
|
37
39
|
__exportStar(require("./BatchResponse"), exports);
|
|
38
40
|
__exportStar(require("./BatchStatus"), exports);
|
|
@@ -91,7 +91,7 @@ class Generations {
|
|
|
91
91
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
92
92
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SyncEnvironment.Default, "/v2/generate"),
|
|
93
93
|
method: "POST",
|
|
94
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.2.
|
|
94
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.2.4", "User-Agent": "@sync.so/sdk/0.2.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
95
95
|
contentType: "application/json",
|
|
96
96
|
requestType: "json",
|
|
97
97
|
body: request,
|
|
@@ -179,7 +179,7 @@ class Generations {
|
|
|
179
179
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
180
180
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SyncEnvironment.Default, "/v2/generate"),
|
|
181
181
|
method: "POST",
|
|
182
|
-
headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.2.
|
|
182
|
+
headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.2.4", "User-Agent": "@sync.so/sdk/0.2.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
183
183
|
requestType: "file",
|
|
184
184
|
duplex: _maybeEncodedRequest.duplex,
|
|
185
185
|
body: _maybeEncodedRequest.body,
|
|
@@ -243,7 +243,7 @@ class Generations {
|
|
|
243
243
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
244
244
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SyncEnvironment.Default, `/v2/generate/${encodeURIComponent(id)}`),
|
|
245
245
|
method: "GET",
|
|
246
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.2.
|
|
246
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.2.4", "User-Agent": "@sync.so/sdk/0.2.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
247
247
|
contentType: "application/json",
|
|
248
248
|
requestType: "json",
|
|
249
249
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -310,7 +310,7 @@ class Generations {
|
|
|
310
310
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
311
311
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SyncEnvironment.Default, "/v2/generations"),
|
|
312
312
|
method: "GET",
|
|
313
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.2.
|
|
313
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.2.4", "User-Agent": "@sync.so/sdk/0.2.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
314
314
|
contentType: "application/json",
|
|
315
315
|
queryParameters: _queryParams,
|
|
316
316
|
requestType: "json",
|
|
@@ -383,7 +383,7 @@ class Generations {
|
|
|
383
383
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
384
384
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SyncEnvironment.Default, "/v2/analyze/cost"),
|
|
385
385
|
method: "POST",
|
|
386
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.2.
|
|
386
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.2.4", "User-Agent": "@sync.so/sdk/0.2.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
387
387
|
contentType: "application/json",
|
|
388
388
|
requestType: "json",
|
|
389
389
|
body: request,
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.2.
|
|
1
|
+
export declare const SDK_VERSION = "0.2.4";
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
package/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.2.
|
|
1
|
+
export declare const SDK_VERSION = "0.2.4";
|
package/version.js
CHANGED