@cartesia/cartesia-js 2.1.2 → 2.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Client.d.ts +3 -0
- package/Client.js +11 -6
- package/README.md +1 -2
- package/api/resources/apiStatus/client/Client.js +1 -1
- package/api/resources/datasets/client/Client.js +4 -4
- package/api/resources/index.d.ts +2 -0
- package/api/resources/index.js +3 -1
- package/api/resources/infill/client/Client.d.ts +44 -0
- package/api/resources/infill/client/Client.js +127 -0
- package/api/resources/infill/client/index.d.ts +1 -0
- package/api/resources/infill/client/index.js +17 -0
- package/api/resources/infill/client/requests/InfillBytesRequest.d.ts +67 -0
- package/api/resources/infill/client/requests/InfillBytesRequest.js +5 -0
- package/api/resources/infill/client/requests/index.d.ts +1 -0
- package/api/resources/infill/client/requests/index.js +2 -0
- package/api/resources/infill/index.d.ts +1 -0
- package/api/resources/infill/index.js +17 -0
- package/api/resources/tts/types/Emotion.d.ts +5 -1
- package/api/resources/tts/types/Emotion.js +4 -0
- package/api/resources/tts/types/GenerationRequest.d.ts +2 -0
- package/api/resources/tts/types/PhonemeTimestamps.d.ts +8 -0
- package/api/resources/tts/types/PhonemeTimestamps.js +5 -0
- package/api/resources/tts/types/WebSocketPhonemeTimestampsResponse.d.ts +7 -0
- package/api/resources/tts/types/WebSocketPhonemeTimestampsResponse.js +5 -0
- package/api/resources/tts/types/WebSocketResponse.d.ts +4 -1
- package/api/resources/tts/types/WebSocketTtsOutput.d.ts +1 -0
- package/api/resources/tts/types/WebSocketTtsRequest.d.ts +2 -0
- package/api/resources/tts/types/index.d.ts +2 -0
- package/api/resources/tts/types/index.js +2 -0
- package/api/resources/voices/client/Client.d.ts +1 -2
- package/api/resources/voices/client/Client.js +9 -10
- package/api/resources/voices/types/CreateVoiceRequest.d.ts +0 -1
- package/api/resources/voices/types/Voice.d.ts +0 -1
- package/dist/Client.d.ts +3 -0
- package/dist/Client.js +11 -6
- package/dist/api/resources/apiStatus/client/Client.js +1 -1
- package/dist/api/resources/datasets/client/Client.js +4 -4
- package/dist/api/resources/index.d.ts +2 -0
- package/dist/api/resources/index.js +3 -1
- package/dist/api/resources/infill/client/Client.d.ts +44 -0
- package/dist/api/resources/infill/client/Client.js +127 -0
- package/dist/api/resources/infill/client/index.d.ts +1 -0
- package/dist/api/resources/infill/client/index.js +17 -0
- package/dist/api/resources/infill/client/requests/InfillBytesRequest.d.ts +67 -0
- package/dist/api/resources/infill/client/requests/InfillBytesRequest.js +5 -0
- package/dist/api/resources/infill/client/requests/index.d.ts +1 -0
- package/dist/api/resources/infill/client/requests/index.js +2 -0
- package/dist/api/resources/infill/index.d.ts +1 -0
- package/dist/api/resources/infill/index.js +17 -0
- package/dist/api/resources/tts/types/Emotion.d.ts +5 -1
- package/dist/api/resources/tts/types/Emotion.js +4 -0
- package/dist/api/resources/tts/types/GenerationRequest.d.ts +2 -0
- package/dist/api/resources/tts/types/PhonemeTimestamps.d.ts +8 -0
- package/dist/api/resources/tts/types/PhonemeTimestamps.js +5 -0
- package/dist/api/resources/tts/types/WebSocketPhonemeTimestampsResponse.d.ts +7 -0
- package/dist/api/resources/tts/types/WebSocketPhonemeTimestampsResponse.js +5 -0
- package/dist/api/resources/tts/types/WebSocketResponse.d.ts +4 -1
- package/dist/api/resources/tts/types/WebSocketTtsOutput.d.ts +1 -0
- package/dist/api/resources/tts/types/WebSocketTtsRequest.d.ts +2 -0
- package/dist/api/resources/tts/types/index.d.ts +2 -0
- package/dist/api/resources/tts/types/index.js +2 -0
- package/dist/api/resources/voices/client/Client.d.ts +1 -2
- package/dist/api/resources/voices/client/Client.js +9 -10
- package/dist/api/resources/voices/types/CreateVoiceRequest.d.ts +0 -1
- package/dist/api/resources/voices/types/Voice.d.ts +0 -1
- package/dist/serialization/resources/tts/types/Emotion.d.ts +1 -1
- package/dist/serialization/resources/tts/types/Emotion.js +4 -0
- package/dist/serialization/resources/tts/types/GenerationRequest.d.ts +1 -0
- package/dist/serialization/resources/tts/types/GenerationRequest.js +1 -0
- package/dist/serialization/resources/tts/types/PhonemeTimestamps.d.ts +14 -0
- package/dist/serialization/resources/tts/types/PhonemeTimestamps.js +35 -0
- package/dist/serialization/resources/tts/types/WebSocketPhonemeTimestampsResponse.d.ts +14 -0
- package/dist/serialization/resources/tts/types/WebSocketPhonemeTimestampsResponse.js +37 -0
- package/dist/serialization/resources/tts/types/WebSocketResponse.d.ts +5 -1
- package/dist/serialization/resources/tts/types/WebSocketResponse.js +2 -0
- package/dist/serialization/resources/tts/types/WebSocketTtsOutput.d.ts +2 -0
- package/dist/serialization/resources/tts/types/WebSocketTtsOutput.js +2 -0
- package/dist/serialization/resources/tts/types/WebSocketTtsRequest.d.ts +2 -0
- package/dist/serialization/resources/tts/types/WebSocketTtsRequest.js +2 -0
- package/dist/serialization/resources/tts/types/index.d.ts +2 -0
- package/dist/serialization/resources/tts/types/index.js +2 -0
- package/dist/serialization/resources/voices/types/CreateVoiceRequest.d.ts +0 -2
- package/dist/serialization/resources/voices/types/CreateVoiceRequest.js +0 -2
- package/dist/serialization/resources/voices/types/Voice.d.ts +0 -2
- package/dist/serialization/resources/voices/types/Voice.js +0 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +93 -1
- package/serialization/resources/tts/types/Emotion.d.ts +1 -1
- package/serialization/resources/tts/types/Emotion.js +4 -0
- package/serialization/resources/tts/types/GenerationRequest.d.ts +1 -0
- package/serialization/resources/tts/types/GenerationRequest.js +1 -0
- package/serialization/resources/tts/types/PhonemeTimestamps.d.ts +14 -0
- package/serialization/resources/tts/types/PhonemeTimestamps.js +35 -0
- package/serialization/resources/tts/types/WebSocketPhonemeTimestampsResponse.d.ts +14 -0
- package/serialization/resources/tts/types/WebSocketPhonemeTimestampsResponse.js +37 -0
- package/serialization/resources/tts/types/WebSocketResponse.d.ts +5 -1
- package/serialization/resources/tts/types/WebSocketResponse.js +2 -0
- package/serialization/resources/tts/types/WebSocketTtsOutput.d.ts +2 -0
- package/serialization/resources/tts/types/WebSocketTtsOutput.js +2 -0
- package/serialization/resources/tts/types/WebSocketTtsRequest.d.ts +2 -0
- package/serialization/resources/tts/types/WebSocketTtsRequest.js +2 -0
- package/serialization/resources/tts/types/index.d.ts +2 -0
- package/serialization/resources/tts/types/index.js +2 -0
- package/serialization/resources/voices/types/CreateVoiceRequest.d.ts +0 -2
- package/serialization/resources/voices/types/CreateVoiceRequest.js +0 -2
- package/serialization/resources/voices/types/Voice.d.ts +0 -2
- package/serialization/resources/voices/types/Voice.js +0 -2
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/reference.md
CHANGED
|
@@ -246,6 +246,99 @@ await client.datasets.uploadFile(fs.createReadStream("/path/to/your/file"), "str
|
|
|
246
246
|
</dl>
|
|
247
247
|
</details>
|
|
248
248
|
|
|
249
|
+
## Infill
|
|
250
|
+
|
|
251
|
+
<details><summary><code>client.infill.<a href="/src/api/resources/infill/client/Client.ts">bytes</a>(leftAudio, rightAudio, { ...params }) -> stream.Readable</code></summary>
|
|
252
|
+
<dl>
|
|
253
|
+
<dd>
|
|
254
|
+
|
|
255
|
+
#### 📝 Description
|
|
256
|
+
|
|
257
|
+
<dl>
|
|
258
|
+
<dd>
|
|
259
|
+
|
|
260
|
+
<dl>
|
|
261
|
+
<dd>
|
|
262
|
+
|
|
263
|
+
Generate audio that smoothly connects two existing audio segments. This is useful for inserting new speech between existing speech segments while maintaining natural transitions.
|
|
264
|
+
|
|
265
|
+
Only the `sonic-preview` model is supported for infill at this time.
|
|
266
|
+
|
|
267
|
+
At least one of `left_audio` or `right_audio` must be provided.
|
|
268
|
+
|
|
269
|
+
</dd>
|
|
270
|
+
</dl>
|
|
271
|
+
</dd>
|
|
272
|
+
</dl>
|
|
273
|
+
|
|
274
|
+
#### 🔌 Usage
|
|
275
|
+
|
|
276
|
+
<dl>
|
|
277
|
+
<dd>
|
|
278
|
+
|
|
279
|
+
<dl>
|
|
280
|
+
<dd>
|
|
281
|
+
|
|
282
|
+
```typescript
|
|
283
|
+
await client.infill.bytes(fs.createReadStream("/path/to/your/file"), fs.createReadStream("/path/to/your/file"), {
|
|
284
|
+
modelId: "sonic-preview",
|
|
285
|
+
language: "en",
|
|
286
|
+
transcript: "middle segment",
|
|
287
|
+
voiceId: "694f9389-aac1-45b6-b726-9d9369183238",
|
|
288
|
+
outputFormatContainer: "mp3",
|
|
289
|
+
outputFormatSampleRate: 44100,
|
|
290
|
+
outputFormatBitRate: 128000,
|
|
291
|
+
});
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
</dd>
|
|
295
|
+
</dl>
|
|
296
|
+
</dd>
|
|
297
|
+
</dl>
|
|
298
|
+
|
|
299
|
+
#### ⚙️ Parameters
|
|
300
|
+
|
|
301
|
+
<dl>
|
|
302
|
+
<dd>
|
|
303
|
+
|
|
304
|
+
<dl>
|
|
305
|
+
<dd>
|
|
306
|
+
|
|
307
|
+
**leftAudio:** `File | fs.ReadStream | Blob`
|
|
308
|
+
|
|
309
|
+
</dd>
|
|
310
|
+
</dl>
|
|
311
|
+
|
|
312
|
+
<dl>
|
|
313
|
+
<dd>
|
|
314
|
+
|
|
315
|
+
**rightAudio:** `File | fs.ReadStream | Blob`
|
|
316
|
+
|
|
317
|
+
</dd>
|
|
318
|
+
</dl>
|
|
319
|
+
|
|
320
|
+
<dl>
|
|
321
|
+
<dd>
|
|
322
|
+
|
|
323
|
+
**request:** `Cartesia.InfillBytesRequest`
|
|
324
|
+
|
|
325
|
+
</dd>
|
|
326
|
+
</dl>
|
|
327
|
+
|
|
328
|
+
<dl>
|
|
329
|
+
<dd>
|
|
330
|
+
|
|
331
|
+
**requestOptions:** `Infill.RequestOptions`
|
|
332
|
+
|
|
333
|
+
</dd>
|
|
334
|
+
</dl>
|
|
335
|
+
</dd>
|
|
336
|
+
</dl>
|
|
337
|
+
|
|
338
|
+
</dd>
|
|
339
|
+
</dl>
|
|
340
|
+
</details>
|
|
341
|
+
|
|
249
342
|
## Tts
|
|
250
343
|
|
|
251
344
|
<details><summary><code>client.tts.<a href="/src/api/resources/tts/client/Client.ts">bytes</a>({ ...params }) -> stream.Readable</code></summary>
|
|
@@ -584,7 +677,6 @@ await client.voices.create({
|
|
|
584
677
|
1, 1, 1, 1, 1, 1, 1,
|
|
585
678
|
],
|
|
586
679
|
language: "en",
|
|
587
|
-
baseVoiceId: "string",
|
|
588
680
|
});
|
|
589
681
|
```
|
|
590
682
|
|
|
@@ -6,5 +6,5 @@ import * as Cartesia from "../../../../api/index";
|
|
|
6
6
|
import * as core from "../../../../core";
|
|
7
7
|
export declare const Emotion: core.serialization.Schema<serializers.Emotion.Raw, Cartesia.Emotion>;
|
|
8
8
|
export declare namespace Emotion {
|
|
9
|
-
type Raw = "anger:lowest" | "anger:low" | "anger:high" | "anger:highest" | "positivity:lowest" | "positivity:low" | "positivity:high" | "positivity:highest" | "surprise:lowest" | "surprise:high" | "surprise:highest" | "sadness:lowest" | "sadness:low" | "curiosity:low" | "curiosity:high" | "curiosity:highest";
|
|
9
|
+
type Raw = "anger:lowest" | "anger:low" | "anger:high" | "anger:highest" | "positivity:lowest" | "positivity:low" | "positivity:high" | "positivity:highest" | "surprise:lowest" | "surprise:low" | "surprise:high" | "surprise:highest" | "sadness:lowest" | "sadness:low" | "sadness:high" | "sadness:highest" | "curiosity:lowest" | "curiosity:low" | "curiosity:high" | "curiosity:highest";
|
|
10
10
|
}
|
|
@@ -38,10 +38,14 @@ exports.Emotion = core.serialization.enum_([
|
|
|
38
38
|
"positivity:high",
|
|
39
39
|
"positivity:highest",
|
|
40
40
|
"surprise:lowest",
|
|
41
|
+
"surprise:low",
|
|
41
42
|
"surprise:high",
|
|
42
43
|
"surprise:highest",
|
|
43
44
|
"sadness:lowest",
|
|
44
45
|
"sadness:low",
|
|
46
|
+
"sadness:high",
|
|
47
|
+
"sadness:highest",
|
|
48
|
+
"curiosity:lowest",
|
|
45
49
|
"curiosity:low",
|
|
46
50
|
"curiosity:high",
|
|
47
51
|
"curiosity:highest",
|
|
@@ -42,4 +42,5 @@ exports.GenerationRequest = core.serialization.object({
|
|
|
42
42
|
contextId: core.serialization.property("context_id", ContextId_1.ContextId),
|
|
43
43
|
continue: core.serialization.boolean().optional(),
|
|
44
44
|
addTimestamps: core.serialization.property("add_timestamps", core.serialization.boolean().optional()),
|
|
45
|
+
addPhonemeTimestamps: core.serialization.property("add_phoneme_timestamps", core.serialization.boolean().optional()),
|
|
45
46
|
});
|
|
@@ -0,0 +1,14 @@
|
|
|
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 PhonemeTimestamps: core.serialization.ObjectSchema<serializers.PhonemeTimestamps.Raw, Cartesia.PhonemeTimestamps>;
|
|
8
|
+
export declare namespace PhonemeTimestamps {
|
|
9
|
+
interface Raw {
|
|
10
|
+
phonemes: string[];
|
|
11
|
+
start: number[];
|
|
12
|
+
end: number[];
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
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 (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.PhonemeTimestamps = void 0;
|
|
30
|
+
const core = __importStar(require("../../../../core"));
|
|
31
|
+
exports.PhonemeTimestamps = core.serialization.object({
|
|
32
|
+
phonemes: core.serialization.list(core.serialization.string()),
|
|
33
|
+
start: core.serialization.list(core.serialization.number()),
|
|
34
|
+
end: core.serialization.list(core.serialization.number()),
|
|
35
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
import { PhonemeTimestamps } from "./PhonemeTimestamps";
|
|
8
|
+
import { WebSocketBaseResponse } from "./WebSocketBaseResponse";
|
|
9
|
+
export declare const WebSocketPhonemeTimestampsResponse: core.serialization.ObjectSchema<serializers.WebSocketPhonemeTimestampsResponse.Raw, Cartesia.WebSocketPhonemeTimestampsResponse>;
|
|
10
|
+
export declare namespace WebSocketPhonemeTimestampsResponse {
|
|
11
|
+
interface Raw extends WebSocketBaseResponse.Raw {
|
|
12
|
+
phoneme_timestamps?: PhonemeTimestamps.Raw | null;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
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 (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.WebSocketPhonemeTimestampsResponse = void 0;
|
|
30
|
+
const core = __importStar(require("../../../../core"));
|
|
31
|
+
const PhonemeTimestamps_1 = require("./PhonemeTimestamps");
|
|
32
|
+
const WebSocketBaseResponse_1 = require("./WebSocketBaseResponse");
|
|
33
|
+
exports.WebSocketPhonemeTimestampsResponse = core.serialization
|
|
34
|
+
.object({
|
|
35
|
+
phonemeTimestamps: core.serialization.property("phoneme_timestamps", PhonemeTimestamps_1.PhonemeTimestamps.optional()),
|
|
36
|
+
})
|
|
37
|
+
.extend(WebSocketBaseResponse_1.WebSocketBaseResponse);
|
|
@@ -8,9 +8,10 @@ import { WebSocketChunkResponse } from "./WebSocketChunkResponse";
|
|
|
8
8
|
import { WebSocketDoneResponse } from "./WebSocketDoneResponse";
|
|
9
9
|
import { WebSocketTimestampsResponse } from "./WebSocketTimestampsResponse";
|
|
10
10
|
import { WebSocketErrorResponse } from "./WebSocketErrorResponse";
|
|
11
|
+
import { WebSocketPhonemeTimestampsResponse } from "./WebSocketPhonemeTimestampsResponse";
|
|
11
12
|
export declare const WebSocketResponse: core.serialization.Schema<serializers.WebSocketResponse.Raw, Cartesia.WebSocketResponse>;
|
|
12
13
|
export declare namespace WebSocketResponse {
|
|
13
|
-
type Raw = WebSocketResponse.Chunk | WebSocketResponse.Done | WebSocketResponse.Timestamps | WebSocketResponse.Error;
|
|
14
|
+
type Raw = WebSocketResponse.Chunk | WebSocketResponse.Done | WebSocketResponse.Timestamps | WebSocketResponse.Error | WebSocketResponse.PhonemeTimestamps;
|
|
14
15
|
interface Chunk extends WebSocketChunkResponse.Raw {
|
|
15
16
|
type: "chunk";
|
|
16
17
|
}
|
|
@@ -23,4 +24,7 @@ export declare namespace WebSocketResponse {
|
|
|
23
24
|
interface Error extends WebSocketErrorResponse.Raw {
|
|
24
25
|
type: "error";
|
|
25
26
|
}
|
|
27
|
+
interface PhonemeTimestamps extends WebSocketPhonemeTimestampsResponse.Raw {
|
|
28
|
+
type: "phoneme_timestamps";
|
|
29
|
+
}
|
|
26
30
|
}
|
|
@@ -32,12 +32,14 @@ const WebSocketChunkResponse_1 = require("./WebSocketChunkResponse");
|
|
|
32
32
|
const WebSocketDoneResponse_1 = require("./WebSocketDoneResponse");
|
|
33
33
|
const WebSocketTimestampsResponse_1 = require("./WebSocketTimestampsResponse");
|
|
34
34
|
const WebSocketErrorResponse_1 = require("./WebSocketErrorResponse");
|
|
35
|
+
const WebSocketPhonemeTimestampsResponse_1 = require("./WebSocketPhonemeTimestampsResponse");
|
|
35
36
|
exports.WebSocketResponse = core.serialization
|
|
36
37
|
.union("type", {
|
|
37
38
|
chunk: WebSocketChunkResponse_1.WebSocketChunkResponse,
|
|
38
39
|
done: WebSocketDoneResponse_1.WebSocketDoneResponse,
|
|
39
40
|
timestamps: WebSocketTimestampsResponse_1.WebSocketTimestampsResponse,
|
|
40
41
|
error: WebSocketErrorResponse_1.WebSocketErrorResponse,
|
|
42
|
+
phoneme_timestamps: WebSocketPhonemeTimestampsResponse_1.WebSocketPhonemeTimestampsResponse,
|
|
41
43
|
})
|
|
42
44
|
.transform({
|
|
43
45
|
transform: (value) => value,
|
|
@@ -5,11 +5,13 @@ import * as serializers from "../../../index";
|
|
|
5
5
|
import * as Cartesia from "../../../../api/index";
|
|
6
6
|
import * as core from "../../../../core";
|
|
7
7
|
import { WordTimestamps } from "./WordTimestamps";
|
|
8
|
+
import { PhonemeTimestamps } from "./PhonemeTimestamps";
|
|
8
9
|
import { ContextId } from "./ContextId";
|
|
9
10
|
export declare const WebSocketTtsOutput: core.serialization.ObjectSchema<serializers.WebSocketTtsOutput.Raw, Cartesia.WebSocketTtsOutput>;
|
|
10
11
|
export declare namespace WebSocketTtsOutput {
|
|
11
12
|
interface Raw {
|
|
12
13
|
word_timestamps?: WordTimestamps.Raw | null;
|
|
14
|
+
phoneme_timestamps?: PhonemeTimestamps.Raw | null;
|
|
13
15
|
audio?: unknown | null;
|
|
14
16
|
context_id?: ContextId.Raw | null;
|
|
15
17
|
}
|
|
@@ -29,9 +29,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
29
29
|
exports.WebSocketTtsOutput = void 0;
|
|
30
30
|
const core = __importStar(require("../../../../core"));
|
|
31
31
|
const WordTimestamps_1 = require("./WordTimestamps");
|
|
32
|
+
const PhonemeTimestamps_1 = require("./PhonemeTimestamps");
|
|
32
33
|
const ContextId_1 = require("./ContextId");
|
|
33
34
|
exports.WebSocketTtsOutput = core.serialization.object({
|
|
34
35
|
wordTimestamps: core.serialization.property("word_timestamps", WordTimestamps_1.WordTimestamps.optional()),
|
|
36
|
+
phonemeTimestamps: core.serialization.property("phoneme_timestamps", PhonemeTimestamps_1.PhonemeTimestamps.optional()),
|
|
35
37
|
audio: core.serialization.unknown().optional(),
|
|
36
38
|
contextId: core.serialization.property("context_id", ContextId_1.ContextId.optional()),
|
|
37
39
|
});
|
|
@@ -38,5 +38,7 @@ exports.WebSocketTtsRequest = core.serialization.object({
|
|
|
38
38
|
duration: core.serialization.number().optional(),
|
|
39
39
|
language: core.serialization.string().optional(),
|
|
40
40
|
addTimestamps: core.serialization.property("add_timestamps", core.serialization.boolean().optional()),
|
|
41
|
+
addPhonemeTimestamps: core.serialization.property("add_phoneme_timestamps", core.serialization.boolean().optional()),
|
|
42
|
+
continue: core.serialization.boolean().optional(),
|
|
41
43
|
contextId: core.serialization.property("context_id", core.serialization.string().optional()),
|
|
42
44
|
});
|
|
@@ -4,9 +4,11 @@ export * from "./WebSocketResponse";
|
|
|
4
4
|
export * from "./WebSocketErrorResponse";
|
|
5
5
|
export * from "./WebSocketChunkResponse";
|
|
6
6
|
export * from "./WebSocketTimestampsResponse";
|
|
7
|
+
export * from "./WebSocketPhonemeTimestampsResponse";
|
|
7
8
|
export * from "./WebSocketTtsOutput";
|
|
8
9
|
export * from "./WebSocketStreamOptions";
|
|
9
10
|
export * from "./WordTimestamps";
|
|
11
|
+
export * from "./PhonemeTimestamps";
|
|
10
12
|
export * from "./WebSocketDoneResponse";
|
|
11
13
|
export * from "./CancelContextRequest";
|
|
12
14
|
export * from "./GenerationRequest";
|
|
@@ -20,9 +20,11 @@ __exportStar(require("./WebSocketResponse"), exports);
|
|
|
20
20
|
__exportStar(require("./WebSocketErrorResponse"), exports);
|
|
21
21
|
__exportStar(require("./WebSocketChunkResponse"), exports);
|
|
22
22
|
__exportStar(require("./WebSocketTimestampsResponse"), exports);
|
|
23
|
+
__exportStar(require("./WebSocketPhonemeTimestampsResponse"), exports);
|
|
23
24
|
__exportStar(require("./WebSocketTtsOutput"), exports);
|
|
24
25
|
__exportStar(require("./WebSocketStreamOptions"), exports);
|
|
25
26
|
__exportStar(require("./WordTimestamps"), exports);
|
|
27
|
+
__exportStar(require("./PhonemeTimestamps"), exports);
|
|
26
28
|
__exportStar(require("./WebSocketDoneResponse"), exports);
|
|
27
29
|
__exportStar(require("./CancelContextRequest"), exports);
|
|
28
30
|
__exportStar(require("./GenerationRequest"), exports);
|
|
@@ -6,7 +6,6 @@ import * as Cartesia from "../../../../api/index";
|
|
|
6
6
|
import * as core from "../../../../core";
|
|
7
7
|
import { Embedding } from "../../embedding/types/Embedding";
|
|
8
8
|
import { SupportedLanguage } from "../../tts/types/SupportedLanguage";
|
|
9
|
-
import { BaseVoiceId } from "./BaseVoiceId";
|
|
10
9
|
export declare const CreateVoiceRequest: core.serialization.ObjectSchema<serializers.CreateVoiceRequest.Raw, Cartesia.CreateVoiceRequest>;
|
|
11
10
|
export declare namespace CreateVoiceRequest {
|
|
12
11
|
interface Raw {
|
|
@@ -14,6 +13,5 @@ export declare namespace CreateVoiceRequest {
|
|
|
14
13
|
description: string;
|
|
15
14
|
embedding: Embedding.Raw;
|
|
16
15
|
language?: SupportedLanguage.Raw | null;
|
|
17
|
-
base_voice_id?: BaseVoiceId.Raw | null;
|
|
18
16
|
}
|
|
19
17
|
}
|
|
@@ -30,11 +30,9 @@ exports.CreateVoiceRequest = void 0;
|
|
|
30
30
|
const core = __importStar(require("../../../../core"));
|
|
31
31
|
const Embedding_1 = require("../../embedding/types/Embedding");
|
|
32
32
|
const SupportedLanguage_1 = require("../../tts/types/SupportedLanguage");
|
|
33
|
-
const BaseVoiceId_1 = require("./BaseVoiceId");
|
|
34
33
|
exports.CreateVoiceRequest = core.serialization.object({
|
|
35
34
|
name: core.serialization.string(),
|
|
36
35
|
description: core.serialization.string(),
|
|
37
36
|
embedding: Embedding_1.Embedding,
|
|
38
37
|
language: SupportedLanguage_1.SupportedLanguage.optional(),
|
|
39
|
-
baseVoiceId: core.serialization.property("base_voice_id", BaseVoiceId_1.BaseVoiceId.optional()),
|
|
40
38
|
});
|
|
@@ -7,7 +7,6 @@ import * as core from "../../../../core";
|
|
|
7
7
|
import { VoiceId } from "./VoiceId";
|
|
8
8
|
import { Embedding } from "../../embedding/types/Embedding";
|
|
9
9
|
import { SupportedLanguage } from "../../tts/types/SupportedLanguage";
|
|
10
|
-
import { BaseVoiceId } from "./BaseVoiceId";
|
|
11
10
|
export declare const Voice: core.serialization.ObjectSchema<serializers.Voice.Raw, Cartesia.Voice>;
|
|
12
11
|
export declare namespace Voice {
|
|
13
12
|
interface Raw {
|
|
@@ -19,6 +18,5 @@ export declare namespace Voice {
|
|
|
19
18
|
created_at: string;
|
|
20
19
|
embedding: Embedding.Raw;
|
|
21
20
|
language: SupportedLanguage.Raw;
|
|
22
|
-
base_voice_id?: BaseVoiceId.Raw | null;
|
|
23
21
|
}
|
|
24
22
|
}
|
|
@@ -31,7 +31,6 @@ const core = __importStar(require("../../../../core"));
|
|
|
31
31
|
const VoiceId_1 = require("./VoiceId");
|
|
32
32
|
const Embedding_1 = require("../../embedding/types/Embedding");
|
|
33
33
|
const SupportedLanguage_1 = require("../../tts/types/SupportedLanguage");
|
|
34
|
-
const BaseVoiceId_1 = require("./BaseVoiceId");
|
|
35
34
|
exports.Voice = core.serialization.object({
|
|
36
35
|
id: VoiceId_1.VoiceId,
|
|
37
36
|
userId: core.serialization.property("user_id", core.serialization.string().optional()),
|
|
@@ -41,5 +40,4 @@ exports.Voice = core.serialization.object({
|
|
|
41
40
|
createdAt: core.serialization.property("created_at", core.serialization.date()),
|
|
42
41
|
embedding: Embedding_1.Embedding,
|
|
43
42
|
language: SupportedLanguage_1.SupportedLanguage,
|
|
44
|
-
baseVoiceId: core.serialization.property("base_voice_id", BaseVoiceId_1.BaseVoiceId.optional()),
|
|
45
43
|
});
|
package/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "2.1.
|
|
1
|
+
export declare const SDK_VERSION = "2.1.4";
|
package/version.js
CHANGED