@cartesia/cartesia-js 2.1.6 → 2.1.8
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/apiStatus/client/Client.js +1 -1
- package/api/resources/datasets/client/Client.js +4 -4
- package/api/resources/infill/client/Client.js +1 -1
- package/api/resources/voices/client/Client.d.ts +10 -6
- package/api/resources/voices/client/Client.js +18 -14
- package/api/resources/voices/types/LocalizeDialect.d.ts +7 -3
- package/api/resources/voices/types/LocalizeFrenchDialect.d.ts +8 -0
- package/api/resources/voices/types/LocalizeFrenchDialect.js +10 -0
- package/api/resources/voices/types/LocalizeVoiceRequest.d.ts +6 -1
- package/api/resources/voices/types/index.d.ts +1 -0
- package/api/resources/voices/types/index.js +1 -0
- package/dist/api/resources/apiStatus/client/Client.js +1 -1
- package/dist/api/resources/datasets/client/Client.js +4 -4
- package/dist/api/resources/infill/client/Client.js +1 -1
- package/dist/api/resources/voices/client/Client.d.ts +10 -6
- package/dist/api/resources/voices/client/Client.js +18 -14
- package/dist/api/resources/voices/types/LocalizeDialect.d.ts +7 -3
- package/dist/api/resources/voices/types/LocalizeFrenchDialect.d.ts +8 -0
- package/dist/api/resources/voices/types/LocalizeFrenchDialect.js +10 -0
- package/dist/api/resources/voices/types/LocalizeVoiceRequest.d.ts +6 -1
- package/dist/api/resources/voices/types/index.d.ts +1 -0
- package/dist/api/resources/voices/types/index.js +1 -0
- package/dist/serialization/resources/voices/types/LocalizeDialect.d.ts +2 -1
- package/dist/serialization/resources/voices/types/LocalizeDialect.js +2 -0
- package/dist/serialization/resources/voices/types/LocalizeFrenchDialect.d.ts +10 -0
- package/dist/serialization/resources/voices/types/LocalizeFrenchDialect.js +41 -0
- package/dist/serialization/resources/voices/types/LocalizeVoiceRequest.d.ts +3 -2
- package/dist/serialization/resources/voices/types/LocalizeVoiceRequest.js +3 -2
- package/dist/serialization/resources/voices/types/index.d.ts +1 -0
- package/dist/serialization/resources/voices/types/index.js +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +25 -8
- package/serialization/resources/voices/types/LocalizeDialect.d.ts +2 -1
- package/serialization/resources/voices/types/LocalizeDialect.js +2 -0
- package/serialization/resources/voices/types/LocalizeFrenchDialect.d.ts +10 -0
- package/serialization/resources/voices/types/LocalizeFrenchDialect.js +41 -0
- package/serialization/resources/voices/types/LocalizeVoiceRequest.d.ts +3 -2
- package/serialization/resources/voices/types/LocalizeVoiceRequest.js +3 -2
- package/serialization/resources/voices/types/index.d.ts +1 -0
- package/serialization/resources/voices/types/index.js +1 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -66,7 +66,7 @@ class ApiStatus {
|
|
|
66
66
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
67
67
|
url: (_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.CartesiaEnvironment.Production,
|
|
68
68
|
method: "GET",
|
|
69
|
-
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.
|
|
69
|
+
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.8", "User-Agent": "@cartesia/cartesia-js/2.1.8", "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),
|
|
70
70
|
contentType: "application/json",
|
|
71
71
|
requestType: "json",
|
|
72
72
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -70,7 +70,7 @@ class Datasets {
|
|
|
70
70
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
71
71
|
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.CartesiaEnvironment.Production, "/datasets/"),
|
|
72
72
|
method: "GET",
|
|
73
|
-
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.
|
|
73
|
+
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.8", "User-Agent": "@cartesia/cartesia-js/2.1.8", "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),
|
|
74
74
|
contentType: "application/json",
|
|
75
75
|
requestType: "json",
|
|
76
76
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -122,7 +122,7 @@ class Datasets {
|
|
|
122
122
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
123
123
|
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.CartesiaEnvironment.Production, "/datasets/"),
|
|
124
124
|
method: "POST",
|
|
125
|
-
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.
|
|
125
|
+
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.8", "User-Agent": "@cartesia/cartesia-js/2.1.8", "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),
|
|
126
126
|
contentType: "application/json",
|
|
127
127
|
requestType: "json",
|
|
128
128
|
body: serializers.CreateDatasetRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -173,7 +173,7 @@ class Datasets {
|
|
|
173
173
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
174
174
|
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.CartesiaEnvironment.Production, `/datasets/${encodeURIComponent(id)}/files`),
|
|
175
175
|
method: "GET",
|
|
176
|
-
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.
|
|
176
|
+
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.8", "User-Agent": "@cartesia/cartesia-js/2.1.8", "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),
|
|
177
177
|
contentType: "application/json",
|
|
178
178
|
requestType: "json",
|
|
179
179
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -226,7 +226,7 @@ class Datasets {
|
|
|
226
226
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
227
227
|
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.CartesiaEnvironment.Production, `/datasets/${encodeURIComponent(id)}/files`),
|
|
228
228
|
method: "POST",
|
|
229
|
-
headers: Object.assign(Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.
|
|
229
|
+
headers: Object.assign(Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.8", "User-Agent": "@cartesia/cartesia-js/2.1.8", "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),
|
|
230
230
|
requestType: "file",
|
|
231
231
|
duplex: _maybeEncodedRequest.duplex,
|
|
232
232
|
body: _maybeEncodedRequest.body,
|
|
@@ -113,7 +113,7 @@ class Infill {
|
|
|
113
113
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
114
114
|
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.CartesiaEnvironment.Production, "/infill/bytes"),
|
|
115
115
|
method: "POST",
|
|
116
|
-
headers: Object.assign(Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.
|
|
116
|
+
headers: Object.assign(Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.8", "User-Agent": "@cartesia/cartesia-js/2.1.8", "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),
|
|
117
117
|
requestType: "file",
|
|
118
118
|
duplex: _maybeEncodedRequest.duplex,
|
|
119
119
|
body: _maybeEncodedRequest.body,
|
|
@@ -99,18 +99,22 @@ export declare class Voices {
|
|
|
99
99
|
*/
|
|
100
100
|
get(id: Cartesia.VoiceId, requestOptions?: Voices.RequestOptions): Promise<Cartesia.Voice>;
|
|
101
101
|
/**
|
|
102
|
+
* Create a new voice from an existing voice localized to a new language and dialect.
|
|
103
|
+
*
|
|
102
104
|
* @param {Cartesia.LocalizeVoiceRequest} request
|
|
103
105
|
* @param {Voices.RequestOptions} requestOptions - Request-specific configuration.
|
|
104
106
|
*
|
|
105
107
|
* @example
|
|
106
108
|
* await client.voices.localize({
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
109
|
+
* voiceId: "694f9389-aac1-45b6-b726-9d9369183238",
|
|
110
|
+
* name: "Sarah Peninsular Spanish",
|
|
111
|
+
* description: "Sarah Voice in Peninsular Spanish",
|
|
112
|
+
* language: "es",
|
|
113
|
+
* originalSpeakerGender: "female",
|
|
114
|
+
* dialect: "pe"
|
|
111
115
|
* })
|
|
112
116
|
*/
|
|
113
|
-
localize(request: Cartesia.LocalizeVoiceRequest, requestOptions?: Voices.RequestOptions): Promise<Cartesia.
|
|
117
|
+
localize(request: Cartesia.LocalizeVoiceRequest, requestOptions?: Voices.RequestOptions): Promise<Cartesia.VoiceMetadata>;
|
|
114
118
|
/**
|
|
115
119
|
* @param {Cartesia.MixVoicesRequest} request
|
|
116
120
|
* @param {Voices.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -142,7 +146,7 @@ export declare class Voices {
|
|
|
142
146
|
* baseVoiceId: "123e4567-e89b-12d3-a456-426614174000"
|
|
143
147
|
* })
|
|
144
148
|
*/
|
|
145
|
-
create(request: Cartesia.CreateVoiceRequest, requestOptions?: Voices.RequestOptions): Promise<Cartesia.
|
|
149
|
+
create(request: Cartesia.CreateVoiceRequest, requestOptions?: Voices.RequestOptions): Promise<Cartesia.VoiceMetadata>;
|
|
146
150
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
147
151
|
"X-API-Key": string | undefined;
|
|
148
152
|
}>;
|
|
@@ -70,7 +70,7 @@ class Voices {
|
|
|
70
70
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
71
71
|
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.CartesiaEnvironment.Production, "/voices/"),
|
|
72
72
|
method: "GET",
|
|
73
|
-
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.
|
|
73
|
+
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.8", "User-Agent": "@cartesia/cartesia-js/2.1.8", "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),
|
|
74
74
|
contentType: "application/json",
|
|
75
75
|
requestType: "json",
|
|
76
76
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -156,7 +156,7 @@ class Voices {
|
|
|
156
156
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
157
157
|
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.CartesiaEnvironment.Production, "/voices/clone"),
|
|
158
158
|
method: "POST",
|
|
159
|
-
headers: Object.assign(Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.
|
|
159
|
+
headers: Object.assign(Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.8", "User-Agent": "@cartesia/cartesia-js/2.1.8", "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),
|
|
160
160
|
requestType: "file",
|
|
161
161
|
duplex: _maybeEncodedRequest.duplex,
|
|
162
162
|
body: _maybeEncodedRequest.body,
|
|
@@ -207,7 +207,7 @@ class Voices {
|
|
|
207
207
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
208
208
|
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.CartesiaEnvironment.Production, `/voices/${encodeURIComponent(serializers.VoiceId.jsonOrThrow(id))}`),
|
|
209
209
|
method: "DELETE",
|
|
210
|
-
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.
|
|
210
|
+
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.8", "User-Agent": "@cartesia/cartesia-js/2.1.8", "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),
|
|
211
211
|
contentType: "application/json",
|
|
212
212
|
requestType: "json",
|
|
213
213
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -255,7 +255,7 @@ class Voices {
|
|
|
255
255
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
256
256
|
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.CartesiaEnvironment.Production, `/voices/${encodeURIComponent(serializers.VoiceId.jsonOrThrow(id))}`),
|
|
257
257
|
method: "PATCH",
|
|
258
|
-
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.
|
|
258
|
+
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.8", "User-Agent": "@cartesia/cartesia-js/2.1.8", "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),
|
|
259
259
|
contentType: "application/json",
|
|
260
260
|
requestType: "json",
|
|
261
261
|
body: serializers.UpdateVoiceRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -306,7 +306,7 @@ class Voices {
|
|
|
306
306
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
307
307
|
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.CartesiaEnvironment.Production, `/voices/${encodeURIComponent(serializers.VoiceId.jsonOrThrow(id))}`),
|
|
308
308
|
method: "GET",
|
|
309
|
-
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.
|
|
309
|
+
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.8", "User-Agent": "@cartesia/cartesia-js/2.1.8", "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),
|
|
310
310
|
contentType: "application/json",
|
|
311
311
|
requestType: "json",
|
|
312
312
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -344,15 +344,19 @@ class Voices {
|
|
|
344
344
|
});
|
|
345
345
|
}
|
|
346
346
|
/**
|
|
347
|
+
* Create a new voice from an existing voice localized to a new language and dialect.
|
|
348
|
+
*
|
|
347
349
|
* @param {Cartesia.LocalizeVoiceRequest} request
|
|
348
350
|
* @param {Voices.RequestOptions} requestOptions - Request-specific configuration.
|
|
349
351
|
*
|
|
350
352
|
* @example
|
|
351
353
|
* await client.voices.localize({
|
|
352
|
-
*
|
|
353
|
-
*
|
|
354
|
-
*
|
|
355
|
-
*
|
|
354
|
+
* voiceId: "694f9389-aac1-45b6-b726-9d9369183238",
|
|
355
|
+
* name: "Sarah Peninsular Spanish",
|
|
356
|
+
* description: "Sarah Voice in Peninsular Spanish",
|
|
357
|
+
* language: "es",
|
|
358
|
+
* originalSpeakerGender: "female",
|
|
359
|
+
* dialect: "pe"
|
|
356
360
|
* })
|
|
357
361
|
*/
|
|
358
362
|
localize(request, requestOptions) {
|
|
@@ -361,7 +365,7 @@ class Voices {
|
|
|
361
365
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
362
366
|
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.CartesiaEnvironment.Production, "/voices/localize"),
|
|
363
367
|
method: "POST",
|
|
364
|
-
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.
|
|
368
|
+
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.8", "User-Agent": "@cartesia/cartesia-js/2.1.8", "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),
|
|
365
369
|
contentType: "application/json",
|
|
366
370
|
requestType: "json",
|
|
367
371
|
body: serializers.LocalizeVoiceRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -370,7 +374,7 @@ class Voices {
|
|
|
370
374
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
371
375
|
});
|
|
372
376
|
if (_response.ok) {
|
|
373
|
-
return serializers.
|
|
377
|
+
return serializers.VoiceMetadata.parseOrThrow(_response.body, {
|
|
374
378
|
unrecognizedObjectKeys: "passthrough",
|
|
375
379
|
allowUnrecognizedUnionMembers: true,
|
|
376
380
|
allowUnrecognizedEnumValues: true,
|
|
@@ -420,7 +424,7 @@ class Voices {
|
|
|
420
424
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
421
425
|
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.CartesiaEnvironment.Production, "/voices/mix"),
|
|
422
426
|
method: "POST",
|
|
423
|
-
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.
|
|
427
|
+
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.8", "User-Agent": "@cartesia/cartesia-js/2.1.8", "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),
|
|
424
428
|
contentType: "application/json",
|
|
425
429
|
requestType: "json",
|
|
426
430
|
body: serializers.MixVoicesRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -479,7 +483,7 @@ class Voices {
|
|
|
479
483
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
480
484
|
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.CartesiaEnvironment.Production, "/voices/"),
|
|
481
485
|
method: "POST",
|
|
482
|
-
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.
|
|
486
|
+
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.8", "User-Agent": "@cartesia/cartesia-js/2.1.8", "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),
|
|
483
487
|
contentType: "application/json",
|
|
484
488
|
requestType: "json",
|
|
485
489
|
body: serializers.CreateVoiceRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -488,7 +492,7 @@ class Voices {
|
|
|
488
492
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
489
493
|
});
|
|
490
494
|
if (_response.ok) {
|
|
491
|
-
return serializers.
|
|
495
|
+
return serializers.VoiceMetadata.parseOrThrow(_response.body, {
|
|
492
496
|
unrecognizedObjectKeys: "passthrough",
|
|
493
497
|
allowUnrecognizedUnionMembers: true,
|
|
494
498
|
allowUnrecognizedEnumValues: true,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as Cartesia from "../../../index";
|
|
5
5
|
/**
|
|
6
|
-
* The dialect to localize to. Only supported for English (`en`), Spanish (`es`),
|
|
6
|
+
* The dialect to localize to. Only supported for English (`en`), Spanish (`es`), Portuguese (`pt`), and French (`fr`).
|
|
7
7
|
*/
|
|
8
8
|
export type LocalizeDialect =
|
|
9
9
|
/**
|
|
@@ -11,10 +11,14 @@ export type LocalizeDialect =
|
|
|
11
11
|
* */
|
|
12
12
|
Cartesia.LocalizeEnglishDialect
|
|
13
13
|
/**
|
|
14
|
-
* Only available when language is set to Spanish (`es`). Options:
|
|
14
|
+
* Only available when language is set to Spanish (`es`). Options: Latin American (`mx`) and Peninsular (`pe`).
|
|
15
15
|
* */
|
|
16
16
|
| Cartesia.LocalizeSpanishDialect
|
|
17
17
|
/**
|
|
18
18
|
* Only available when language is set to Portuguese (`pt`). Options: Brazilian (`br`) and European Portuguese (`eu`).
|
|
19
19
|
* */
|
|
20
|
-
| Cartesia.LocalizePortugueseDialect
|
|
20
|
+
| Cartesia.LocalizePortugueseDialect
|
|
21
|
+
/**
|
|
22
|
+
* Only available when language is set to French (`fr`). Options: Standard Parisian/Metropolitan (`eu`) and Canadian (`ca`).
|
|
23
|
+
* */
|
|
24
|
+
| Cartesia.LocalizeFrenchDialect;
|
|
@@ -0,0 +1,10 @@
|
|
|
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.LocalizeFrenchDialect = void 0;
|
|
7
|
+
exports.LocalizeFrenchDialect = {
|
|
8
|
+
Eu: "eu",
|
|
9
|
+
Ca: "ca",
|
|
10
|
+
};
|
|
@@ -3,7 +3,12 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as Cartesia from "../../../index";
|
|
5
5
|
export interface LocalizeVoiceRequest {
|
|
6
|
-
|
|
6
|
+
/** The ID of the voice to localize. */
|
|
7
|
+
voiceId: string;
|
|
8
|
+
/** The name of the new localized voice. */
|
|
9
|
+
name: string;
|
|
10
|
+
/** The description of the new localized voice. */
|
|
11
|
+
description: string;
|
|
7
12
|
language: Cartesia.LocalizeTargetLanguage;
|
|
8
13
|
originalSpeakerGender: Cartesia.Gender;
|
|
9
14
|
dialect?: Cartesia.LocalizeDialect;
|
|
@@ -6,6 +6,7 @@ export * from "./CreateVoiceRequest";
|
|
|
6
6
|
export * from "./UpdateVoiceRequest";
|
|
7
7
|
export * from "./LocalizeTargetLanguage";
|
|
8
8
|
export * from "./LocalizeEnglishDialect";
|
|
9
|
+
export * from "./LocalizeFrenchDialect";
|
|
9
10
|
export * from "./LocalizeSpanishDialect";
|
|
10
11
|
export * from "./LocalizePortugueseDialect";
|
|
11
12
|
export * from "./LocalizeDialect";
|
|
@@ -22,6 +22,7 @@ __exportStar(require("./CreateVoiceRequest"), exports);
|
|
|
22
22
|
__exportStar(require("./UpdateVoiceRequest"), exports);
|
|
23
23
|
__exportStar(require("./LocalizeTargetLanguage"), exports);
|
|
24
24
|
__exportStar(require("./LocalizeEnglishDialect"), exports);
|
|
25
|
+
__exportStar(require("./LocalizeFrenchDialect"), exports);
|
|
25
26
|
__exportStar(require("./LocalizeSpanishDialect"), exports);
|
|
26
27
|
__exportStar(require("./LocalizePortugueseDialect"), exports);
|
|
27
28
|
__exportStar(require("./LocalizeDialect"), exports);
|
|
@@ -66,7 +66,7 @@ class ApiStatus {
|
|
|
66
66
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
67
67
|
url: (_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.CartesiaEnvironment.Production,
|
|
68
68
|
method: "GET",
|
|
69
|
-
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.
|
|
69
|
+
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.8", "User-Agent": "@cartesia/cartesia-js/2.1.8", "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),
|
|
70
70
|
contentType: "application/json",
|
|
71
71
|
requestType: "json",
|
|
72
72
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -70,7 +70,7 @@ class Datasets {
|
|
|
70
70
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
71
71
|
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.CartesiaEnvironment.Production, "/datasets/"),
|
|
72
72
|
method: "GET",
|
|
73
|
-
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.
|
|
73
|
+
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.8", "User-Agent": "@cartesia/cartesia-js/2.1.8", "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),
|
|
74
74
|
contentType: "application/json",
|
|
75
75
|
requestType: "json",
|
|
76
76
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -122,7 +122,7 @@ class Datasets {
|
|
|
122
122
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
123
123
|
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.CartesiaEnvironment.Production, "/datasets/"),
|
|
124
124
|
method: "POST",
|
|
125
|
-
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.
|
|
125
|
+
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.8", "User-Agent": "@cartesia/cartesia-js/2.1.8", "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),
|
|
126
126
|
contentType: "application/json",
|
|
127
127
|
requestType: "json",
|
|
128
128
|
body: serializers.CreateDatasetRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -173,7 +173,7 @@ class Datasets {
|
|
|
173
173
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
174
174
|
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.CartesiaEnvironment.Production, `/datasets/${encodeURIComponent(id)}/files`),
|
|
175
175
|
method: "GET",
|
|
176
|
-
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.
|
|
176
|
+
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.8", "User-Agent": "@cartesia/cartesia-js/2.1.8", "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),
|
|
177
177
|
contentType: "application/json",
|
|
178
178
|
requestType: "json",
|
|
179
179
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -226,7 +226,7 @@ class Datasets {
|
|
|
226
226
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
227
227
|
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.CartesiaEnvironment.Production, `/datasets/${encodeURIComponent(id)}/files`),
|
|
228
228
|
method: "POST",
|
|
229
|
-
headers: Object.assign(Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.
|
|
229
|
+
headers: Object.assign(Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.8", "User-Agent": "@cartesia/cartesia-js/2.1.8", "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),
|
|
230
230
|
requestType: "file",
|
|
231
231
|
duplex: _maybeEncodedRequest.duplex,
|
|
232
232
|
body: _maybeEncodedRequest.body,
|
|
@@ -113,7 +113,7 @@ class Infill {
|
|
|
113
113
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
114
114
|
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.CartesiaEnvironment.Production, "/infill/bytes"),
|
|
115
115
|
method: "POST",
|
|
116
|
-
headers: Object.assign(Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.
|
|
116
|
+
headers: Object.assign(Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.8", "User-Agent": "@cartesia/cartesia-js/2.1.8", "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),
|
|
117
117
|
requestType: "file",
|
|
118
118
|
duplex: _maybeEncodedRequest.duplex,
|
|
119
119
|
body: _maybeEncodedRequest.body,
|
|
@@ -99,18 +99,22 @@ export declare class Voices {
|
|
|
99
99
|
*/
|
|
100
100
|
get(id: Cartesia.VoiceId, requestOptions?: Voices.RequestOptions): Promise<Cartesia.Voice>;
|
|
101
101
|
/**
|
|
102
|
+
* Create a new voice from an existing voice localized to a new language and dialect.
|
|
103
|
+
*
|
|
102
104
|
* @param {Cartesia.LocalizeVoiceRequest} request
|
|
103
105
|
* @param {Voices.RequestOptions} requestOptions - Request-specific configuration.
|
|
104
106
|
*
|
|
105
107
|
* @example
|
|
106
108
|
* await client.voices.localize({
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
109
|
+
* voiceId: "694f9389-aac1-45b6-b726-9d9369183238",
|
|
110
|
+
* name: "Sarah Peninsular Spanish",
|
|
111
|
+
* description: "Sarah Voice in Peninsular Spanish",
|
|
112
|
+
* language: "es",
|
|
113
|
+
* originalSpeakerGender: "female",
|
|
114
|
+
* dialect: "pe"
|
|
111
115
|
* })
|
|
112
116
|
*/
|
|
113
|
-
localize(request: Cartesia.LocalizeVoiceRequest, requestOptions?: Voices.RequestOptions): Promise<Cartesia.
|
|
117
|
+
localize(request: Cartesia.LocalizeVoiceRequest, requestOptions?: Voices.RequestOptions): Promise<Cartesia.VoiceMetadata>;
|
|
114
118
|
/**
|
|
115
119
|
* @param {Cartesia.MixVoicesRequest} request
|
|
116
120
|
* @param {Voices.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -142,7 +146,7 @@ export declare class Voices {
|
|
|
142
146
|
* baseVoiceId: "123e4567-e89b-12d3-a456-426614174000"
|
|
143
147
|
* })
|
|
144
148
|
*/
|
|
145
|
-
create(request: Cartesia.CreateVoiceRequest, requestOptions?: Voices.RequestOptions): Promise<Cartesia.
|
|
149
|
+
create(request: Cartesia.CreateVoiceRequest, requestOptions?: Voices.RequestOptions): Promise<Cartesia.VoiceMetadata>;
|
|
146
150
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
147
151
|
"X-API-Key": string | undefined;
|
|
148
152
|
}>;
|
|
@@ -70,7 +70,7 @@ class Voices {
|
|
|
70
70
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
71
71
|
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.CartesiaEnvironment.Production, "/voices/"),
|
|
72
72
|
method: "GET",
|
|
73
|
-
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.
|
|
73
|
+
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.8", "User-Agent": "@cartesia/cartesia-js/2.1.8", "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),
|
|
74
74
|
contentType: "application/json",
|
|
75
75
|
requestType: "json",
|
|
76
76
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -156,7 +156,7 @@ class Voices {
|
|
|
156
156
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
157
157
|
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.CartesiaEnvironment.Production, "/voices/clone"),
|
|
158
158
|
method: "POST",
|
|
159
|
-
headers: Object.assign(Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.
|
|
159
|
+
headers: Object.assign(Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.8", "User-Agent": "@cartesia/cartesia-js/2.1.8", "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),
|
|
160
160
|
requestType: "file",
|
|
161
161
|
duplex: _maybeEncodedRequest.duplex,
|
|
162
162
|
body: _maybeEncodedRequest.body,
|
|
@@ -207,7 +207,7 @@ class Voices {
|
|
|
207
207
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
208
208
|
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.CartesiaEnvironment.Production, `/voices/${encodeURIComponent(serializers.VoiceId.jsonOrThrow(id))}`),
|
|
209
209
|
method: "DELETE",
|
|
210
|
-
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.
|
|
210
|
+
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.8", "User-Agent": "@cartesia/cartesia-js/2.1.8", "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),
|
|
211
211
|
contentType: "application/json",
|
|
212
212
|
requestType: "json",
|
|
213
213
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -255,7 +255,7 @@ class Voices {
|
|
|
255
255
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
256
256
|
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.CartesiaEnvironment.Production, `/voices/${encodeURIComponent(serializers.VoiceId.jsonOrThrow(id))}`),
|
|
257
257
|
method: "PATCH",
|
|
258
|
-
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.
|
|
258
|
+
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.8", "User-Agent": "@cartesia/cartesia-js/2.1.8", "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),
|
|
259
259
|
contentType: "application/json",
|
|
260
260
|
requestType: "json",
|
|
261
261
|
body: serializers.UpdateVoiceRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -306,7 +306,7 @@ class Voices {
|
|
|
306
306
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
307
307
|
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.CartesiaEnvironment.Production, `/voices/${encodeURIComponent(serializers.VoiceId.jsonOrThrow(id))}`),
|
|
308
308
|
method: "GET",
|
|
309
|
-
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.
|
|
309
|
+
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.8", "User-Agent": "@cartesia/cartesia-js/2.1.8", "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),
|
|
310
310
|
contentType: "application/json",
|
|
311
311
|
requestType: "json",
|
|
312
312
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -344,15 +344,19 @@ class Voices {
|
|
|
344
344
|
});
|
|
345
345
|
}
|
|
346
346
|
/**
|
|
347
|
+
* Create a new voice from an existing voice localized to a new language and dialect.
|
|
348
|
+
*
|
|
347
349
|
* @param {Cartesia.LocalizeVoiceRequest} request
|
|
348
350
|
* @param {Voices.RequestOptions} requestOptions - Request-specific configuration.
|
|
349
351
|
*
|
|
350
352
|
* @example
|
|
351
353
|
* await client.voices.localize({
|
|
352
|
-
*
|
|
353
|
-
*
|
|
354
|
-
*
|
|
355
|
-
*
|
|
354
|
+
* voiceId: "694f9389-aac1-45b6-b726-9d9369183238",
|
|
355
|
+
* name: "Sarah Peninsular Spanish",
|
|
356
|
+
* description: "Sarah Voice in Peninsular Spanish",
|
|
357
|
+
* language: "es",
|
|
358
|
+
* originalSpeakerGender: "female",
|
|
359
|
+
* dialect: "pe"
|
|
356
360
|
* })
|
|
357
361
|
*/
|
|
358
362
|
localize(request, requestOptions) {
|
|
@@ -361,7 +365,7 @@ class Voices {
|
|
|
361
365
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
362
366
|
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.CartesiaEnvironment.Production, "/voices/localize"),
|
|
363
367
|
method: "POST",
|
|
364
|
-
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.
|
|
368
|
+
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.8", "User-Agent": "@cartesia/cartesia-js/2.1.8", "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),
|
|
365
369
|
contentType: "application/json",
|
|
366
370
|
requestType: "json",
|
|
367
371
|
body: serializers.LocalizeVoiceRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -370,7 +374,7 @@ class Voices {
|
|
|
370
374
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
371
375
|
});
|
|
372
376
|
if (_response.ok) {
|
|
373
|
-
return serializers.
|
|
377
|
+
return serializers.VoiceMetadata.parseOrThrow(_response.body, {
|
|
374
378
|
unrecognizedObjectKeys: "passthrough",
|
|
375
379
|
allowUnrecognizedUnionMembers: true,
|
|
376
380
|
allowUnrecognizedEnumValues: true,
|
|
@@ -420,7 +424,7 @@ class Voices {
|
|
|
420
424
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
421
425
|
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.CartesiaEnvironment.Production, "/voices/mix"),
|
|
422
426
|
method: "POST",
|
|
423
|
-
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.
|
|
427
|
+
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.8", "User-Agent": "@cartesia/cartesia-js/2.1.8", "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),
|
|
424
428
|
contentType: "application/json",
|
|
425
429
|
requestType: "json",
|
|
426
430
|
body: serializers.MixVoicesRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -479,7 +483,7 @@ class Voices {
|
|
|
479
483
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
480
484
|
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.CartesiaEnvironment.Production, "/voices/"),
|
|
481
485
|
method: "POST",
|
|
482
|
-
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.
|
|
486
|
+
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.8", "User-Agent": "@cartesia/cartesia-js/2.1.8", "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),
|
|
483
487
|
contentType: "application/json",
|
|
484
488
|
requestType: "json",
|
|
485
489
|
body: serializers.CreateVoiceRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -488,7 +492,7 @@ class Voices {
|
|
|
488
492
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
489
493
|
});
|
|
490
494
|
if (_response.ok) {
|
|
491
|
-
return serializers.
|
|
495
|
+
return serializers.VoiceMetadata.parseOrThrow(_response.body, {
|
|
492
496
|
unrecognizedObjectKeys: "passthrough",
|
|
493
497
|
allowUnrecognizedUnionMembers: true,
|
|
494
498
|
allowUnrecognizedEnumValues: true,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as Cartesia from "../../../index";
|
|
5
5
|
/**
|
|
6
|
-
* The dialect to localize to. Only supported for English (`en`), Spanish (`es`),
|
|
6
|
+
* The dialect to localize to. Only supported for English (`en`), Spanish (`es`), Portuguese (`pt`), and French (`fr`).
|
|
7
7
|
*/
|
|
8
8
|
export type LocalizeDialect =
|
|
9
9
|
/**
|
|
@@ -11,10 +11,14 @@ export type LocalizeDialect =
|
|
|
11
11
|
* */
|
|
12
12
|
Cartesia.LocalizeEnglishDialect
|
|
13
13
|
/**
|
|
14
|
-
* Only available when language is set to Spanish (`es`). Options:
|
|
14
|
+
* Only available when language is set to Spanish (`es`). Options: Latin American (`mx`) and Peninsular (`pe`).
|
|
15
15
|
* */
|
|
16
16
|
| Cartesia.LocalizeSpanishDialect
|
|
17
17
|
/**
|
|
18
18
|
* Only available when language is set to Portuguese (`pt`). Options: Brazilian (`br`) and European Portuguese (`eu`).
|
|
19
19
|
* */
|
|
20
|
-
| Cartesia.LocalizePortugueseDialect
|
|
20
|
+
| Cartesia.LocalizePortugueseDialect
|
|
21
|
+
/**
|
|
22
|
+
* Only available when language is set to French (`fr`). Options: Standard Parisian/Metropolitan (`eu`) and Canadian (`ca`).
|
|
23
|
+
* */
|
|
24
|
+
| Cartesia.LocalizeFrenchDialect;
|
|
@@ -0,0 +1,10 @@
|
|
|
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.LocalizeFrenchDialect = void 0;
|
|
7
|
+
exports.LocalizeFrenchDialect = {
|
|
8
|
+
Eu: "eu",
|
|
9
|
+
Ca: "ca",
|
|
10
|
+
};
|
|
@@ -3,7 +3,12 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as Cartesia from "../../../index";
|
|
5
5
|
export interface LocalizeVoiceRequest {
|
|
6
|
-
|
|
6
|
+
/** The ID of the voice to localize. */
|
|
7
|
+
voiceId: string;
|
|
8
|
+
/** The name of the new localized voice. */
|
|
9
|
+
name: string;
|
|
10
|
+
/** The description of the new localized voice. */
|
|
11
|
+
description: string;
|
|
7
12
|
language: Cartesia.LocalizeTargetLanguage;
|
|
8
13
|
originalSpeakerGender: Cartesia.Gender;
|
|
9
14
|
dialect?: Cartesia.LocalizeDialect;
|
|
@@ -6,6 +6,7 @@ export * from "./CreateVoiceRequest";
|
|
|
6
6
|
export * from "./UpdateVoiceRequest";
|
|
7
7
|
export * from "./LocalizeTargetLanguage";
|
|
8
8
|
export * from "./LocalizeEnglishDialect";
|
|
9
|
+
export * from "./LocalizeFrenchDialect";
|
|
9
10
|
export * from "./LocalizeSpanishDialect";
|
|
10
11
|
export * from "./LocalizePortugueseDialect";
|
|
11
12
|
export * from "./LocalizeDialect";
|
|
@@ -22,6 +22,7 @@ __exportStar(require("./CreateVoiceRequest"), exports);
|
|
|
22
22
|
__exportStar(require("./UpdateVoiceRequest"), exports);
|
|
23
23
|
__exportStar(require("./LocalizeTargetLanguage"), exports);
|
|
24
24
|
__exportStar(require("./LocalizeEnglishDialect"), exports);
|
|
25
|
+
__exportStar(require("./LocalizeFrenchDialect"), exports);
|
|
25
26
|
__exportStar(require("./LocalizeSpanishDialect"), exports);
|
|
26
27
|
__exportStar(require("./LocalizePortugueseDialect"), exports);
|
|
27
28
|
__exportStar(require("./LocalizeDialect"), exports);
|
|
@@ -7,7 +7,8 @@ import * as core from "../../../../core";
|
|
|
7
7
|
import { LocalizeEnglishDialect } from "./LocalizeEnglishDialect";
|
|
8
8
|
import { LocalizeSpanishDialect } from "./LocalizeSpanishDialect";
|
|
9
9
|
import { LocalizePortugueseDialect } from "./LocalizePortugueseDialect";
|
|
10
|
+
import { LocalizeFrenchDialect } from "./LocalizeFrenchDialect";
|
|
10
11
|
export declare const LocalizeDialect: core.serialization.Schema<serializers.LocalizeDialect.Raw, Cartesia.LocalizeDialect>;
|
|
11
12
|
export declare namespace LocalizeDialect {
|
|
12
|
-
type Raw = LocalizeEnglishDialect.Raw | LocalizeSpanishDialect.Raw | LocalizePortugueseDialect.Raw;
|
|
13
|
+
type Raw = LocalizeEnglishDialect.Raw | LocalizeSpanishDialect.Raw | LocalizePortugueseDialect.Raw | LocalizeFrenchDialect.Raw;
|
|
13
14
|
}
|
|
@@ -41,8 +41,10 @@ const core = __importStar(require("../../../../core"));
|
|
|
41
41
|
const LocalizeEnglishDialect_1 = require("./LocalizeEnglishDialect");
|
|
42
42
|
const LocalizeSpanishDialect_1 = require("./LocalizeSpanishDialect");
|
|
43
43
|
const LocalizePortugueseDialect_1 = require("./LocalizePortugueseDialect");
|
|
44
|
+
const LocalizeFrenchDialect_1 = require("./LocalizeFrenchDialect");
|
|
44
45
|
exports.LocalizeDialect = core.serialization.undiscriminatedUnion([
|
|
45
46
|
LocalizeEnglishDialect_1.LocalizeEnglishDialect,
|
|
46
47
|
LocalizeSpanishDialect_1.LocalizeSpanishDialect,
|
|
47
48
|
LocalizePortugueseDialect_1.LocalizePortugueseDialect,
|
|
49
|
+
LocalizeFrenchDialect_1.LocalizeFrenchDialect,
|
|
48
50
|
]);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as serializers from "../../../index";
|
|
5
|
+
import * as Cartesia from "../../../../api/index";
|
|
6
|
+
import * as core from "../../../../core";
|
|
7
|
+
export declare const LocalizeFrenchDialect: core.serialization.Schema<serializers.LocalizeFrenchDialect.Raw, Cartesia.LocalizeFrenchDialect>;
|
|
8
|
+
export declare namespace LocalizeFrenchDialect {
|
|
9
|
+
type Raw = "eu" | "ca";
|
|
10
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.LocalizeFrenchDialect = void 0;
|
|
40
|
+
const core = __importStar(require("../../../../core"));
|
|
41
|
+
exports.LocalizeFrenchDialect = core.serialization.enum_(["eu", "ca"]);
|
|
@@ -4,14 +4,15 @@
|
|
|
4
4
|
import * as serializers from "../../../index";
|
|
5
5
|
import * as Cartesia from "../../../../api/index";
|
|
6
6
|
import * as core from "../../../../core";
|
|
7
|
-
import { Embedding } from "../../embedding/types/Embedding";
|
|
8
7
|
import { LocalizeTargetLanguage } from "./LocalizeTargetLanguage";
|
|
9
8
|
import { Gender } from "./Gender";
|
|
10
9
|
import { LocalizeDialect } from "./LocalizeDialect";
|
|
11
10
|
export declare const LocalizeVoiceRequest: core.serialization.ObjectSchema<serializers.LocalizeVoiceRequest.Raw, Cartesia.LocalizeVoiceRequest>;
|
|
12
11
|
export declare namespace LocalizeVoiceRequest {
|
|
13
12
|
interface Raw {
|
|
14
|
-
|
|
13
|
+
voice_id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
description: string;
|
|
15
16
|
language: LocalizeTargetLanguage.Raw;
|
|
16
17
|
original_speaker_gender: Gender.Raw;
|
|
17
18
|
dialect?: LocalizeDialect.Raw | null;
|
|
@@ -38,12 +38,13 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.LocalizeVoiceRequest = void 0;
|
|
40
40
|
const core = __importStar(require("../../../../core"));
|
|
41
|
-
const Embedding_1 = require("../../embedding/types/Embedding");
|
|
42
41
|
const LocalizeTargetLanguage_1 = require("./LocalizeTargetLanguage");
|
|
43
42
|
const Gender_1 = require("./Gender");
|
|
44
43
|
const LocalizeDialect_1 = require("./LocalizeDialect");
|
|
45
44
|
exports.LocalizeVoiceRequest = core.serialization.object({
|
|
46
|
-
|
|
45
|
+
voiceId: core.serialization.property("voice_id", core.serialization.string()),
|
|
46
|
+
name: core.serialization.string(),
|
|
47
|
+
description: core.serialization.string(),
|
|
47
48
|
language: LocalizeTargetLanguage_1.LocalizeTargetLanguage,
|
|
48
49
|
originalSpeakerGender: core.serialization.property("original_speaker_gender", Gender_1.Gender),
|
|
49
50
|
dialect: LocalizeDialect_1.LocalizeDialect.optional(),
|
|
@@ -6,6 +6,7 @@ export * from "./CreateVoiceRequest";
|
|
|
6
6
|
export * from "./UpdateVoiceRequest";
|
|
7
7
|
export * from "./LocalizeTargetLanguage";
|
|
8
8
|
export * from "./LocalizeEnglishDialect";
|
|
9
|
+
export * from "./LocalizeFrenchDialect";
|
|
9
10
|
export * from "./LocalizeSpanishDialect";
|
|
10
11
|
export * from "./LocalizePortugueseDialect";
|
|
11
12
|
export * from "./LocalizeDialect";
|
|
@@ -22,6 +22,7 @@ __exportStar(require("./CreateVoiceRequest"), exports);
|
|
|
22
22
|
__exportStar(require("./UpdateVoiceRequest"), exports);
|
|
23
23
|
__exportStar(require("./LocalizeTargetLanguage"), exports);
|
|
24
24
|
__exportStar(require("./LocalizeEnglishDialect"), exports);
|
|
25
|
+
__exportStar(require("./LocalizeFrenchDialect"), exports);
|
|
25
26
|
__exportStar(require("./LocalizeSpanishDialect"), exports);
|
|
26
27
|
__exportStar(require("./LocalizePortugueseDialect"), exports);
|
|
27
28
|
__exportStar(require("./LocalizeDialect"), exports);
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "2.1.
|
|
1
|
+
export declare const SDK_VERSION = "2.1.8";
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -303,7 +303,7 @@ await client.infill.bytes(fs.createReadStream("/path/to/your/file"), fs.createRe
|
|
|
303
303
|
|
|
304
304
|
```typescript
|
|
305
305
|
await client.tts.bytes({
|
|
306
|
-
modelId: "sonic
|
|
306
|
+
modelId: "sonic",
|
|
307
307
|
transcript: "Hello, world!",
|
|
308
308
|
voice: {
|
|
309
309
|
mode: "id",
|
|
@@ -364,7 +364,7 @@ await client.tts.bytes({
|
|
|
364
364
|
|
|
365
365
|
```typescript
|
|
366
366
|
const response = await client.tts.sse({
|
|
367
|
-
modelId: "sonic
|
|
367
|
+
modelId: "sonic",
|
|
368
368
|
transcript: "Hello, world!",
|
|
369
369
|
voice: {
|
|
370
370
|
mode: "id",
|
|
@@ -836,10 +836,25 @@ await client.voices.get("id");
|
|
|
836
836
|
</dl>
|
|
837
837
|
</details>
|
|
838
838
|
|
|
839
|
-
<details><summary><code>client.voices.<a href="/src/api/resources/voices/client/Client.ts">localize</a>({ ...params }) -> Cartesia.
|
|
839
|
+
<details><summary><code>client.voices.<a href="/src/api/resources/voices/client/Client.ts">localize</a>({ ...params }) -> Cartesia.VoiceMetadata</code></summary>
|
|
840
840
|
<dl>
|
|
841
841
|
<dd>
|
|
842
842
|
|
|
843
|
+
#### 📝 Description
|
|
844
|
+
|
|
845
|
+
<dl>
|
|
846
|
+
<dd>
|
|
847
|
+
|
|
848
|
+
<dl>
|
|
849
|
+
<dd>
|
|
850
|
+
|
|
851
|
+
Create a new voice from an existing voice localized to a new language and dialect.
|
|
852
|
+
|
|
853
|
+
</dd>
|
|
854
|
+
</dl>
|
|
855
|
+
</dd>
|
|
856
|
+
</dl>
|
|
857
|
+
|
|
843
858
|
#### 🔌 Usage
|
|
844
859
|
|
|
845
860
|
<dl>
|
|
@@ -850,10 +865,12 @@ await client.voices.get("id");
|
|
|
850
865
|
|
|
851
866
|
```typescript
|
|
852
867
|
await client.voices.localize({
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
868
|
+
voiceId: "694f9389-aac1-45b6-b726-9d9369183238",
|
|
869
|
+
name: "Sarah Peninsular Spanish",
|
|
870
|
+
description: "Sarah Voice in Peninsular Spanish",
|
|
871
|
+
language: "es",
|
|
872
|
+
originalSpeakerGender: "female",
|
|
873
|
+
dialect: "pe",
|
|
857
874
|
});
|
|
858
875
|
```
|
|
859
876
|
|
|
@@ -948,7 +965,7 @@ await client.voices.mix({
|
|
|
948
965
|
</dl>
|
|
949
966
|
</details>
|
|
950
967
|
|
|
951
|
-
<details><summary><code>client.voices.<a href="/src/api/resources/voices/client/Client.ts">create</a>({ ...params }) -> Cartesia.
|
|
968
|
+
<details><summary><code>client.voices.<a href="/src/api/resources/voices/client/Client.ts">create</a>({ ...params }) -> Cartesia.VoiceMetadata</code></summary>
|
|
952
969
|
<dl>
|
|
953
970
|
<dd>
|
|
954
971
|
|
|
@@ -7,7 +7,8 @@ import * as core from "../../../../core";
|
|
|
7
7
|
import { LocalizeEnglishDialect } from "./LocalizeEnglishDialect";
|
|
8
8
|
import { LocalizeSpanishDialect } from "./LocalizeSpanishDialect";
|
|
9
9
|
import { LocalizePortugueseDialect } from "./LocalizePortugueseDialect";
|
|
10
|
+
import { LocalizeFrenchDialect } from "./LocalizeFrenchDialect";
|
|
10
11
|
export declare const LocalizeDialect: core.serialization.Schema<serializers.LocalizeDialect.Raw, Cartesia.LocalizeDialect>;
|
|
11
12
|
export declare namespace LocalizeDialect {
|
|
12
|
-
type Raw = LocalizeEnglishDialect.Raw | LocalizeSpanishDialect.Raw | LocalizePortugueseDialect.Raw;
|
|
13
|
+
type Raw = LocalizeEnglishDialect.Raw | LocalizeSpanishDialect.Raw | LocalizePortugueseDialect.Raw | LocalizeFrenchDialect.Raw;
|
|
13
14
|
}
|
|
@@ -41,8 +41,10 @@ const core = __importStar(require("../../../../core"));
|
|
|
41
41
|
const LocalizeEnglishDialect_1 = require("./LocalizeEnglishDialect");
|
|
42
42
|
const LocalizeSpanishDialect_1 = require("./LocalizeSpanishDialect");
|
|
43
43
|
const LocalizePortugueseDialect_1 = require("./LocalizePortugueseDialect");
|
|
44
|
+
const LocalizeFrenchDialect_1 = require("./LocalizeFrenchDialect");
|
|
44
45
|
exports.LocalizeDialect = core.serialization.undiscriminatedUnion([
|
|
45
46
|
LocalizeEnglishDialect_1.LocalizeEnglishDialect,
|
|
46
47
|
LocalizeSpanishDialect_1.LocalizeSpanishDialect,
|
|
47
48
|
LocalizePortugueseDialect_1.LocalizePortugueseDialect,
|
|
49
|
+
LocalizeFrenchDialect_1.LocalizeFrenchDialect,
|
|
48
50
|
]);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as serializers from "../../../index";
|
|
5
|
+
import * as Cartesia from "../../../../api/index";
|
|
6
|
+
import * as core from "../../../../core";
|
|
7
|
+
export declare const LocalizeFrenchDialect: core.serialization.Schema<serializers.LocalizeFrenchDialect.Raw, Cartesia.LocalizeFrenchDialect>;
|
|
8
|
+
export declare namespace LocalizeFrenchDialect {
|
|
9
|
+
type Raw = "eu" | "ca";
|
|
10
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.LocalizeFrenchDialect = void 0;
|
|
40
|
+
const core = __importStar(require("../../../../core"));
|
|
41
|
+
exports.LocalizeFrenchDialect = core.serialization.enum_(["eu", "ca"]);
|
|
@@ -4,14 +4,15 @@
|
|
|
4
4
|
import * as serializers from "../../../index";
|
|
5
5
|
import * as Cartesia from "../../../../api/index";
|
|
6
6
|
import * as core from "../../../../core";
|
|
7
|
-
import { Embedding } from "../../embedding/types/Embedding";
|
|
8
7
|
import { LocalizeTargetLanguage } from "./LocalizeTargetLanguage";
|
|
9
8
|
import { Gender } from "./Gender";
|
|
10
9
|
import { LocalizeDialect } from "./LocalizeDialect";
|
|
11
10
|
export declare const LocalizeVoiceRequest: core.serialization.ObjectSchema<serializers.LocalizeVoiceRequest.Raw, Cartesia.LocalizeVoiceRequest>;
|
|
12
11
|
export declare namespace LocalizeVoiceRequest {
|
|
13
12
|
interface Raw {
|
|
14
|
-
|
|
13
|
+
voice_id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
description: string;
|
|
15
16
|
language: LocalizeTargetLanguage.Raw;
|
|
16
17
|
original_speaker_gender: Gender.Raw;
|
|
17
18
|
dialect?: LocalizeDialect.Raw | null;
|
|
@@ -38,12 +38,13 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.LocalizeVoiceRequest = void 0;
|
|
40
40
|
const core = __importStar(require("../../../../core"));
|
|
41
|
-
const Embedding_1 = require("../../embedding/types/Embedding");
|
|
42
41
|
const LocalizeTargetLanguage_1 = require("./LocalizeTargetLanguage");
|
|
43
42
|
const Gender_1 = require("./Gender");
|
|
44
43
|
const LocalizeDialect_1 = require("./LocalizeDialect");
|
|
45
44
|
exports.LocalizeVoiceRequest = core.serialization.object({
|
|
46
|
-
|
|
45
|
+
voiceId: core.serialization.property("voice_id", core.serialization.string()),
|
|
46
|
+
name: core.serialization.string(),
|
|
47
|
+
description: core.serialization.string(),
|
|
47
48
|
language: LocalizeTargetLanguage_1.LocalizeTargetLanguage,
|
|
48
49
|
originalSpeakerGender: core.serialization.property("original_speaker_gender", Gender_1.Gender),
|
|
49
50
|
dialect: LocalizeDialect_1.LocalizeDialect.optional(),
|
|
@@ -6,6 +6,7 @@ export * from "./CreateVoiceRequest";
|
|
|
6
6
|
export * from "./UpdateVoiceRequest";
|
|
7
7
|
export * from "./LocalizeTargetLanguage";
|
|
8
8
|
export * from "./LocalizeEnglishDialect";
|
|
9
|
+
export * from "./LocalizeFrenchDialect";
|
|
9
10
|
export * from "./LocalizeSpanishDialect";
|
|
10
11
|
export * from "./LocalizePortugueseDialect";
|
|
11
12
|
export * from "./LocalizeDialect";
|
|
@@ -22,6 +22,7 @@ __exportStar(require("./CreateVoiceRequest"), exports);
|
|
|
22
22
|
__exportStar(require("./UpdateVoiceRequest"), exports);
|
|
23
23
|
__exportStar(require("./LocalizeTargetLanguage"), exports);
|
|
24
24
|
__exportStar(require("./LocalizeEnglishDialect"), exports);
|
|
25
|
+
__exportStar(require("./LocalizeFrenchDialect"), exports);
|
|
25
26
|
__exportStar(require("./LocalizeSpanishDialect"), exports);
|
|
26
27
|
__exportStar(require("./LocalizePortugueseDialect"), exports);
|
|
27
28
|
__exportStar(require("./LocalizeDialect"), exports);
|
package/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "2.1.
|
|
1
|
+
export declare const SDK_VERSION = "2.1.8";
|
package/version.js
CHANGED