@cartesia/cartesia-js 1.0.1 → 1.0.2

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.
@@ -5,71 +5,71 @@ $ tsup src/ --format cjs,esm --dts
5
5
  CLI Target: es6
6
6
  CJS Build start
7
7
  ESM Build start
8
- CJS dist/index.cjs 24.12 KB
9
- CJS dist/lib/client.cjs 3.34 KB
10
- CJS dist/react/index.cjs 31.68 KB
11
- CJS dist/tts/index.cjs 18.49 KB
12
8
  CJS dist/types/index.cjs 764.00 B
13
- CJS dist/voices/index.cjs 5.04 KB
9
+ CJS dist/voices/index.cjs 5.36 KB
10
+ CJS dist/index.cjs 24.67 KB
11
+ CJS dist/lib/client.cjs 4.07 KB
14
12
  CJS dist/lib/constants.cjs 1.43 KB
15
- CJS dist/lib/index.cjs 20.02 KB
13
+ CJS dist/lib/index.cjs 20.57 KB
14
+ CJS dist/react/index.cjs 32.23 KB
16
15
  CJS dist/react/utils.cjs 1.80 KB
16
+ CJS dist/tts/index.cjs 18.92 KB
17
17
  CJS dist/tts/player.cjs 6.96 KB
18
18
  CJS dist/tts/source.cjs 8.15 KB
19
19
  CJS dist/tts/utils.cjs 4.33 KB
20
- CJS dist/tts/websocket.cjs 18.18 KB
21
- CJS ⚡️ Build success in 110ms
22
- ESM dist/chunk-FXPGR372.js 0 B
23
- ESM dist/tts/source.js 144.00 B
24
- ESM dist/tts/utils.js 426.00 B
25
- ESM dist/tts/websocket.js 242.00 B
26
- ESM dist/types/index.js 31.00 B
27
- ESM dist/voices/index.js 174.00 B
20
+ CJS dist/tts/websocket.cjs 18.61 KB
21
+ CJS ⚡️ Build success in 75ms
28
22
  ESM dist/index.js 499.00 B
29
- ESM dist/lib/client.js 132.00 B
30
23
  ESM dist/lib/constants.js 183.00 B
31
- ESM dist/lib/index.js 322.00 B
24
+ ESM dist/chunk-FXPGR372.js 0 B
32
25
  ESM dist/react/index.js 7.62 KB
33
- ESM dist/chunk-OFH3ML4L.js 353.00 B
34
- ESM dist/chunk-KUSVZXDT.js 1.35 KB
26
+ ESM dist/tts/index.js 261.00 B
27
+ ESM dist/lib/index.js 322.00 B
28
+ ESM dist/chunk-NVOCUUOF.js 353.00 B
29
+ ESM dist/chunk-UCYL2SOX.js 1.48 KB
35
30
  ESM dist/react/utils.js 109.00 B
36
31
  ESM dist/chunk-NQVZNVOU.js 337.00 B
37
- ESM dist/tts/index.js 261.00 B
38
- ESM dist/chunk-2NA5SEML.js 439.00 B
39
- ESM dist/chunk-ASZKHN7Q.js 6.89 KB
40
- ESM dist/chunk-5M33ZF3Y.js 841.00 B
32
+ ESM dist/chunk-EDAAHENY.js 439.00 B
33
+ ESM dist/chunk-IZBPLCGW.js 7.13 KB
34
+ ESM dist/chunk-PISCPZK4.js 1.02 KB
41
35
  ESM dist/chunk-2BFEKY3F.js 366.00 B
42
36
  ESM dist/tts/player.js 174.00 B
43
37
  ESM dist/chunk-LZO6K34D.js 3.76 KB
44
38
  ESM dist/chunk-BHY7MNGT.js 2.11 KB
45
39
  ESM dist/chunk-6YQ6KDIQ.js 5.32 KB
