@sync.so/sdk 0.2.4 → 0.2.6

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.
Files changed (35) hide show
  1. package/api/resources/batch/client/Client.js +3 -3
  2. package/api/resources/common/types/Emotion.d.ts +15 -0
  3. package/api/resources/common/types/Emotion.js +14 -0
  4. package/api/resources/common/types/Generation.d.ts +2 -0
  5. package/api/resources/common/types/GenerationOptions.d.ts +4 -0
  6. package/api/resources/common/types/GenerationSegment.d.ts +3 -3
  7. package/api/resources/common/types/Model.d.ts +2 -1
  8. package/api/resources/common/types/Model.js +1 -0
  9. package/api/resources/common/types/ModelMode.d.ts +12 -0
  10. package/api/resources/common/types/ModelMode.js +11 -0
  11. package/api/resources/common/types/SegmentAudioInput.d.ts +2 -2
  12. package/api/resources/common/types/Video.d.ts +2 -2
  13. package/api/resources/common/types/index.d.ts +2 -0
  14. package/api/resources/common/types/index.js +2 -0
  15. package/api/resources/generations/client/Client.js +5 -5
  16. package/dist/api/resources/batch/client/Client.js +3 -3
  17. package/dist/api/resources/common/types/Emotion.d.ts +15 -0
  18. package/dist/api/resources/common/types/Emotion.js +14 -0
  19. package/dist/api/resources/common/types/Generation.d.ts +2 -0
  20. package/dist/api/resources/common/types/GenerationOptions.d.ts +4 -0
  21. package/dist/api/resources/common/types/GenerationSegment.d.ts +3 -3
  22. package/dist/api/resources/common/types/Model.d.ts +2 -1
  23. package/dist/api/resources/common/types/Model.js +1 -0
  24. package/dist/api/resources/common/types/ModelMode.d.ts +12 -0
  25. package/dist/api/resources/common/types/ModelMode.js +11 -0
  26. package/dist/api/resources/common/types/SegmentAudioInput.d.ts +2 -2
  27. package/dist/api/resources/common/types/Video.d.ts +2 -2
  28. package/dist/api/resources/common/types/index.d.ts +2 -0
  29. package/dist/api/resources/common/types/index.js +2 -0
  30. package/dist/api/resources/generations/client/Client.js +5 -5
  31. package/dist/version.d.ts +1 -1
  32. package/dist/version.js +1 -1
  33. package/package.json +1 -1
  34. package/version.d.ts +1 -1
  35. 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.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),
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.6", "User-Agent": "@sync.so/sdk/0.2.6", "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.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),
173
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.2.6", "User-Agent": "@sync.so/sdk/0.2.6", "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.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),
248
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.2.6", "User-Agent": "@sync.so/sdk/0.2.6", "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",
@@ -0,0 +1,15 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * emotion prompt for react-1 model.
6
+ */
7
+ export type Emotion = "happy" | "sad" | "angry" | "disgusted" | "surprised" | "neutral";
8
+ export declare const Emotion: {
9
+ readonly Happy: "happy";
10
+ readonly Sad: "sad";
11
+ readonly Angry: "angry";
12
+ readonly Disgusted: "disgusted";
13
+ readonly Surprised: "surprised";
14
+ readonly Neutral: "neutral";
15
+ };
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Emotion = void 0;
7
+ exports.Emotion = {
8
+ Happy: "happy",
9
+ Sad: "sad",
10
+ Angry: "angry",
11
+ Disgusted: "disgusted",
12
+ Surprised: "surprised",
13
+ Neutral: "neutral",
14
+ };
@@ -20,6 +20,8 @@ export interface Generation {
20
20
  outputDuration?: number;
21
21
  /** The URL of the output media. */
22
22
  outputUrl?: string;
23
+ /** The segments of the generation. */
24
+ segments?: Sync.GenerationSegment[];
23
25
  /** The URL of the segment output media. */
24
26
  segmentOutputUrl?: string;
25
27
  /** The status of the generation. */
@@ -5,6 +5,10 @@ import * as Sync from "../../../index";
5
5
  export interface GenerationOptions {
6
6
  /** Defines how to handle duration mismatches between video and audio inputs. See the [Media Content Tips](/compatibility-and-tips/media-content-tips#sync-mode-options) guide for a brief overview, or the SyncMode enum below for detailed explanations of each option. */
7
7
  sync_mode?: Sync.SyncMode;
8
+ /** edit region for the model. only works with react-1. defaults to face, which affects lipsync + emotions in the face region. Available options are lips/face/head. When head is selected, model generates natural talking head movements along with emotions + lipsync. */
9
+ model_mode?: Sync.ModelMode;
10
+ /** emotion prompt for the generation. only works for react-1 model. Only single word emotions are supported at the moment. */
11
+ prompt?: Sync.Emotion;
8
12
  /** option to control how expressive lipsync can be. 0 -> least expressive, 1 -> most expressive. default:0.5 */
9
13
  temperature?: number;
10
14
  /** Active speaker detection configuration. When enabled, automatically detects and applies lipsync only to the active speaker in videos with multiple people. */
@@ -7,9 +7,9 @@ import * as Sync from "../../../index";
7
7
  */
8
8
  export interface GenerationSegment {
9
9
  /** Segment start time in seconds */
10
- start_time: number;
10
+ startTime: number;
11
11
  /** Segment end time in seconds */
12
- end_time: number;
12
+ endTime: number;
13
13
  /** Audio configuration for this segment */
14
- audio_input: Sync.SegmentAudioInput;
14
+ audioInput: Sync.SegmentAudioInput;
15
15
  }
@@ -4,9 +4,10 @@
4
4
  /**
5
5
  * name of the model to use for generation.
6
6
  */
7
- export type Model = "lipsync-2" | "lipsync-1.9.0-beta" | "lipsync-2-pro";
7
+ export type Model = "lipsync-2" | "lipsync-1.9.0-beta" | "lipsync-2-pro" | "react-1";
8
8
  export declare const Model: {
9
9
  readonly Lipsync2: "lipsync-2";
10
10
  readonly Lipsync190Beta: "lipsync-1.9.0-beta";
11
11
  readonly Lipsync2Pro: "lipsync-2-pro";
12
+ readonly React1: "react-1";
12
13
  };
@@ -8,4 +8,5 @@ exports.Model = {
8
8
  Lipsync2: "lipsync-2",
9
9
  Lipsync190Beta: "lipsync-1.9.0-beta",
10
10
  Lipsync2Pro: "lipsync-2-pro",
11
+ React1: "react-1",
11
12
  };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * mode of the model to use for generation. only works with react-1 model
6
+ */
7
+ export type ModelMode = "lips" | "face" | "head";
8
+ export declare const ModelMode: {
9
+ readonly Lips: "lips";
10
+ readonly Face: "face";
11
+ readonly Head: "head";
12
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ModelMode = void 0;
7
+ exports.ModelMode = {
8
+ Lips: "lips",
9
+ Face: "face",
10
+ Head: "head",
11
+ };
@@ -8,7 +8,7 @@ export interface SegmentAudioInput {
8
8
  /** Reference ID of the audio/text-to-speech input to use for this segment */
9
9
  refId: string;
10
10
  /** Optional start time (in seconds) to crop the referenced audio. When specified, end_time must also be provided. */
11
- start_time?: number;
11
+ startTime?: number;
12
12
  /** Optional end time (in seconds) to crop the referenced audio. When specified, start_time must also be provided. */
13
- end_time?: number;
13
+ endTime?: number;
14
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
- /** [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. */
9
+ /** [DEPRECATED] Use the top-level [segments](/api-reference/api/generate-api/create#request.body.segments) array instead for multi-segment support. */
10
10
  segments_secs?: Sync.SegmentSecs;
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 */
11
+ /** [DEPRECATED] Use the top-level [segments](/api-reference/api/generate-api/create#request.body.segments) array instead for multi-segment support. frames 100 and 200 of the video */
12
12
  segments_frames?: Sync.SegmentFrames;
13
13
  }
@@ -2,6 +2,8 @@ export * from "./GenerationId";
2
2
  export * from "./CreateGenerationDto";
3
3
  export * from "./Input";
4
4
  export * from "./Model";
5
+ export * from "./Emotion";
6
+ export * from "./ModelMode";
5
7
  export * from "./EstimatedGenerationCost";
6
8
  export * from "./Generation";
7
9
  export * from "./GenerationError";
@@ -18,6 +18,8 @@ __exportStar(require("./GenerationId"), exports);
18
18
  __exportStar(require("./CreateGenerationDto"), exports);
19
19
  __exportStar(require("./Input"), exports);
20
20
  __exportStar(require("./Model"), exports);
21
+ __exportStar(require("./Emotion"), exports);
22
+ __exportStar(require("./ModelMode"), exports);
21
23
  __exportStar(require("./EstimatedGenerationCost"), exports);
22
24
  __exportStar(require("./Generation"), exports);
23
25
  __exportStar(require("./GenerationError"), 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.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),
94
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.2.6", "User-Agent": "@sync.so/sdk/0.2.6", "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.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),
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.6", "User-Agent": "@sync.so/sdk/0.2.6", "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.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),
246
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.2.6", "User-Agent": "@sync.so/sdk/0.2.6", "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.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),
313
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.2.6", "User-Agent": "@sync.so/sdk/0.2.6", "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.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),
386
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.2.6", "User-Agent": "@sync.so/sdk/0.2.6", "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.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),
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.6", "User-Agent": "@sync.so/sdk/0.2.6", "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.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),
173
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.2.6", "User-Agent": "@sync.so/sdk/0.2.6", "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.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),
248
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.2.6", "User-Agent": "@sync.so/sdk/0.2.6", "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",
@@ -0,0 +1,15 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * emotion prompt for react-1 model.
6
+ */
7
+ export type Emotion = "happy" | "sad" | "angry" | "disgusted" | "surprised" | "neutral";
8
+ export declare const Emotion: {
9
+ readonly Happy: "happy";
10
+ readonly Sad: "sad";
11
+ readonly Angry: "angry";
12
+ readonly Disgusted: "disgusted";
13
+ readonly Surprised: "surprised";
14
+ readonly Neutral: "neutral";
15
+ };
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Emotion = void 0;
7
+ exports.Emotion = {
8
+ Happy: "happy",
9
+ Sad: "sad",
10
+ Angry: "angry",
11
+ Disgusted: "disgusted",
12
+ Surprised: "surprised",
13
+ Neutral: "neutral",
14
+ };
@@ -20,6 +20,8 @@ export interface Generation {
20
20
  outputDuration?: number;
21
21
  /** The URL of the output media. */
22
22
  outputUrl?: string;
23
+ /** The segments of the generation. */
24
+ segments?: Sync.GenerationSegment[];
23
25
  /** The URL of the segment output media. */
24
26
  segmentOutputUrl?: string;
25
27
  /** The status of the generation. */
@@ -5,6 +5,10 @@ import * as Sync from "../../../index";
5
5
  export interface GenerationOptions {
6
6
  /** Defines how to handle duration mismatches between video and audio inputs. See the [Media Content Tips](/compatibility-and-tips/media-content-tips#sync-mode-options) guide for a brief overview, or the SyncMode enum below for detailed explanations of each option. */
7
7
  sync_mode?: Sync.SyncMode;
8
+ /** edit region for the model. only works with react-1. defaults to face, which affects lipsync + emotions in the face region. Available options are lips/face/head. When head is selected, model generates natural talking head movements along with emotions + lipsync. */
9
+ model_mode?: Sync.ModelMode;
10
+ /** emotion prompt for the generation. only works for react-1 model. Only single word emotions are supported at the moment. */
11
+ prompt?: Sync.Emotion;
8
12
  /** option to control how expressive lipsync can be. 0 -> least expressive, 1 -> most expressive. default:0.5 */
9
13
  temperature?: number;
10
14
  /** Active speaker detection configuration. When enabled, automatically detects and applies lipsync only to the active speaker in videos with multiple people. */
@@ -7,9 +7,9 @@ import * as Sync from "../../../index";
7
7
  */
8
8
  export interface GenerationSegment {
9
9
  /** Segment start time in seconds */
10
- start_time: number;
10
+ startTime: number;
11
11
  /** Segment end time in seconds */
12
- end_time: number;
12
+ endTime: number;
13
13
  /** Audio configuration for this segment */
14
- audio_input: Sync.SegmentAudioInput;
14
+ audioInput: Sync.SegmentAudioInput;
15
15
  }
@@ -4,9 +4,10 @@
4
4
  /**
5
5
  * name of the model to use for generation.
6
6
  */
7
- export type Model = "lipsync-2" | "lipsync-1.9.0-beta" | "lipsync-2-pro";
7
+ export type Model = "lipsync-2" | "lipsync-1.9.0-beta" | "lipsync-2-pro" | "react-1";
8
8
  export declare const Model: {
9
9
  readonly Lipsync2: "lipsync-2";
10
10
  readonly Lipsync190Beta: "lipsync-1.9.0-beta";
11
11
  readonly Lipsync2Pro: "lipsync-2-pro";
12
+ readonly React1: "react-1";
12
13
  };
@@ -8,4 +8,5 @@ exports.Model = {
8
8
  Lipsync2: "lipsync-2",
9
9
  Lipsync190Beta: "lipsync-1.9.0-beta",
10
10
  Lipsync2Pro: "lipsync-2-pro",
11
+ React1: "react-1",
11
12
  };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * mode of the model to use for generation. only works with react-1 model
6
+ */
7
+ export type ModelMode = "lips" | "face" | "head";
8
+ export declare const ModelMode: {
9
+ readonly Lips: "lips";
10
+ readonly Face: "face";
11
+ readonly Head: "head";
12
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ModelMode = void 0;
7
+ exports.ModelMode = {
8
+ Lips: "lips",
9
+ Face: "face",
10
+ Head: "head",
11
+ };
@@ -8,7 +8,7 @@ export interface SegmentAudioInput {
8
8
  /** Reference ID of the audio/text-to-speech input to use for this segment */
9
9
  refId: string;
10
10
  /** Optional start time (in seconds) to crop the referenced audio. When specified, end_time must also be provided. */
11
- start_time?: number;
11
+ startTime?: number;
12
12
  /** Optional end time (in seconds) to crop the referenced audio. When specified, start_time must also be provided. */
13
- end_time?: number;
13
+ endTime?: number;
14
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
- /** [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. */
9
+ /** [DEPRECATED] Use the top-level [segments](/api-reference/api/generate-api/create#request.body.segments) array instead for multi-segment support. */
10
10
  segments_secs?: Sync.SegmentSecs;
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 */
11
+ /** [DEPRECATED] Use the top-level [segments](/api-reference/api/generate-api/create#request.body.segments) array instead for multi-segment support. frames 100 and 200 of the video */
12
12
  segments_frames?: Sync.SegmentFrames;
13
13
  }
@@ -2,6 +2,8 @@ export * from "./GenerationId";
2
2
  export * from "./CreateGenerationDto";
3
3
  export * from "./Input";
4
4
  export * from "./Model";
5
+ export * from "./Emotion";
6
+ export * from "./ModelMode";
5
7
  export * from "./EstimatedGenerationCost";
6
8
  export * from "./Generation";
7
9
  export * from "./GenerationError";
@@ -18,6 +18,8 @@ __exportStar(require("./GenerationId"), exports);
18
18
  __exportStar(require("./CreateGenerationDto"), exports);
19
19
  __exportStar(require("./Input"), exports);
20
20
  __exportStar(require("./Model"), exports);
21
+ __exportStar(require("./Emotion"), exports);
22
+ __exportStar(require("./ModelMode"), exports);
21
23
  __exportStar(require("./EstimatedGenerationCost"), exports);
22
24
  __exportStar(require("./Generation"), exports);
23
25
  __exportStar(require("./GenerationError"), 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.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),
94
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.2.6", "User-Agent": "@sync.so/sdk/0.2.6", "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.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),
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.6", "User-Agent": "@sync.so/sdk/0.2.6", "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.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),
246
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.2.6", "User-Agent": "@sync.so/sdk/0.2.6", "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.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),
313
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.2.6", "User-Agent": "@sync.so/sdk/0.2.6", "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.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),
386
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.2.6", "User-Agent": "@sync.so/sdk/0.2.6", "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.4";
1
+ export declare const SDK_VERSION = "0.2.6";
package/dist/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "0.2.4";
4
+ exports.SDK_VERSION = "0.2.6";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sync.so/sdk",
3
- "version": "0.2.4",
3
+ "version": "0.2.6",
4
4
  "private": false,
5
5
  "repository": "https://github.com/synchronicity-labs/sync-typescript-sdk",
6
6
  "main": "./index.js",
package/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.2.4";
1
+ export declare const SDK_VERSION = "0.2.6";
package/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "0.2.4";
4
+ exports.SDK_VERSION = "0.2.6";