@cartesia/cartesia-js 2.2.5 → 2.2.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/Client.d.ts +3 -0
- package/Client.js +11 -6
- package/README.md +469 -144
- package/api/resources/apiStatus/client/Client.js +1 -1
- package/api/resources/auth/client/Client.d.ts +17 -0
- package/api/resources/auth/client/Client.js +18 -1
- package/api/resources/auth/types/TokenGrant.d.ts +3 -1
- package/api/resources/auth/types/TokenRequest.d.ts +2 -2
- package/api/resources/index.d.ts +1 -0
- package/api/resources/index.js +1 -0
- package/api/resources/infill/client/Client.js +1 -1
- package/api/resources/infill/client/requests/InfillBytesRequest.d.ts +3 -11
- package/api/resources/stt/client/Client.d.ts +43 -0
- package/api/resources/stt/client/Client.js +108 -0
- package/api/resources/stt/client/index.d.ts +1 -1
- package/api/resources/stt/client/index.js +15 -3
- package/api/resources/stt/client/requests/TranscriptionRequest.d.ts +147 -0
- package/api/resources/stt/client/requests/TranscriptionRequest.js +5 -0
- package/api/resources/stt/client/requests/index.d.ts +1 -0
- package/api/resources/stt/client/requests/index.js +2 -0
- package/api/resources/stt/index.d.ts +1 -0
- package/api/resources/stt/index.js +1 -0
- package/api/resources/stt/types/TimestampGranularity.d.ts +12 -0
- package/api/resources/stt/types/TimestampGranularity.js +9 -0
- package/api/resources/stt/types/TranscriptMessage.d.ts +1 -1
- package/api/resources/stt/types/TranscriptionResponse.d.ts +2 -2
- package/api/resources/stt/types/index.d.ts +1 -0
- package/api/resources/stt/types/index.js +1 -0
- package/api/resources/tts/client/Client.d.ts +7 -2
- package/api/resources/tts/client/Client.js +8 -8
- package/api/resources/tts/types/Controls.d.ts +1 -1
- package/api/resources/tts/types/Emotion.d.ts +2 -33
- package/api/resources/tts/types/Emotion.js +0 -28
- package/api/resources/tts/types/EmotionDeprecated.d.ts +38 -0
- package/api/resources/tts/types/EmotionDeprecated.js +33 -0
- package/api/resources/tts/types/GenerationConfig.d.ts +15 -0
- package/api/resources/tts/types/GenerationConfig.js +5 -0
- package/api/resources/tts/types/GenerationRequest.d.ts +5 -4
- package/api/resources/tts/types/Mp3OutputFormat.d.ts +1 -0
- package/api/resources/tts/types/RawOutputFormat.d.ts +1 -0
- package/api/resources/tts/types/SseOutputFormat.d.ts +10 -0
- package/api/resources/tts/types/SseOutputFormat.js +5 -0
- package/api/resources/tts/types/TtsRequest.d.ts +1 -0
- package/api/resources/tts/types/TtssseRequest.d.ts +27 -0
- package/api/resources/tts/types/TtssseRequest.js +5 -0
- package/api/resources/tts/types/WebSocketRawOutputFormat.d.ts +1 -0
- package/api/resources/tts/types/WebSocketRequest.d.ts +2 -4
- package/api/resources/tts/types/WebSocketTtsRequest.d.ts +4 -1
- package/api/resources/tts/types/index.d.ts +5 -1
- package/api/resources/tts/types/index.js +5 -1
- package/api/resources/voiceChanger/client/Client.d.ts +9 -4
- package/api/resources/voiceChanger/client/Client.js +24 -20
- package/api/resources/voiceChanger/client/requests/VoiceChangerBytesRequest.d.ts +3 -8
- package/api/resources/voiceChanger/client/requests/VoiceChangerSseRequest.d.ts +3 -8
- package/api/resources/voices/client/Client.js +8 -8
- package/api/resources/voices/client/requests/CloneVoiceRequest.d.ts +6 -24
- package/api/resources/voices/types/LocalizeDialect.d.ts +4 -8
- package/core/fetcher/Fetcher.d.ts +2 -2
- package/core/fetcher/Fetcher.js +4 -3
- package/core/fetcher/getResponseBody.js +3 -3
- 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/auth/client/Client.d.ts +17 -0
- package/dist/api/resources/auth/client/Client.js +18 -1
- package/dist/api/resources/auth/types/TokenGrant.d.ts +3 -1
- package/dist/api/resources/auth/types/TokenRequest.d.ts +2 -2
- package/dist/api/resources/index.d.ts +1 -0
- package/dist/api/resources/index.js +1 -0
- package/dist/api/resources/infill/client/Client.js +1 -1
- package/dist/api/resources/infill/client/requests/InfillBytesRequest.d.ts +3 -11
- package/dist/api/resources/stt/client/Client.d.ts +43 -0
- package/dist/api/resources/stt/client/Client.js +108 -0
- package/dist/api/resources/stt/client/index.d.ts +1 -1
- package/dist/api/resources/stt/client/index.js +15 -3
- package/dist/api/resources/stt/client/requests/TranscriptionRequest.d.ts +147 -0
- package/dist/api/resources/stt/client/requests/TranscriptionRequest.js +5 -0
- package/dist/api/resources/stt/client/requests/index.d.ts +1 -0
- package/dist/api/resources/stt/client/requests/index.js +2 -0
- package/dist/api/resources/stt/index.d.ts +1 -0
- package/dist/api/resources/stt/index.js +1 -0
- package/dist/api/resources/stt/types/TimestampGranularity.d.ts +12 -0
- package/dist/api/resources/stt/types/TimestampGranularity.js +9 -0
- package/dist/api/resources/stt/types/TranscriptMessage.d.ts +1 -1
- package/dist/api/resources/stt/types/TranscriptionResponse.d.ts +2 -2
- package/dist/api/resources/stt/types/index.d.ts +1 -0
- package/dist/api/resources/stt/types/index.js +1 -0
- package/dist/api/resources/tts/client/Client.d.ts +7 -2
- package/dist/api/resources/tts/client/Client.js +8 -8
- package/dist/api/resources/tts/types/Controls.d.ts +1 -1
- package/dist/api/resources/tts/types/Emotion.d.ts +2 -33
- package/dist/api/resources/tts/types/Emotion.js +0 -28
- package/dist/api/resources/tts/types/EmotionDeprecated.d.ts +38 -0
- package/dist/api/resources/tts/types/EmotionDeprecated.js +33 -0
- package/dist/api/resources/tts/types/GenerationConfig.d.ts +15 -0
- package/dist/api/resources/tts/types/GenerationConfig.js +5 -0
- package/dist/api/resources/tts/types/GenerationRequest.d.ts +5 -4
- package/dist/api/resources/tts/types/Mp3OutputFormat.d.ts +1 -0
- package/dist/api/resources/tts/types/RawOutputFormat.d.ts +1 -0
- package/dist/api/resources/tts/types/SseOutputFormat.d.ts +10 -0
- package/dist/api/resources/tts/types/SseOutputFormat.js +5 -0
- package/dist/api/resources/tts/types/TtsRequest.d.ts +1 -0
- package/dist/api/resources/tts/types/TtssseRequest.d.ts +27 -0
- package/dist/api/resources/tts/types/TtssseRequest.js +5 -0
- package/dist/api/resources/tts/types/WebSocketRawOutputFormat.d.ts +1 -0
- package/dist/api/resources/tts/types/WebSocketRequest.d.ts +2 -4
- package/dist/api/resources/tts/types/WebSocketTtsRequest.d.ts +4 -1
- package/dist/api/resources/tts/types/index.d.ts +5 -1
- package/dist/api/resources/tts/types/index.js +5 -1
- package/dist/api/resources/voiceChanger/client/Client.d.ts +9 -4
- package/dist/api/resources/voiceChanger/client/Client.js +24 -20
- package/dist/api/resources/voiceChanger/client/requests/VoiceChangerBytesRequest.d.ts +3 -8
- package/dist/api/resources/voiceChanger/client/requests/VoiceChangerSseRequest.d.ts +3 -8
- package/dist/api/resources/voices/client/Client.js +8 -8
- package/dist/api/resources/voices/client/requests/CloneVoiceRequest.d.ts +6 -24
- package/dist/api/resources/voices/types/LocalizeDialect.d.ts +4 -8
- package/dist/core/fetcher/Fetcher.d.ts +2 -2
- package/dist/core/fetcher/Fetcher.js +4 -3
- package/dist/core/fetcher/getResponseBody.js +3 -3
- package/dist/index.d.ts +2 -0
- package/dist/index.js +8 -1
- package/dist/serialization/resources/auth/types/TokenGrant.d.ts +2 -1
- package/dist/serialization/resources/auth/types/TokenGrant.js +2 -1
- package/dist/serialization/resources/auth/types/TokenRequest.d.ts +1 -1
- package/dist/serialization/resources/auth/types/TokenRequest.js +1 -1
- package/dist/serialization/resources/stt/types/TimestampGranularity.d.ts +10 -0
- package/dist/serialization/resources/stt/types/TimestampGranularity.js +41 -0
- package/dist/serialization/resources/stt/types/index.d.ts +1 -0
- package/dist/serialization/resources/stt/types/index.js +1 -0
- package/dist/serialization/resources/tts/types/Controls.d.ts +2 -2
- package/dist/serialization/resources/tts/types/Controls.js +2 -2
- package/dist/serialization/resources/tts/types/Emotion.d.ts +1 -1
- package/dist/serialization/resources/tts/types/Emotion.js +1 -27
- package/dist/serialization/resources/tts/types/EmotionDeprecated.d.ts +10 -0
- package/dist/serialization/resources/tts/types/EmotionDeprecated.js +67 -0
- package/dist/serialization/resources/tts/types/GenerationConfig.d.ts +15 -0
- package/dist/serialization/resources/tts/types/GenerationConfig.js +46 -0
- package/dist/serialization/resources/tts/types/GenerationRequest.d.ts +3 -1
- package/dist/serialization/resources/tts/types/GenerationRequest.js +3 -1
- package/dist/serialization/resources/tts/types/SseOutputFormat.d.ts +15 -0
- package/dist/serialization/resources/tts/types/SseOutputFormat.js +46 -0
- package/dist/serialization/resources/tts/types/TtsRequest.d.ts +2 -0
- package/dist/serialization/resources/tts/types/TtsRequest.js +2 -0
- package/dist/serialization/resources/tts/types/TtssseRequest.d.ts +29 -0
- package/dist/serialization/resources/tts/types/TtssseRequest.js +60 -0
- package/dist/serialization/resources/tts/types/WebSocketTtsRequest.d.ts +3 -1
- package/dist/serialization/resources/tts/types/WebSocketTtsRequest.js +3 -1
- package/dist/serialization/resources/tts/types/index.d.ts +5 -1
- package/dist/serialization/resources/tts/types/index.js +5 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/wrapper/StreamingSTTClient.d.ts +22 -2
- package/dist/wrapper/StreamingSTTClient.js +124 -1
- package/dist/wrapper/SttWebsocket.d.ts +8 -3
- package/dist/wrapper/SttWebsocket.js +24 -3
- package/dist/wrapper/Websocket.js +1 -1
- package/index.d.ts +2 -0
- package/index.js +8 -1
- package/package.json +1 -1
- package/reference.md +89 -1
- package/serialization/resources/auth/types/TokenGrant.d.ts +2 -1
- package/serialization/resources/auth/types/TokenGrant.js +2 -1
- package/serialization/resources/auth/types/TokenRequest.d.ts +1 -1
- package/serialization/resources/auth/types/TokenRequest.js +1 -1
- package/serialization/resources/stt/types/TimestampGranularity.d.ts +10 -0
- package/serialization/resources/stt/types/TimestampGranularity.js +41 -0
- package/serialization/resources/stt/types/index.d.ts +1 -0
- package/serialization/resources/stt/types/index.js +1 -0
- package/serialization/resources/tts/types/Controls.d.ts +2 -2
- package/serialization/resources/tts/types/Controls.js +2 -2
- package/serialization/resources/tts/types/Emotion.d.ts +1 -1
- package/serialization/resources/tts/types/Emotion.js +1 -27
- package/serialization/resources/tts/types/EmotionDeprecated.d.ts +10 -0
- package/serialization/resources/tts/types/EmotionDeprecated.js +67 -0
- package/serialization/resources/tts/types/GenerationConfig.d.ts +15 -0
- package/serialization/resources/tts/types/GenerationConfig.js +46 -0
- package/serialization/resources/tts/types/GenerationRequest.d.ts +3 -1
- package/serialization/resources/tts/types/GenerationRequest.js +3 -1
- package/serialization/resources/tts/types/SseOutputFormat.d.ts +15 -0
- package/serialization/resources/tts/types/SseOutputFormat.js +46 -0
- package/serialization/resources/tts/types/TtsRequest.d.ts +2 -0
- package/serialization/resources/tts/types/TtsRequest.js +2 -0
- package/serialization/resources/tts/types/TtssseRequest.d.ts +29 -0
- package/serialization/resources/tts/types/TtssseRequest.js +60 -0
- package/serialization/resources/tts/types/WebSocketTtsRequest.d.ts +3 -1
- package/serialization/resources/tts/types/WebSocketTtsRequest.js +3 -1
- package/serialization/resources/tts/types/index.d.ts +5 -1
- package/serialization/resources/tts/types/index.js +5 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/wrapper/StreamingSTTClient.d.ts +22 -2
- package/wrapper/StreamingSTTClient.js +124 -1
- package/wrapper/SttWebsocket.d.ts +8 -3
- package/wrapper/SttWebsocket.js +24 -3
- package/wrapper/Websocket.js +1 -1
package/Client.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import * as core from "./core";
|
|
|
6
6
|
import { ApiStatus } from "./api/resources/apiStatus/client/Client";
|
|
7
7
|
import { Auth } from "./api/resources/auth/client/Client";
|
|
8
8
|
import { Infill } from "./api/resources/infill/client/Client";
|
|
9
|
+
import { Stt } from "./api/resources/stt/client/Client";
|
|
9
10
|
import { Tts } from "./api/resources/tts/client/Client";
|
|
10
11
|
import { VoiceChanger } from "./api/resources/voiceChanger/client/Client";
|
|
11
12
|
import { Voices } from "./api/resources/voices/client/Client";
|
|
@@ -37,6 +38,7 @@ export declare class CartesiaClient {
|
|
|
37
38
|
protected _apiStatus: ApiStatus | undefined;
|
|
38
39
|
protected _auth: Auth | undefined;
|
|
39
40
|
protected _infill: Infill | undefined;
|
|
41
|
+
protected _stt: Stt | undefined;
|
|
40
42
|
protected _tts: Tts | undefined;
|
|
41
43
|
protected _voiceChanger: VoiceChanger | undefined;
|
|
42
44
|
protected _voices: Voices | undefined;
|
|
@@ -44,6 +46,7 @@ export declare class CartesiaClient {
|
|
|
44
46
|
get apiStatus(): ApiStatus;
|
|
45
47
|
get auth(): Auth;
|
|
46
48
|
get infill(): Infill;
|
|
49
|
+
get stt(): Stt;
|
|
47
50
|
get tts(): Tts;
|
|
48
51
|
get voiceChanger(): VoiceChanger;
|
|
49
52
|
get voices(): Voices;
|
package/Client.js
CHANGED
|
@@ -7,9 +7,10 @@ exports.CartesiaClient = void 0;
|
|
|
7
7
|
const Client_1 = require("./api/resources/apiStatus/client/Client");
|
|
8
8
|
const Client_2 = require("./api/resources/auth/client/Client");
|
|
9
9
|
const Client_3 = require("./api/resources/infill/client/Client");
|
|
10
|
-
const Client_4 = require("./api/resources/
|
|
11
|
-
const Client_5 = require("./api/resources/
|
|
12
|
-
const Client_6 = require("./api/resources/
|
|
10
|
+
const Client_4 = require("./api/resources/stt/client/Client");
|
|
11
|
+
const Client_5 = require("./api/resources/tts/client/Client");
|
|
12
|
+
const Client_6 = require("./api/resources/voiceChanger/client/Client");
|
|
13
|
+
const Client_7 = require("./api/resources/voices/client/Client");
|
|
13
14
|
class CartesiaClient {
|
|
14
15
|
constructor(_options = {}) {
|
|
15
16
|
this._options = _options;
|
|
@@ -26,17 +27,21 @@ class CartesiaClient {
|
|
|
26
27
|
var _a;
|
|
27
28
|
return ((_a = this._infill) !== null && _a !== void 0 ? _a : (this._infill = new Client_3.Infill(this._options)));
|
|
28
29
|
}
|
|
30
|
+
get stt() {
|
|
31
|
+
var _a;
|
|
32
|
+
return ((_a = this._stt) !== null && _a !== void 0 ? _a : (this._stt = new Client_4.Stt(this._options)));
|
|
33
|
+
}
|
|
29
34
|
get tts() {
|
|
30
35
|
var _a;
|
|
31
|
-
return ((_a = this._tts) !== null && _a !== void 0 ? _a : (this._tts = new
|
|
36
|
+
return ((_a = this._tts) !== null && _a !== void 0 ? _a : (this._tts = new Client_5.Tts(this._options)));
|
|
32
37
|
}
|
|
33
38
|
get voiceChanger() {
|
|
34
39
|
var _a;
|
|
35
|
-
return ((_a = this._voiceChanger) !== null && _a !== void 0 ? _a : (this._voiceChanger = new
|
|
40
|
+
return ((_a = this._voiceChanger) !== null && _a !== void 0 ? _a : (this._voiceChanger = new Client_6.VoiceChanger(this._options)));
|
|
36
41
|
}
|
|
37
42
|
get voices() {
|
|
38
43
|
var _a;
|
|
39
|
-
return ((_a = this._voices) !== null && _a !== void 0 ? _a : (this._voices = new
|
|
44
|
+
return ((_a = this._voices) !== null && _a !== void 0 ? _a : (this._voices = new Client_7.Voices(this._options)));
|
|
40
45
|
}
|
|
41
46
|
}
|
|
42
47
|
exports.CartesiaClient = CartesiaClient;
|