46
40
  ESM dist/chunk-GHY2WEOK.js 2.70 KB
47
- ESM ⚡️ Build success in 112ms
41
+ ESM dist/tts/source.js 144.00 B
42
+ ESM dist/tts/utils.js 426.00 B
43
+ ESM dist/tts/websocket.js 242.00 B
44
+ ESM dist/types/index.js 31.00 B
45
+ ESM dist/voices/index.js 174.00 B
46
+ ESM dist/lib/client.js 132.00 B
47
+ ESM ⚡️ Build success in 77ms
48
48
  DTS Build start
49
- DTS ⚡️ Build success in 8520ms
50
- DTS dist/index.d.cts 804.00 B
49
+ DTS ⚡️ Build success in 8516ms
50
+ DTS dist/index.d.cts 817.00 B
51
51
  DTS dist/lib/constants.d.cts 564.00 B
52
52
  DTS dist/lib/index.d.cts 410.00 B
53
- DTS dist/react/index.d.cts 1.07 KB
53
+ DTS dist/react/index.d.cts 1.09 KB
54
54
  DTS dist/react/utils.d.cts 240.00 B
55
55
  DTS dist/tts/index.d.cts 471.00 B
56
56
  DTS dist/tts/player.d.cts 1.20 KB
57
57
  DTS dist/tts/utils.d.cts 2.68 KB
58
58
  DTS dist/tts/websocket.d.cts 2.94 KB
59
59
  DTS dist/tts/source.d.cts 2.55 KB
60
- DTS dist/voices/index.d.cts 399.00 B
61
- DTS dist/lib/client.d.cts 267.00 B
62
- DTS dist/types/index.d.cts 3.07 KB
63
- DTS dist/index.d.ts 796.00 B
60
+ DTS dist/voices/index.d.cts 472.00 B
61
+ DTS dist/lib/client.d.cts 293.00 B
62
+ DTS dist/types/index.d.cts 3.25 KB
63
+ DTS dist/index.d.ts 809.00 B
64
64
  DTS dist/lib/constants.d.ts 564.00 B
65
65
  DTS dist/lib/index.d.ts 404.00 B
66
- DTS dist/react/index.d.ts 1.07 KB
66
+ DTS dist/react/index.d.ts 1.09 KB
67
67
  DTS dist/react/utils.d.ts 240.00 B
68
68
  DTS dist/tts/index.d.ts 467.00 B
69
69
  DTS dist/tts/player.d.ts 1.20 KB
70
70
  DTS dist/tts/utils.d.ts 2.68 KB
71
71
  DTS dist/tts/websocket.d.ts 2.94 KB
72
72
  DTS dist/tts/source.d.ts 2.55 KB
73
- DTS dist/voices/index.d.ts 397.00 B
74
- DTS dist/lib/client.d.ts 266.00 B
75
- DTS dist/types/index.d.ts 3.07 KB
73
+ DTS dist/voices/index.d.ts 470.00 B
74
+ DTS dist/lib/client.d.ts 292.00 B
75
+ DTS dist/types/index.d.ts 3.25 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @cartesia/cartesia-js
2
2
 
3
+ ## 1.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Make voice creation and cloning fully compatible with API.
8
+
3
9
  ## 1.0.1
4
10
 
5
11
  ### Patch Changes
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  WebSocket
3
- } from "./chunk-ASZKHN7Q.js";
3
+ } from "./chunk-IZBPLCGW.js";
4
4
  import {
5
5
  Client
6
- } from "./chunk-5M33ZF3Y.js";
6
+ } from "./chunk-PISCPZK4.js";
7
7
 
8
8
  // src/tts/index.ts
