sarvamai 0.1.7 → 0.1.8-a.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.
- package/README.md +1 -1
- package/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/index.d.ts +1 -0
- package/dist/cjs/api/resources/index.js +1 -0
- package/dist/cjs/api/resources/speechToTextStreaming/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/speechToTextStreaming/types/SpeechToTextStreamingFlushSignal.d.ts +11 -0
- package/dist/cjs/api/resources/speechToTextStreaming/types/{SpeechToTextStreamingModel.js → SpeechToTextStreamingFlushSignal.js} +4 -4
- package/dist/cjs/api/resources/speechToTextStreaming/types/SpeechToTextStreamingInputAudioCodec.d.ts +33 -0
- package/dist/cjs/api/resources/speechToTextStreaming/types/SpeechToTextStreamingInputAudioCodec.js +32 -0
- package/dist/cjs/api/resources/speechToTextStreaming/types/index.d.ts +2 -1
- package/dist/cjs/api/resources/speechToTextStreaming/types/index.js +2 -1
- package/dist/cjs/api/resources/speechToTextTranslateStreaming/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/speechToTextTranslateStreaming/types/SpeechToTextTranslateStreamingFlushSignal.d.ts +11 -0
- package/dist/cjs/api/resources/speechToTextTranslateStreaming/types/SpeechToTextTranslateStreamingFlushSignal.js +10 -0
- package/dist/cjs/api/resources/speechToTextTranslateStreaming/types/SpeechToTextTranslateStreamingInputAudioCodec.d.ts +33 -0
- package/dist/cjs/api/resources/speechToTextTranslateStreaming/types/SpeechToTextTranslateStreamingInputAudioCodec.js +32 -0
- package/dist/cjs/api/resources/speechToTextTranslateStreaming/types/index.d.ts +2 -1
- package/dist/cjs/api/resources/speechToTextTranslateStreaming/types/index.js +2 -1
- package/dist/cjs/api/resources/textToSpeechStreaming/index.d.ts +1 -0
- package/dist/cjs/api/resources/textToSpeechStreaming/index.js +1 -0
- package/dist/cjs/api/resources/textToSpeechStreaming/types/TextToSpeechStreamingSendCompletionEvent.d.ts +11 -0
- package/dist/cjs/api/resources/textToSpeechStreaming/types/TextToSpeechStreamingSendCompletionEvent.js +10 -0
- package/dist/cjs/api/resources/textToSpeechStreaming/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/textToSpeechStreaming/types/index.js +17 -0
- package/dist/cjs/api/types/AudioOutput.d.ts +2 -0
- package/dist/cjs/api/types/CompletionEventFlag.d.ts +11 -0
- package/dist/cjs/api/types/CompletionEventFlag.js +10 -0
- package/dist/cjs/api/types/ConfigMessage.d.ts +1 -1
- package/dist/cjs/api/types/ConnectionSampleRate.d.ts +7 -0
- package/dist/cjs/api/types/ConnectionSampleRate.js +5 -0
- package/dist/cjs/api/types/ErrorResponse.d.ts +2 -0
- package/dist/cjs/api/types/EventResponse.d.ts +21 -0
- package/dist/cjs/api/types/EventResponse.js +5 -0
- package/dist/cjs/api/types/SpeechToTextModel.d.ts +1 -7
- package/dist/cjs/api/types/SpeechToTextModel.js +0 -7
- package/dist/cjs/api/types/SpeechToTextTranslateModel.d.ts +1 -7
- package/dist/cjs/api/types/SpeechToTextTranslateModel.js +0 -7
- package/dist/cjs/api/types/SttFlushSignal.d.ts +10 -0
- package/dist/cjs/api/types/SttFlushSignal.js +5 -0
- package/dist/cjs/api/types/index.d.ts +5 -1
- package/dist/cjs/api/types/index.js +5 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/index.d.mts +1 -0
- package/dist/esm/api/resources/index.mjs +1 -0
- package/dist/esm/api/resources/speechToTextStreaming/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/speechToTextStreaming/types/SpeechToTextStreamingFlushSignal.d.mts +11 -0
- package/dist/esm/api/resources/speechToTextStreaming/types/SpeechToTextStreamingFlushSignal.mjs +7 -0
- package/dist/esm/api/resources/speechToTextStreaming/types/SpeechToTextStreamingInputAudioCodec.d.mts +33 -0
- package/dist/esm/api/resources/speechToTextStreaming/types/SpeechToTextStreamingInputAudioCodec.mjs +29 -0
- package/dist/esm/api/resources/speechToTextStreaming/types/index.d.mts +2 -1
- package/dist/esm/api/resources/speechToTextStreaming/types/index.mjs +2 -1
- package/dist/esm/api/resources/speechToTextTranslateStreaming/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/speechToTextTranslateStreaming/types/SpeechToTextTranslateStreamingFlushSignal.d.mts +11 -0
- package/dist/esm/api/resources/speechToTextTranslateStreaming/types/SpeechToTextTranslateStreamingFlushSignal.mjs +7 -0
- package/dist/esm/api/resources/speechToTextTranslateStreaming/types/SpeechToTextTranslateStreamingInputAudioCodec.d.mts +33 -0
- package/dist/esm/api/resources/speechToTextTranslateStreaming/types/SpeechToTextTranslateStreamingInputAudioCodec.mjs +29 -0
- package/dist/esm/api/resources/speechToTextTranslateStreaming/types/index.d.mts +2 -1
- package/dist/esm/api/resources/speechToTextTranslateStreaming/types/index.mjs +2 -1
- package/dist/esm/api/resources/textToSpeechStreaming/index.d.mts +1 -0
- package/dist/esm/api/resources/textToSpeechStreaming/index.mjs +1 -0
- package/dist/esm/api/resources/textToSpeechStreaming/types/TextToSpeechStreamingSendCompletionEvent.d.mts +11 -0
- package/dist/esm/api/resources/textToSpeechStreaming/types/TextToSpeechStreamingSendCompletionEvent.mjs +7 -0
- package/dist/esm/api/resources/textToSpeechStreaming/types/index.d.mts +1 -0
- package/dist/esm/api/resources/textToSpeechStreaming/types/index.mjs +1 -0
- package/dist/esm/api/types/AudioOutput.d.mts +2 -0
- package/dist/esm/api/types/CompletionEventFlag.d.mts +11 -0
- package/dist/esm/api/types/CompletionEventFlag.mjs +7 -0
- package/dist/esm/api/types/ConfigMessage.d.mts +1 -1
- package/dist/esm/api/types/ConnectionSampleRate.d.mts +7 -0
- package/dist/esm/api/types/ConnectionSampleRate.mjs +4 -0
- package/dist/esm/api/types/ErrorResponse.d.mts +2 -0
- package/dist/esm/api/types/EventResponse.d.mts +21 -0
- package/dist/esm/api/types/EventResponse.mjs +4 -0
- package/dist/esm/api/types/SpeechToTextModel.d.mts +1 -7
- package/dist/esm/api/types/SpeechToTextModel.mjs +1 -6
- package/dist/esm/api/types/SpeechToTextTranslateModel.d.mts +1 -7
- package/dist/esm/api/types/SpeechToTextTranslateModel.mjs +1 -6
- package/dist/esm/api/types/SttFlushSignal.d.mts +10 -0
- package/dist/esm/api/types/SttFlushSignal.mjs +4 -0
- package/dist/esm/api/types/index.d.mts +5 -1
- package/dist/esm/api/types/index.mjs +5 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/dist/cjs/api/resources/speechToTextStreaming/types/SpeechToTextStreamingModel.d.ts +0 -11
- package/dist/cjs/api/resources/speechToTextTranslateStreaming/types/SpeechToTextTranslateStreamingModel.d.ts +0 -11
- package/dist/cjs/api/resources/speechToTextTranslateStreaming/types/SpeechToTextTranslateStreamingModel.js +0 -10
- package/dist/esm/api/resources/speechToTextStreaming/types/SpeechToTextStreamingModel.d.mts +0 -11
- package/dist/esm/api/resources/speechToTextStreaming/types/SpeechToTextStreamingModel.mjs +0 -7
- package/dist/esm/api/resources/speechToTextTranslateStreaming/types/SpeechToTextTranslateStreamingModel.d.mts +0 -11
- package/dist/esm/api/resources/speechToTextTranslateStreaming/types/SpeechToTextTranslateStreamingModel.mjs +0 -7
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2Fsarvamai%2Fsarvam-javascript-sdk)
|
|
4
4
|
[](https://www.npmjs.com/package/sarvamai)
|
|
5
5
|
|
|
6
|
-
The Sarvam TypeScript library provides convenient access to the Sarvam
|
|
6
|
+
The Sarvam TypeScript library provides convenient access to the Sarvam APIs from TypeScript.
|
|
7
7
|
|
|
8
8
|
## Documentation
|
|
9
9
|
|
package/dist/cjs/Client.js
CHANGED
|
@@ -53,8 +53,8 @@ class SarvamAIClient {
|
|
|
53
53
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
54
54
|
"X-Fern-Language": "JavaScript",
|
|
55
55
|
"X-Fern-SDK-Name": "sarvamai",
|
|
56
|
-
"X-Fern-SDK-Version": "0.1.
|
|
57
|
-
"User-Agent": "sarvamai/0.1.
|
|
56
|
+
"X-Fern-SDK-Version": "0.1.8-a.2",
|
|
57
|
+
"User-Agent": "sarvamai/0.1.8-a.2",
|
|
58
58
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
59
59
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
60
60
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -3,6 +3,7 @@ export * from "./speechToTextStreaming/types/index.js";
|
|
|
3
3
|
export * as speechToTextTranslateStreaming from "./speechToTextTranslateStreaming/index.js";
|
|
4
4
|
export * from "./speechToTextTranslateStreaming/types/index.js";
|
|
5
5
|
export * as textToSpeechStreaming from "./textToSpeechStreaming/index.js";
|
|
6
|
+
export * from "./textToSpeechStreaming/types/index.js";
|
|
6
7
|
export * as text from "./text/index.js";
|
|
7
8
|
export * as speechToText from "./speechToText/index.js";
|
|
8
9
|
export * as textToSpeech from "./textToSpeech/index.js";
|
|
@@ -42,6 +42,7 @@ __exportStar(require("./speechToTextStreaming/types/index.js"), exports);
|
|
|
42
42
|
exports.speechToTextTranslateStreaming = __importStar(require("./speechToTextTranslateStreaming/index.js"));
|
|
43
43
|
__exportStar(require("./speechToTextTranslateStreaming/types/index.js"), exports);
|
|
44
44
|
exports.textToSpeechStreaming = __importStar(require("./textToSpeechStreaming/index.js"));
|
|
45
|
+
__exportStar(require("./textToSpeechStreaming/types/index.js"), exports);
|
|
45
46
|
exports.text = __importStar(require("./text/index.js"));
|
|
46
47
|
exports.speechToText = __importStar(require("./speechToText/index.js"));
|
|
47
48
|
exports.textToSpeech = __importStar(require("./textToSpeech/index.js"));
|
|
@@ -16,7 +16,7 @@ export declare namespace SpeechToTextStreaming {
|
|
|
16
16
|
}
|
|
17
17
|
interface ConnectArgs {
|
|
18
18
|
"language-code"?: SarvamAI.SpeechToTextStreamingLanguageCode;
|
|
19
|
-
model?: SarvamAI.
|
|
19
|
+
model?: SarvamAI.SpeechToTextModel | undefined;
|
|
20
20
|
high_vad_sensitivity?: SarvamAI.SpeechToTextStreamingHighVadSensitivity | undefined;
|
|
21
21
|
vad_signals?: SarvamAI.SpeechToTextStreamingVadSignals | undefined;
|
|
22
22
|
"Api-Subscription-Key"?: string;
|
package/dist/cjs/api/resources/speechToTextStreaming/types/SpeechToTextStreamingFlushSignal.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Signal to flush the audio buffer and finalize transcription
|
|
6
|
+
*/
|
|
7
|
+
export type SpeechToTextStreamingFlushSignal = "true" | "false";
|
|
8
|
+
export declare const SpeechToTextStreamingFlushSignal: {
|
|
9
|
+
readonly True: "true";
|
|
10
|
+
readonly False: "false";
|
|
11
|
+
};
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* This file was auto-generated by Fern from our API Definition.
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
7
|
-
exports.
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
exports.SpeechToTextStreamingFlushSignal = void 0;
|
|
7
|
+
exports.SpeechToTextStreamingFlushSignal = {
|
|
8
|
+
True: "true",
|
|
9
|
+
False: "false",
|
|
10
10
|
};
|
package/dist/cjs/api/resources/speechToTextStreaming/types/SpeechToTextStreamingInputAudioCodec.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Audio codec/format of the input file. Our API automatically detects all codec formats, but for PCM files specifically (pcm_s16le, pcm_l16, pcm_raw), you must pass this parameter. PCM files supports sample rate 16000 and 8000.
|
|
6
|
+
*/
|
|
7
|
+
export type SpeechToTextStreamingInputAudioCodec = "wav" | "x-wav" | "wave" | "mp3" | "mpeg" | "mpeg3" | "x-mp3" | "x-mpeg-3" | "aac" | "x-aac" | "aiff" | "x-aiff" | "ogg" | "opus" | "flac" | "x-flac" | "mp4" | "x-m4a" | "amr" | "x-ms-wma" | "webm" | "pcm_s16le" | "pcm_l16" | "pcm_raw";
|
|
8
|
+
export declare const SpeechToTextStreamingInputAudioCodec: {
|
|
9
|
+
readonly Wav: "wav";
|
|
10
|
+
readonly XWav: "x-wav";
|
|
11
|
+
readonly Wave: "wave";
|
|
12
|
+
readonly Mp3: "mp3";
|
|
13
|
+
readonly Mpeg: "mpeg";
|
|
14
|
+
readonly Mpeg3: "mpeg3";
|
|
15
|
+
readonly XMp3: "x-mp3";
|
|
16
|
+
readonly XMpeg3: "x-mpeg-3";
|
|
17
|
+
readonly Aac: "aac";
|
|
18
|
+
readonly XAac: "x-aac";
|
|
19
|
+
readonly Aiff: "aiff";
|
|
20
|
+
readonly XAiff: "x-aiff";
|
|
21
|
+
readonly Ogg: "ogg";
|
|
22
|
+
readonly Opus: "opus";
|
|
23
|
+
readonly Flac: "flac";
|
|
24
|
+
readonly XFlac: "x-flac";
|
|
25
|
+
readonly Mp4: "mp4";
|
|
26
|
+
readonly Xm4A: "x-m4a";
|
|
27
|
+
readonly Amr: "amr";
|
|
28
|
+
readonly XMsWma: "x-ms-wma";
|
|
29
|
+
readonly Webm: "webm";
|
|
30
|
+
readonly PcmS16Le: "pcm_s16le";
|
|
31
|
+
readonly PcmL16: "pcm_l16";
|
|
32
|
+
readonly PcmRaw: "pcm_raw";
|
|
33
|
+
};
|
package/dist/cjs/api/resources/speechToTextStreaming/types/SpeechToTextStreamingInputAudioCodec.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
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.SpeechToTextStreamingInputAudioCodec = void 0;
|
|
7
|
+
exports.SpeechToTextStreamingInputAudioCodec = {
|
|
8
|
+
Wav: "wav",
|
|
9
|
+
XWav: "x-wav",
|
|
10
|
+
Wave: "wave",
|
|
11
|
+
Mp3: "mp3",
|
|
12
|
+
Mpeg: "mpeg",
|
|
13
|
+
Mpeg3: "mpeg3",
|
|
14
|
+
XMp3: "x-mp3",
|
|
15
|
+
XMpeg3: "x-mpeg-3",
|
|
16
|
+
Aac: "aac",
|
|
17
|
+
XAac: "x-aac",
|
|
18
|
+
Aiff: "aiff",
|
|
19
|
+
XAiff: "x-aiff",
|
|
20
|
+
Ogg: "ogg",
|
|
21
|
+
Opus: "opus",
|
|
22
|
+
Flac: "flac",
|
|
23
|
+
XFlac: "x-flac",
|
|
24
|
+
Mp4: "mp4",
|
|
25
|
+
Xm4A: "x-m4a",
|
|
26
|
+
Amr: "amr",
|
|
27
|
+
XMsWma: "x-ms-wma",
|
|
28
|
+
Webm: "webm",
|
|
29
|
+
PcmS16Le: "pcm_s16le",
|
|
30
|
+
PcmL16: "pcm_l16",
|
|
31
|
+
PcmRaw: "pcm_raw",
|
|
32
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from "./SpeechToTextStreamingLanguageCode.js";
|
|
2
|
-
export * from "./
|
|
2
|
+
export * from "./SpeechToTextStreamingInputAudioCodec.js";
|
|
3
3
|
export * from "./SpeechToTextStreamingHighVadSensitivity.js";
|
|
4
4
|
export * from "./SpeechToTextStreamingVadSignals.js";
|
|
5
|
+
export * from "./SpeechToTextStreamingFlushSignal.js";
|
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./SpeechToTextStreamingLanguageCode.js"), exports);
|
|
18
|
-
__exportStar(require("./
|
|
18
|
+
__exportStar(require("./SpeechToTextStreamingInputAudioCodec.js"), exports);
|
|
19
19
|
__exportStar(require("./SpeechToTextStreamingHighVadSensitivity.js"), exports);
|
|
20
20
|
__exportStar(require("./SpeechToTextStreamingVadSignals.js"), exports);
|
|
21
|
+
__exportStar(require("./SpeechToTextStreamingFlushSignal.js"), exports);
|
|
@@ -15,7 +15,7 @@ export declare namespace SpeechToTextTranslateStreaming {
|
|
|
15
15
|
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
16
16
|
}
|
|
17
17
|
interface ConnectArgs {
|
|
18
|
-
model?: SarvamAI.
|
|
18
|
+
model?: SarvamAI.SpeechToTextTranslateModel | undefined;
|
|
19
19
|
high_vad_sensitivity?: SarvamAI.SpeechToTextTranslateStreamingHighVadSensitivity | undefined;
|
|
20
20
|
vad_signals?: SarvamAI.SpeechToTextTranslateStreamingVadSignals | undefined;
|
|
21
21
|
"Api-Subscription-Key"?: string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Signal to flush the audio buffer and finalize transcription and translation
|
|
6
|
+
*/
|
|
7
|
+
export type SpeechToTextTranslateStreamingFlushSignal = "true" | "false";
|
|
8
|
+
export declare const SpeechToTextTranslateStreamingFlushSignal: {
|
|
9
|
+
readonly True: "true";
|
|
10
|
+
readonly False: "false";
|
|
11
|
+
};
|
|
@@ -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.SpeechToTextTranslateStreamingFlushSignal = void 0;
|
|
7
|
+
exports.SpeechToTextTranslateStreamingFlushSignal = {
|
|
8
|
+
True: "true",
|
|
9
|
+
False: "false",
|
|
10
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Audio codec/format of the input file. Our API automatically detects all codec formats, but for PCM files specifically (pcm_s16le, pcm_l16, pcm_raw), you must pass this parameter. PCM files supports sample rate 16000 and 8000.
|
|
6
|
+
*/
|
|
7
|
+
export type SpeechToTextTranslateStreamingInputAudioCodec = "wav" | "x-wav" | "wave" | "mp3" | "mpeg" | "mpeg3" | "x-mp3" | "x-mpeg-3" | "aac" | "x-aac" | "aiff" | "x-aiff" | "ogg" | "opus" | "flac" | "x-flac" | "mp4" | "x-m4a" | "amr" | "x-ms-wma" | "webm" | "pcm_s16le" | "pcm_l16" | "pcm_raw";
|
|
8
|
+
export declare const SpeechToTextTranslateStreamingInputAudioCodec: {
|
|
9
|
+
readonly Wav: "wav";
|
|
10
|
+
readonly XWav: "x-wav";
|
|
11
|
+
readonly Wave: "wave";
|
|
12
|
+
readonly Mp3: "mp3";
|
|
13
|
+
readonly Mpeg: "mpeg";
|
|
14
|
+
readonly Mpeg3: "mpeg3";
|
|
15
|
+
readonly XMp3: "x-mp3";
|
|
16
|
+
readonly XMpeg3: "x-mpeg-3";
|
|
17
|
+
readonly Aac: "aac";
|
|
18
|
+
readonly XAac: "x-aac";
|
|
19
|
+
readonly Aiff: "aiff";
|
|
20
|
+
readonly XAiff: "x-aiff";
|
|
21
|
+
readonly Ogg: "ogg";
|
|
22
|
+
readonly Opus: "opus";
|
|
23
|
+
readonly Flac: "flac";
|
|
24
|
+
readonly XFlac: "x-flac";
|
|
25
|
+
readonly Mp4: "mp4";
|
|
26
|
+
readonly Xm4A: "x-m4a";
|
|
27
|
+
readonly Amr: "amr";
|
|
28
|
+
readonly XMsWma: "x-ms-wma";
|
|
29
|
+
readonly Webm: "webm";
|
|
30
|
+
readonly PcmS16Le: "pcm_s16le";
|
|
31
|
+
readonly PcmL16: "pcm_l16";
|
|
32
|
+
readonly PcmRaw: "pcm_raw";
|
|
33
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
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.SpeechToTextTranslateStreamingInputAudioCodec = void 0;
|
|
7
|
+
exports.SpeechToTextTranslateStreamingInputAudioCodec = {
|
|
8
|
+
Wav: "wav",
|
|
9
|
+
XWav: "x-wav",
|
|
10
|
+
Wave: "wave",
|
|
11
|
+
Mp3: "mp3",
|
|
12
|
+
Mpeg: "mpeg",
|
|
13
|
+
Mpeg3: "mpeg3",
|
|
14
|
+
XMp3: "x-mp3",
|
|
15
|
+
XMpeg3: "x-mpeg-3",
|
|
16
|
+
Aac: "aac",
|
|
17
|
+
XAac: "x-aac",
|
|
18
|
+
Aiff: "aiff",
|
|
19
|
+
XAiff: "x-aiff",
|
|
20
|
+
Ogg: "ogg",
|
|
21
|
+
Opus: "opus",
|
|
22
|
+
Flac: "flac",
|
|
23
|
+
XFlac: "x-flac",
|
|
24
|
+
Mp4: "mp4",
|
|
25
|
+
Xm4A: "x-m4a",
|
|
26
|
+
Amr: "amr",
|
|
27
|
+
XMsWma: "x-ms-wma",
|
|
28
|
+
Webm: "webm",
|
|
29
|
+
PcmS16Le: "pcm_s16le",
|
|
30
|
+
PcmL16: "pcm_l16",
|
|
31
|
+
PcmRaw: "pcm_raw",
|
|
32
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export * from "./
|
|
1
|
+
export * from "./SpeechToTextTranslateStreamingInputAudioCodec.js";
|
|
2
2
|
export * from "./SpeechToTextTranslateStreamingHighVadSensitivity.js";
|
|
3
3
|
export * from "./SpeechToTextTranslateStreamingVadSignals.js";
|
|
4
|
+
export * from "./SpeechToTextTranslateStreamingFlushSignal.js";
|
|
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./
|
|
17
|
+
__exportStar(require("./SpeechToTextTranslateStreamingInputAudioCodec.js"), exports);
|
|
18
18
|
__exportStar(require("./SpeechToTextTranslateStreamingHighVadSensitivity.js"), exports);
|
|
19
19
|
__exportStar(require("./SpeechToTextTranslateStreamingVadSignals.js"), exports);
|
|
20
|
+
__exportStar(require("./SpeechToTextTranslateStreamingFlushSignal.js"), exports);
|
|
@@ -14,4 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./types/index.js"), exports);
|
|
17
18
|
__exportStar(require("./client/index.js"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Enable completion event notifications when TTS generation finishes. When set to true, an event message will be sent when the final audio chunk has been generated.
|
|
6
|
+
*/
|
|
7
|
+
export type TextToSpeechStreamingSendCompletionEvent = "true" | "false";
|
|
8
|
+
export declare const TextToSpeechStreamingSendCompletionEvent: {
|
|
9
|
+
readonly True: "true";
|
|
10
|
+
readonly False: "false";
|
|
11
|
+
};
|
|
@@ -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.TextToSpeechStreamingSendCompletionEvent = void 0;
|
|
7
|
+
exports.TextToSpeechStreamingSendCompletionEvent = {
|
|
8
|
+
True: "true",
|
|
9
|
+
False: "false",
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./TextToSpeechStreamingSendCompletionEvent.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./TextToSpeechStreamingSendCompletionEvent.js"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Enable completion event notifications when TTS generation finishes. When set to true, an event message will be sent when the final audio chunk has been generated.
|
|
6
|
+
*/
|
|
7
|
+
export type CompletionEventFlag = "true" | "false";
|
|
8
|
+
export declare const CompletionEventFlag: {
|
|
9
|
+
readonly True: "true";
|
|
10
|
+
readonly False: "false";
|
|
11
|
+
};
|
|
@@ -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.CompletionEventFlag = void 0;
|
|
7
|
+
exports.CompletionEventFlag = {
|
|
8
|
+
True: "true",
|
|
9
|
+
False: "false",
|
|
10
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Audio sample rate for WebSocket connection parameters. Only 16kHz and 8kHz are supported. 8kHz is only available via connection parameter (not in AudioData messages).
|
|
6
|
+
*/
|
|
7
|
+
export type ConnectionSampleRate = number;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Event notification message sent when specific events occur during TTS processing
|
|
6
|
+
*/
|
|
7
|
+
export interface EventResponse {
|
|
8
|
+
/** Message type identifier for events */
|
|
9
|
+
type: "event";
|
|
10
|
+
data: EventResponse.Data;
|
|
11
|
+
}
|
|
12
|
+
export declare namespace EventResponse {
|
|
13
|
+
interface Data {
|
|
14
|
+
/** Type of event that occurred */
|
|
15
|
+
event_type: "final";
|
|
16
|
+
/** Human-readable description of the event */
|
|
17
|
+
message?: string;
|
|
18
|
+
/** ISO 8601 timestamp when the event occurred */
|
|
19
|
+
timestamp?: string;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export type SpeechToTextModel = "saarika:
|
|
5
|
-
export declare const SpeechToTextModel: {
|
|
6
|
-
readonly SaarikaV1: "saarika:v1";
|
|
7
|
-
readonly SaarikaV2: "saarika:v2";
|
|
8
|
-
readonly SaarikaV25: "saarika:v2.5";
|
|
9
|
-
readonly SaarikaFlash: "saarika:flash";
|
|
10
|
-
};
|
|
4
|
+
export type SpeechToTextModel = "saarika:v2.5";
|
|
@@ -3,10 +3,3 @@
|
|
|
3
3
|
* This file was auto-generated by Fern from our API Definition.
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.SpeechToTextModel = void 0;
|
|
7
|
-
exports.SpeechToTextModel = {
|
|
8
|
-
SaarikaV1: "saarika:v1",
|
|
9
|
-
SaarikaV2: "saarika:v2",
|
|
10
|
-
SaarikaV25: "saarika:v2.5",
|
|
11
|
-
SaarikaFlash: "saarika:flash",
|
|
12
|
-
};
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export type SpeechToTextTranslateModel = "saaras:
|
|
5
|
-
export declare const SpeechToTextTranslateModel: {
|
|
6
|
-
readonly SaarasV1: "saaras:v1";
|
|
7
|
-
readonly SaarasV2: "saaras:v2";
|
|
8
|
-
readonly SaarasV25: "saaras:v2.5";
|
|
9
|
-
readonly SaarasFlash: "saaras:flash";
|
|
10
|
-
};
|
|
4
|
+
export type SpeechToTextTranslateModel = "saaras:v2.5";
|
|
@@ -3,10 +3,3 @@
|
|
|
3
3
|
* This file was auto-generated by Fern from our API Definition.
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.SpeechToTextTranslateModel = void 0;
|
|
7
|
-
exports.SpeechToTextTranslateModel = {
|
|
8
|
-
SaarasV1: "saaras:v1",
|
|
9
|
-
SaarasV2: "saaras:v2",
|
|
10
|
-
SaarasV25: "saaras:v2.5",
|
|
11
|
-
SaarasFlash: "saaras:flash",
|
|
12
|
-
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Signal to flush the audio buffer and force finalize partial transcriptions/translations
|
|
6
|
+
*/
|
|
7
|
+
export interface SttFlushSignal {
|
|
8
|
+
/** Type identifier for flush signal */
|
|
9
|
+
type: "flush";
|
|
10
|
+
}
|
|
@@ -13,10 +13,15 @@ export * from "./ErrorData.js";
|
|
|
13
13
|
export * from "./EventsData.js";
|
|
14
14
|
export * from "./ConfigureConnection.js";
|
|
15
15
|
export * from "./SendText.js";
|
|
16
|
+
export * from "./SttFlushSignal.js";
|
|
16
17
|
export * from "./FlushSignal.js";
|
|
17
18
|
export * from "./PingSignal.js";
|
|
18
19
|
export * from "./AudioOutput.js";
|
|
19
20
|
export * from "./ErrorResponse.js";
|
|
21
|
+
export * from "./EventResponse.js";
|
|
22
|
+
export * from "./InputAudioCodec.js";
|
|
23
|
+
export * from "./CompletionEventFlag.js";
|
|
24
|
+
export * from "./ConnectionSampleRate.js";
|
|
20
25
|
export * from "./JobState.js";
|
|
21
26
|
export * from "./StorageContainerType.js";
|
|
22
27
|
export * from "./TaskState.js";
|
|
@@ -61,7 +66,6 @@ export * from "./TranslationResponse.js";
|
|
|
61
66
|
export * from "./TranslatiterateTargetLanguage.js";
|
|
62
67
|
export * from "./TransliterateSourceLanguage.js";
|
|
63
68
|
export * from "./TransliterationResponse.js";
|
|
64
|
-
export * from "./InputAudioCodec.js";
|
|
65
69
|
export * from "./DiarizedEntry.js";
|
|
66
70
|
export * from "./DiarizedTranscript.js";
|
|
67
71
|
export * from "./SpeechToTextLanguage.js";
|
|
@@ -29,10 +29,15 @@ __exportStar(require("./ErrorData.js"), exports);
|
|
|
29
29
|
__exportStar(require("./EventsData.js"), exports);
|
|
30
30
|
__exportStar(require("./ConfigureConnection.js"), exports);
|
|
31
31
|
__exportStar(require("./SendText.js"), exports);
|
|
32
|
+
__exportStar(require("./SttFlushSignal.js"), exports);
|
|
32
33
|
__exportStar(require("./FlushSignal.js"), exports);
|
|
33
34
|
__exportStar(require("./PingSignal.js"), exports);
|
|
34
35
|
__exportStar(require("./AudioOutput.js"), exports);
|
|
35
36
|
__exportStar(require("./ErrorResponse.js"), exports);
|
|
37
|
+
__exportStar(require("./EventResponse.js"), exports);
|
|
38
|
+
__exportStar(require("./InputAudioCodec.js"), exports);
|
|
39
|
+
__exportStar(require("./CompletionEventFlag.js"), exports);
|
|
40
|
+
__exportStar(require("./ConnectionSampleRate.js"), exports);
|
|
36
41
|
__exportStar(require("./JobState.js"), exports);
|
|
37
42
|
__exportStar(require("./StorageContainerType.js"), exports);
|
|
38
43
|
__exportStar(require("./TaskState.js"), exports);
|
|
@@ -77,7 +82,6 @@ __exportStar(require("./TranslationResponse.js"), exports);
|
|
|
77
82
|
__exportStar(require("./TranslatiterateTargetLanguage.js"), exports);
|
|
78
83
|
__exportStar(require("./TransliterateSourceLanguage.js"), exports);
|
|
79
84
|
__exportStar(require("./TransliterationResponse.js"), exports);
|
|
80
|
-
__exportStar(require("./InputAudioCodec.js"), exports);
|
|
81
85
|
__exportStar(require("./DiarizedEntry.js"), exports);
|
|
82
86
|
__exportStar(require("./DiarizedTranscript.js"), exports);
|
|
83
87
|
__exportStar(require("./SpeechToTextLanguage.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.1.
|
|
1
|
+
export declare const SDK_VERSION = "0.1.8-a.2";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/Client.mjs
CHANGED
|
@@ -17,8 +17,8 @@ export class SarvamAIClient {
|
|
|
17
17
|
this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
|
|
18
18
|
"X-Fern-Language": "JavaScript",
|
|
19
19
|
"X-Fern-SDK-Name": "sarvamai",
|
|
20
|
-
"X-Fern-SDK-Version": "0.1.
|
|
21
|
-
"User-Agent": "sarvamai/0.1.
|
|
20
|
+
"X-Fern-SDK-Version": "0.1.8-a.2",
|
|
21
|
+
"User-Agent": "sarvamai/0.1.8-a.2",
|
|
22
22
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
23
23
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
24
24
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -3,6 +3,7 @@ export * from "./speechToTextStreaming/types/index.mjs";
|
|
|
3
3
|
export * as speechToTextTranslateStreaming from "./speechToTextTranslateStreaming/index.mjs";
|
|
4
4
|
export * from "./speechToTextTranslateStreaming/types/index.mjs";
|
|
5
5
|
export * as textToSpeechStreaming from "./textToSpeechStreaming/index.mjs";
|
|
6
|
+
export * from "./textToSpeechStreaming/types/index.mjs";
|
|
6
7
|
export * as text from "./text/index.mjs";
|
|
7
8
|
export * as speechToText from "./speechToText/index.mjs";
|
|
8
9
|
export * as textToSpeech from "./textToSpeech/index.mjs";
|
|
@@ -3,6 +3,7 @@ export * from "./speechToTextStreaming/types/index.mjs";
|
|
|
3
3
|
export * as speechToTextTranslateStreaming from "./speechToTextTranslateStreaming/index.mjs";
|
|
4
4
|
export * from "./speechToTextTranslateStreaming/types/index.mjs";
|
|
5
5
|
export * as textToSpeechStreaming from "./textToSpeechStreaming/index.mjs";
|
|
6
|
+
export * from "./textToSpeechStreaming/types/index.mjs";
|
|
6
7
|
export * as text from "./text/index.mjs";
|
|
7
8
|
export * as speechToText from "./speechToText/index.mjs";
|
|
8
9
|
export * as textToSpeech from "./textToSpeech/index.mjs";
|
|
@@ -16,7 +16,7 @@ export declare namespace SpeechToTextStreaming {
|
|
|
16
16
|
}
|
|
17
17
|
interface ConnectArgs {
|
|
18
18
|
"language-code"?: SarvamAI.SpeechToTextStreamingLanguageCode;
|
|
19
|
-
model?: SarvamAI.
|
|
19
|
+
model?: SarvamAI.SpeechToTextModel | undefined;
|
|
20
20
|
high_vad_sensitivity?: SarvamAI.SpeechToTextStreamingHighVadSensitivity | undefined;
|
|
21
21
|
vad_signals?: SarvamAI.SpeechToTextStreamingVadSignals | undefined;
|
|
22
22
|
"Api-Subscription-Key"?: string;
|
package/dist/esm/api/resources/speechToTextStreaming/types/SpeechToTextStreamingFlushSignal.d.mts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Signal to flush the audio buffer and finalize transcription
|
|
6
|
+
*/
|
|
7
|
+
export type SpeechToTextStreamingFlushSignal = "true" | "false";
|
|
8
|
+
export declare const SpeechToTextStreamingFlushSignal: {
|
|
9
|
+
readonly True: "true";
|
|
10
|
+
readonly False: "false";
|
|
11
|
+
};
|