9
9
  var TTS = class extends Client {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Client
3
- } from "./chunk-5M33ZF3Y.js";
3
+ } from "./chunk-PISCPZK4.js";
4
4
  import {
5
5
  CARTESIA_VERSION,
6
6
  constructApiUrl
@@ -159,56 +159,60 @@ var WebSocket = class extends Client {
159
159
  * @throws {Error} If the WebSocket fails to connect.
160
160
  */
161
161
  connect() {
162
- const url = constructApiUrl(this.baseUrl, "/tts/websocket", {
163
- websocket: true
162
+ return __async(this, null, function* () {
163
+ const emitter = new Emittery();
164
+ this.socket = new PartySocketWebSocket(() => __async(this, null, function* () {
165
+ const url = constructApiUrl(this.baseUrl, "/tts/websocket", {
166
+ websocket: true
167
+ });
168
+ url.searchParams.set("api_key", yield this.apiKey());
169
+ url.searchParams.set("cartesia_version", CARTESIA_VERSION);
170
+ return url.toString();
171
+ }));
172
+ this.socket.onopen = () => {
173
+ __privateSet(this, _isConnected, true);
174
+ emitter.emit("open");
175
+ };
176
+ this.socket.onclose = () => {
177
+ __privateSet(this, _isConnected, false);
178
+ emitter.emit("close");
179
+ };
180
+ return new Promise(
181
+ (resolve, reject) => {
182
+ var _a, _b, _c;
183
+ (_a = this.socket) == null ? void 0 : _a.addEventListener(
184
+ "open",
185
+ () => {
186
+ resolve(getEmitteryCallbacks(emitter));
187
+ },
188
+ {
189
+ once: true
190
+ }
191
+ );
192
+ const aborter = new AbortController();
193
+ (_b = this.socket) == null ? void 0 : _b.addEventListener(
194
+ "error",
195
+ () => {
196
+ aborter.abort();
197
+ reject(new Error("WebSocket failed to connect."));
198
+ },
199
+ {
200
+ signal: aborter.signal
201
+ }
202
+ );
203
+ (_c = this.socket) == null ? void 0 : _c.addEventListener(
204
+ "close",
205
+ () => {
206
+ aborter.abort();
207
+ reject(new Error("WebSocket closed before it could connect."));
208
+ },
209
+ {
210
+ signal: aborter.signal
211
+ }
212
+ );
213
+ }
214
+ );
164
215
  });
165
- url.searchParams.set("api_key", this.apiKey);
166
- url.searchParams.set("cartesia_version", CARTESIA_VERSION);
167
- const emitter = new Emittery();
168
- this.socket = new PartySocketWebSocket(url.toString());
169
- this.socket.onopen = () => {
170
- __privateSet(this, _isConnected, true);
171
- emitter.emit("open");
172
- };
173
- this.socket.onclose = () => {
174
- __privateSet(this, _isConnected, false);
175
- emitter.emit("close");
176
- };
177
- return new Promise(
178
- (resolve, reject) => {
179
- var _a, _b, _c;
180
- (_a = this.socket) == null ? void 0 : _a.addEventListener(
181
- "open",
182
- () => {
183
- resolve(getEmitteryCallbacks(emitter));
184
- },
185
- {
186
- once: true
187
- }
188
- );
189
- const aborter = new AbortController();
190
- (_b = this.socket) == null ? void 0 : _b.addEventListener(
191
- "error",
192
- () => {
193
- aborter.abort();
194
- reject(new Error("WebSocket failed to connect."));
195
- },
196
- {
197
- signal: aborter.signal
198
- }
199
- );
200
- (_c = this.socket) == null ? void 0 : _c.addEventListener(
201
- "close",
202
- () => {
203
- aborter.abort();
204
- reject(new Error("WebSocket closed before it could connect."));
205
- },
206
- {
207
- signal: aborter.signal
208
- }
209
- );
210
- }
211
- );
212
216
  }
213
217
  /**
214
218
  * Disconnect from the Cartesia streaming WebSocket.
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  Voices
3
- } from "./chunk-KUSVZXDT.js";
3
+ } from "./chunk-UCYL2SOX.js";
4
4
  import {
5
5
  TTS
6
- } from "./chunk-2NA5SEML.js";
6
+ } from "./chunk-EDAAHENY.js";
7
7
  import {
8
8
  Client
9
- } from "./chunk-5M33ZF3Y.js";
9
+ } from "./chunk-PISCPZK4.js";
10
10
 
11
11
  // src/lib/index.ts
12
12
  var Cartesia = class extends Client {
@@ -0,0 +1,40 @@
1
+ import {
2
+ BASE_URL,
3
+ CARTESIA_VERSION,
4
+ constructApiUrl
5
+ } from "./chunk-2BFEKY3F.js";
6
+ import {
7
+ __async,
8
+ __spreadProps,
9
+ __spreadValues
10
+ } from "./chunk-GHY2WEOK.js";
11
+
12
+ // src/lib/client.ts
13
+ import fetch from "cross-fetch";
14
+ var Client = class {
15
+ constructor(options = {}) {
16
+ const apiKey = options.apiKey || process.env.CARTESIA_API_KEY;
17
+ if (!apiKey) {
18
+ throw new Error("Missing Cartesia API key.");
19
+ }
20
+ this.apiKey = typeof apiKey === "function" ? apiKey : () => __async(this, null, function* () {
21
+ return apiKey;
22
+ });
23
+ this.baseUrl = options.baseUrl || BASE_URL;
24
+ }
25
+ _fetch(_0) {
26
+ return __async(this, arguments, function* (path, options = {}) {
27
+ const url = constructApiUrl(this.baseUrl, path);
28
+ const headers = new Headers(options.headers);
29
+ headers.set("X-API-Key", yield this.apiKey());
30
+ headers.set("Cartesia-Version", CARTESIA_VERSION);
31
+ return fetch(url.toString(), __spreadProps(__spreadValues({}, options), {
32
+ headers
33
+ }));
34
+ });
35
+ }
36
+ };
37
+
38
+ export {
39
+ Client
40
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Client
3
- } from "./chunk-5M33ZF3Y.js";
3
+ } from "./chunk-PISCPZK4.js";
4
4
  import {
5
5
  __async
6
6
  } from "./chunk-GHY2WEOK.js";
@@ -9,40 +9,43 @@ import {
9
9
  var Voices = class extends Client {
10
10
  list() {
11
11
  return __async(this, null, function* () {
12
- const response = yield this.fetch("/voices");
12
+ const response = yield this._fetch("/voices");
13
13
  return response.json();
14
14
  });
15
15
  }
16
16
  get(voiceId) {
17
17
  return __async(this, null, function* () {
18
- const response = yield this.fetch(`/voices/${voiceId}`);
18
+ const response = yield this._fetch(`/voices/${voiceId}`);
19
19
  return response.json();
20
20
  });
21
21
  }
22
22
  create(voice) {
23
23
  return __async(this, null, function* () {
24
- const response = yield this.fetch("/voices", {
24
+ const response = yield this._fetch("/voices", {
25
25
  method: "POST",
26
26
  body: JSON.stringify(voice)
27
27
  });
28
28
  return response.json();
29
29
  });
30
30
  }
31
+ update(id, voice) {
32
+ return __async(this, null, function* () {
33
+ const response = yield this._fetch(`/voices/${id}`, {
34
+ method: "PATCH",
35
+ body: JSON.stringify(voice)
36
+ });
37
+ return response.json();
38
+ });
39
+ }
31
40
  clone(options) {
32
41
  return __async(this, null, function* () {
33
- if (options.mode === "url") {
34
- const response = yield this.fetch(
35
- `/voices/clone/url?link=${options.link}`,
36
- {
37
- method: "POST"
38
- }
39
- );
40
- return response.json();
41
- }
42
42
  if (options.mode === "clip") {
43
43
  const formData = new FormData();
44
44
  formData.append("clip", options.clip);
45
- const response = yield this.fetch("/voices/clone/clip", {
45
+ if (options.enhance !== void 0) {
46
+ formData.append("enhance", options.enhance.toString());
47
+ }
48
+ const response = yield this._fetch("/voices/clone/clip", {
46
49
  method: "POST",
47
50
  body: formData
48
51
  });
package/dist/index.cjs CHANGED
@@ -126,20 +126,25 @@ var constructApiUrl = (baseUrl, path, { websocket = false } = {}) => {
126
126
  // src/lib/client.ts
127
127
  var Client = class {
128
128
  constructor(options = {}) {
129
- if (!(options.apiKey || process.env.CARTESIA_API_KEY)) {
129
+ const apiKey = options.apiKey || process.env.CARTESIA_API_KEY;
130
+ if (!apiKey) {
130
131
  throw new Error("Missing Cartesia API key.");
131
132
  }
132
- this.apiKey = options.apiKey || process.env.CARTESIA_API_KEY;
133
+ this.apiKey = typeof apiKey === "function" ? apiKey : () => __async(this, null, function* () {
134
+ return apiKey;
135
+ });
133
136
  this.baseUrl = options.baseUrl || BASE_URL;
134
137
  }
135
- fetch(path, options = {}) {
136
- const url = constructApiUrl(this.baseUrl, path);
137
- return (0, import_cross_fetch.default)(url.toString(), __spreadProps(__spreadValues({}, options), {
138
- headers: __spreadValues({
139
- "X-API-Key": this.apiKey,
140
- "Cartesia-Version": CARTESIA_VERSION
141
- }, options.headers)
142
- }));
138
+ _fetch(_0) {
139
+ return __async(this, arguments, function* (path, options = {}) {
140
+ const url = constructApiUrl(this.baseUrl, path);
141
+ const headers = new Headers(options.headers);
142
+ headers.set("X-API-Key", yield this.apiKey());
143
+ headers.set("Cartesia-Version", CARTESIA_VERSION);
144
+ return (0, import_cross_fetch.default)(url.toString(), __spreadProps(__spreadValues({}, options), {
145
+ headers
146
+ }));
147
+ });
143
148
  }
144
149
  };
145
150
 
@@ -495,56 +500,60 @@ var WebSocket = class extends Client {
495
500
  * @throws {Error} If the WebSocket fails to connect.
496
501
  */
497
502
  connect() {
498
- const url = constructApiUrl(this.baseUrl, "/tts/websocket", {
499
- websocket: true
503
+ return __async(this, null, function* () {
504
+ const emitter = new import_emittery2.default();
505
+ this.socket = new import_partysocket.WebSocket(() => __async(this, null, function* () {
506
+ const url = constructApiUrl(this.baseUrl, "/tts/websocket", {
507
+ websocket: true
508
+ });
509
+ url.searchParams.set("api_key", yield this.apiKey());
510
+ url.searchParams.set("cartesia_version", CARTESIA_VERSION);
511
+ return url.toString();
512
+ }));
513
+ this.socket.onopen = () => {
514
+ __privateSet(this, _isConnected, true);
515
+ emitter.emit("open");
516
+ };
517
+ this.socket.onclose = () => {
518
+ __privateSet(this, _isConnected, false);
519
+ emitter.emit("close");
520
+ };
521
+ return new Promise(
522
+ (resolve, reject) => {
523
+ var _a, _b, _c;
524
+ (_a = this.socket) == null ? void 0 : _a.addEventListener(
525
+ "open",
526
+ () => {
527
+ resolve(getEmitteryCallbacks(emitter));
528
+ },
529
+ {
530
+ once: true
531
+ }
532
+ );
533
+ const aborter = new AbortController();
534
+ (_b = this.socket) == null ? void 0 : _b.addEventListener(
535
+ "error",
536
+ () => {
537
+ aborter.abort();
538
+ reject(new Error("WebSocket failed to connect."));
539
+ },
540
+ {
541
+ signal: aborter.signal
542
+ }
543
+ );
544
+ (_c = this.socket) == null ? void 0 : _c.addEventListener(
545
+ "close",
546
+ () => {
547
+ aborter.abort();
548
+ reject(new Error("WebSocket closed before it could connect."));
549
+ },
550
+ {
551
+ signal: aborter.signal
552
+ }
553
+ );
554
+ }
555
+ );
500
556
  });
501
- url.searchParams.set("api_key", this.apiKey);
502
- url.searchParams.set("cartesia_version", CARTESIA_VERSION);
503
- const emitter = new import_emittery2.default();
504
- this.socket = new import_partysocket.WebSocket(url.toString());
505
- this.socket.onopen = () => {
506
- __privateSet(this, _isConnected, true);
507
- emitter.emit("open");
508
- };
509
- this.socket.onclose = () => {
510
- __privateSet(this, _isConnected, false);
511
- emitter.emit("close");
512
- };
513
- return new Promise(
514
- (resolve, reject) => {
515
- var _a, _b, _c;
516
- (_a = this.socket) == null ? void 0 : _a.addEventListener(
517
- "open",
518
- () => {
519
- resolve(getEmitteryCallbacks(emitter));
520
- },
521
- {
522
- once: true
523
- }
524
- );
525
- const aborter = new AbortController();
526
- (_b = this.socket) == null ? void 0 : _b.addEventListener(
527
- "error",
528
- () => {
529
- aborter.abort();
530
- reject(new Error("WebSocket failed to connect."));
531
- },
532
- {
533
- signal: aborter.signal
534
- }
535
- );
536
- (_c = this.socket) == null ? void 0 : _c.addEventListener(
537
- "close",
538
- () => {
539
- aborter.abort();
540
- reject(new Error("WebSocket closed before it could connect."));
541
- },
542
- {
543
- signal: aborter.signal
544
- }
545
- );
546
- }
547
- );
548
557
  }
549
558
  /**
550
559
  * Disconnect from the Cartesia streaming WebSocket.
@@ -585,40 +594,43 @@ var TTS = class extends Client {
585
594
  var Voices = class extends Client {
586
595
  list() {
587
596
  return __async(this, null, function* () {
588
- const response = yield this.fetch("/voices");
597
+ const response = yield this._fetch("/voices");
589
598
  return response.json();
590
599
  });
591
600
  }
592
601
  get(voiceId) {
593
602
  return __async(this, null, function* () {
594
- const response = yield this.fetch(`/voices/${voiceId}`);
603
+ const response = yield this._fetch(`/voices/${voiceId}`);
595
604
  return response.json();
596
605
  });
597
606
  }
598
607
  create(voice) {
599
608
  return __async(this, null, function* () {
600
- const response = yield this.fetch("/voices", {
609
+ const response = yield this._fetch("/voices", {
601
610
  method: "POST",
602
611
  body: JSON.stringify(voice)
603
612
  });
604
613
  return response.json();
605
614
  });
606
615
  }
616
+ update(id, voice) {
617
+ return __async(this, null, function* () {
618
+ const response = yield this._fetch(`/voices/${id}`, {
619
+ method: "PATCH",
620
+ body: JSON.stringify(voice)
621
+ });
622
+ return response.json();
623
+ });
624
+ }
607
625
  clone(options) {
608
626
  return __async(this, null, function* () {
609
- if (options.mode === "url") {
610
- const response = yield this.fetch(
611
- `/voices/clone/url?link=${options.link}`,
612
- {
613
- method: "POST"
614
- }
615
- );
616
- return response.json();
617
- }
618
627
  if (options.mode === "clip") {
619
628
  const formData = new FormData();
620
629
  formData.append("clip", options.clip);
621
- const response = yield this.fetch("/voices/clone/clip", {
630
+ if (options.enhance !== void 0) {
631
+ formData.append("enhance", options.enhance.toString());
632
+ }
633
+ const response = yield this._fetch("/voices/clone/clip", {
622
634
  method: "POST",
623
635
  body: formData
624
636
  });
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { Cartesia, Cartesia as default } from './lib/index.cjs';
2
- export { Chunk, ClientOptions, CloneOptions, CloneResponse, ConnectionEventData, CreateVoice, EmitteryCallbacks, Emotion, EmotionControl, Encoding, Intensity, Sentinel, SourceEventData, StreamOptions, StreamRequest, TypedArray, Voice, VoiceOptions, VoiceSpecifier, WebSocketBaseResponse, WebSocketChunkResponse, WebSocketErrorResponse, WebSocketOptions, WebSocketResponse, WebSocketTimestampsResponse, WordTimestamps } from './types/index.cjs';
2
+ export { Chunk, ClientOptions, CloneOptions, CloneResponse, ConnectionEventData, CreateVoice, EmitteryCallbacks, Emotion, EmotionControl, Encoding, Intensity, Sentinel, SourceEventData, StreamOptions, StreamRequest, TypedArray, UpdateVoice, Voice, VoiceOptions, VoiceSpecifier, WebSocketBaseResponse, WebSocketChunkResponse, WebSocketErrorResponse, WebSocketOptions, WebSocketResponse, WebSocketTimestampsResponse, WordTimestamps } from './types/index.cjs';
3
3
  export { default as WebPlayer } from './tts/player.cjs';
4
4
  export { default as Source } from './tts/source.cjs';
5
5
  export { default as WebSocket } from './tts/websocket.cjs';
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { Cartesia, Cartesia as default } from './lib/index.js';
2
- export { Chunk, ClientOptions, CloneOptions, CloneResponse, ConnectionEventData, CreateVoice, EmitteryCallbacks, Emotion, EmotionControl, Encoding, Intensity, Sentinel, SourceEventData, StreamOptions, StreamRequest, TypedArray, Voice, VoiceOptions, VoiceSpecifier, WebSocketBaseResponse, WebSocketChunkResponse, WebSocketErrorResponse, WebSocketOptions, WebSocketResponse, WebSocketTimestampsResponse, WordTimestamps } from './types/index.js';
2
+ export { Chunk, ClientOptions, CloneOptions, CloneResponse, ConnectionEventData, CreateVoice, EmitteryCallbacks, Emotion, EmotionControl, Encoding, Intensity, Sentinel, SourceEventData, StreamOptions, StreamRequest, TypedArray, UpdateVoice, Voice, VoiceOptions, VoiceSpecifier, WebSocketBaseResponse, WebSocketChunkResponse, WebSocketErrorResponse, WebSocketOptions, WebSocketResponse, WebSocketTimestampsResponse, WordTimestamps } from './types/index.js';
3
3
  export { default as WebPlayer } from './tts/player.js';
4
4
  export { default as Source } from './tts/source.js';
5
5
  export { default as WebSocket } from './tts/websocket.js';
package/dist/index.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import "./chunk-FXPGR372.js";
2
2
  import {
3
3
  Cartesia
4
- } from "./chunk-OFH3ML4L.js";
5
- import "./chunk-KUSVZXDT.js";
6
- import "./chunk-2NA5SEML.js";
4
+ } from "./chunk-NVOCUUOF.js";
5
+ import "./chunk-UCYL2SOX.js";
6
+ import "./chunk-EDAAHENY.js";
7
7
  import {
8
8
  WebSocket
9
- } from "./chunk-ASZKHN7Q.js";
10
- import "./chunk-5M33ZF3Y.js";
9
+ } from "./chunk-IZBPLCGW.js";
10
+ import "./chunk-PISCPZK4.js";
11
11
  import "./chunk-2BFEKY3F.js";
12
12
  import {
13
13
  Player