sarvamai 0.0.14 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/resources/speechToText/client/Client.js +2 -17
- package/api/resources/speechToText/client/requests/SpeechToTextTranscriptionRequest.d.ts +0 -10
- package/api/resources/speechToText/client/requests/SpeechToTextTranslationRequest.d.ts +0 -8
- package/api/resources/text/client/Client.js +3 -3
- package/api/resources/textToSpeech/client/Client.js +1 -1
- package/dist/api/resources/speechToText/client/Client.js +2 -17
- package/dist/api/resources/speechToText/client/requests/SpeechToTextTranscriptionRequest.d.ts +0 -10
- package/dist/api/resources/speechToText/client/requests/SpeechToTextTranslationRequest.d.ts +0 -8
- package/dist/api/resources/text/client/Client.js +3 -3
- package/dist/api/resources/textToSpeech/client/Client.js +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -98,20 +98,11 @@ class SpeechToText {
|
|
|
98
98
|
if (request.language_code != null) {
|
|
99
99
|
_request.append("language_code", request.language_code);
|
|
100
100
|
}
|
|
101
|
-
if (request.with_timestamps != null) {
|
|
102
|
-
_request.append("with_timestamps", request.with_timestamps.toString());
|
|
103
|
-
}
|
|
104
|
-
if (request.with_diarization != null) {
|
|
105
|
-
_request.append("with_diarization", request.with_diarization.toString());
|
|
106
|
-
}
|
|
107
|
-
if (request.num_speakers != null) {
|
|
108
|
-
_request.append("num_speakers", request.num_speakers.toString());
|
|
109
|
-
}
|
|
110
101
|
const _maybeEncodedRequest = yield _request.getRequest();
|
|
111
102
|
const _response = yield core.fetcher({
|
|
112
103
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SarvamAIEnvironment.Production, "speech-to-text"),
|
|
113
104
|
method: "POST",
|
|
114
|
-
headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.0.
|
|
105
|
+
headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.0.15", "User-Agent": "sarvamai/0.0.15", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
115
106
|
requestType: "file",
|
|
116
107
|
duplex: _maybeEncodedRequest.duplex,
|
|
117
108
|
body: _maybeEncodedRequest.body,
|
|
@@ -198,17 +189,11 @@ class SpeechToText {
|
|
|
198
189
|
if (request.model != null) {
|
|
199
190
|
_request.append("model", request.model);
|
|
200
191
|
}
|
|
201
|
-
if (request.with_diarization != null) {
|
|
202
|
-
_request.append("with_diarization", request.with_diarization.toString());
|
|
203
|
-
}
|
|
204
|
-
if (request.num_speakers != null) {
|
|
205
|
-
_request.append("num_speakers", request.num_speakers.toString());
|
|
206
|
-
}
|
|
207
192
|
const _maybeEncodedRequest = yield _request.getRequest();
|
|
208
193
|
const _response = yield core.fetcher({
|
|
209
194
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SarvamAIEnvironment.Production, "speech-to-text-translate"),
|
|
210
195
|
method: "POST",
|
|
211
|
-
headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.0.
|
|
196
|
+
headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.0.15", "User-Agent": "sarvamai/0.0.15", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
212
197
|
requestType: "file",
|
|
213
198
|
duplex: _maybeEncodedRequest.duplex,
|
|
214
199
|
body: _maybeEncodedRequest.body,
|
|
@@ -20,14 +20,4 @@ export interface SpeechToTextTranscriptionRequest {
|
|
|
20
20
|
* Note:- that the `saarika:v1` model does not support `unknown` language code.
|
|
21
21
|
*/
|
|
22
22
|
language_code?: SarvamAI.SpeechToTextLanguage;
|
|
23
|
-
/** Enables timestamps in the response. If set to `true`, the response will include timestamps in the transcript. */
|
|
24
|
-
with_timestamps?: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* Enables speaker diarization, which identifies and separates different speakers in the audio.
|
|
27
|
-
* When set to true, the API will provide speaker-specific segments in the response.
|
|
28
|
-
* Note: This parameter is currently in Beta mode.
|
|
29
|
-
*/
|
|
30
|
-
with_diarization?: boolean;
|
|
31
|
-
/** Number of speakers to be detected in the audio. This is used when with_diarization is set to true. */
|
|
32
|
-
num_speakers?: number;
|
|
33
23
|
}
|
|
@@ -11,12 +11,4 @@ export interface SpeechToTextTranslationRequest {
|
|
|
11
11
|
prompt?: string;
|
|
12
12
|
/** Model to be used for converting speech to text in target language */
|
|
13
13
|
model?: SarvamAI.SpeechToTextTranslateModel;
|
|
14
|
-
/**
|
|
15
|
-
* Enables speaker diarization, which identifies and separates different speakers in the audio.
|
|
16
|
-
* When set to true, the API will provide speaker-specific segments in the response.
|
|
17
|
-
* Note: This parameter is currently in Beta mode.
|
|
18
|
-
*/
|
|
19
|
-
with_diarization?: boolean;
|
|
20
|
-
/** Number of speakers to be detected in the audio. This is used when with_diarization is set to true. */
|
|
21
|
-
num_speakers?: number;
|
|
22
14
|
}
|
|
@@ -99,7 +99,7 @@ class Text {
|
|
|
99
99
|
const _response = yield core.fetcher({
|
|
100
100
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SarvamAIEnvironment.Production, "translate"),
|
|
101
101
|
method: "POST",
|
|
102
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.0.
|
|
102
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.0.15", "User-Agent": "sarvamai/0.0.15", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
103
103
|
contentType: "application/json",
|
|
104
104
|
requestType: "json",
|
|
105
105
|
body: request,
|
|
@@ -167,7 +167,7 @@ class Text {
|
|
|
167
167
|
const _response = yield core.fetcher({
|
|
168
168
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SarvamAIEnvironment.Production, "text-lid"),
|
|
169
169
|
method: "POST",
|
|
170
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.0.
|
|
170
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.0.15", "User-Agent": "sarvamai/0.0.15", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
171
171
|
contentType: "application/json",
|
|
172
172
|
requestType: "json",
|
|
173
173
|
body: request,
|
|
@@ -259,7 +259,7 @@ class Text {
|
|
|
259
259
|
const _response = yield core.fetcher({
|
|
260
260
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SarvamAIEnvironment.Production, "transliterate"),
|
|
261
261
|
method: "POST",
|
|
262
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.0.
|
|
262
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.0.15", "User-Agent": "sarvamai/0.0.15", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
263
263
|
contentType: "application/json",
|
|
264
264
|
requestType: "json",
|
|
265
265
|
body: request,
|
|
@@ -83,7 +83,7 @@ class TextToSpeech {
|
|
|
83
83
|
const _response = yield core.fetcher({
|
|
84
84
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SarvamAIEnvironment.Production, "text-to-speech"),
|
|
85
85
|
method: "POST",
|
|
86
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.0.
|
|
86
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.0.15", "User-Agent": "sarvamai/0.0.15", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
87
87
|
contentType: "application/json",
|
|
88
88
|
requestType: "json",
|
|
89
89
|
body: request,
|
|
@@ -98,20 +98,11 @@ class SpeechToText {
|
|
|
98
98
|
if (request.language_code != null) {
|
|
99
99
|
_request.append("language_code", request.language_code);
|
|
100
100
|
}
|
|
101
|
-
if (request.with_timestamps != null) {
|
|
102
|
-
_request.append("with_timestamps", request.with_timestamps.toString());
|
|
103
|
-
}
|
|
104
|
-
if (request.with_diarization != null) {
|
|
105
|
-
_request.append("with_diarization", request.with_diarization.toString());
|
|
106
|
-
}
|
|
107
|
-
if (request.num_speakers != null) {
|
|
108
|
-
_request.append("num_speakers", request.num_speakers.toString());
|
|
109
|
-
}
|
|
110
101
|
const _maybeEncodedRequest = yield _request.getRequest();
|
|
111
102
|
const _response = yield core.fetcher({
|
|
112
103
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SarvamAIEnvironment.Production, "speech-to-text"),
|
|
113
104
|
method: "POST",
|
|
114
|
-
headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.0.
|
|
105
|
+
headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.0.15", "User-Agent": "sarvamai/0.0.15", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
115
106
|
requestType: "file",
|
|
116
107
|
duplex: _maybeEncodedRequest.duplex,
|
|
117
108
|
body: _maybeEncodedRequest.body,
|
|
@@ -198,17 +189,11 @@ class SpeechToText {
|
|
|
198
189
|
if (request.model != null) {
|
|
199
190
|
_request.append("model", request.model);
|
|
200
191
|
}
|
|
201
|
-
if (request.with_diarization != null) {
|
|
202
|
-
_request.append("with_diarization", request.with_diarization.toString());
|
|
203
|
-
}
|
|
204
|
-
if (request.num_speakers != null) {
|
|
205
|
-
_request.append("num_speakers", request.num_speakers.toString());
|
|
206
|
-
}
|
|
207
192
|
const _maybeEncodedRequest = yield _request.getRequest();
|
|
208
193
|
const _response = yield core.fetcher({
|
|
209
194
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SarvamAIEnvironment.Production, "speech-to-text-translate"),
|
|
210
195
|
method: "POST",
|
|
211
|
-
headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.0.
|
|
196
|
+
headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.0.15", "User-Agent": "sarvamai/0.0.15", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
212
197
|
requestType: "file",
|
|
213
198
|
duplex: _maybeEncodedRequest.duplex,
|
|
214
199
|
body: _maybeEncodedRequest.body,
|
package/dist/api/resources/speechToText/client/requests/SpeechToTextTranscriptionRequest.d.ts
CHANGED
|
@@ -20,14 +20,4 @@ export interface SpeechToTextTranscriptionRequest {
|
|
|
20
20
|
* Note:- that the `saarika:v1` model does not support `unknown` language code.
|
|
21
21
|
*/
|
|
22
22
|
language_code?: SarvamAI.SpeechToTextLanguage;
|
|
23
|
-
/** Enables timestamps in the response. If set to `true`, the response will include timestamps in the transcript. */
|
|
24
|
-
with_timestamps?: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* Enables speaker diarization, which identifies and separates different speakers in the audio.
|
|
27
|
-
* When set to true, the API will provide speaker-specific segments in the response.
|
|
28
|
-
* Note: This parameter is currently in Beta mode.
|
|
29
|
-
*/
|
|
30
|
-
with_diarization?: boolean;
|
|
31
|
-
/** Number of speakers to be detected in the audio. This is used when with_diarization is set to true. */
|
|
32
|
-
num_speakers?: number;
|
|
33
23
|
}
|
|
@@ -11,12 +11,4 @@ export interface SpeechToTextTranslationRequest {
|
|
|
11
11
|
prompt?: string;
|
|
12
12
|
/** Model to be used for converting speech to text in target language */
|
|
13
13
|
model?: SarvamAI.SpeechToTextTranslateModel;
|
|
14
|
-
/**
|
|
15
|
-
* Enables speaker diarization, which identifies and separates different speakers in the audio.
|
|
16
|
-
* When set to true, the API will provide speaker-specific segments in the response.
|
|
17
|
-
* Note: This parameter is currently in Beta mode.
|
|
18
|
-
*/
|
|
19
|
-
with_diarization?: boolean;
|
|
20
|
-
/** Number of speakers to be detected in the audio. This is used when with_diarization is set to true. */
|
|
21
|
-
num_speakers?: number;
|
|
22
14
|
}
|
|
@@ -99,7 +99,7 @@ class Text {
|
|
|
99
99
|
const _response = yield core.fetcher({
|
|
100
100
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SarvamAIEnvironment.Production, "translate"),
|
|
101
101
|
method: "POST",
|
|
102
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.0.
|
|
102
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.0.15", "User-Agent": "sarvamai/0.0.15", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
103
103
|
contentType: "application/json",
|
|
104
104
|
requestType: "json",
|
|
105
105
|
body: request,
|
|
@@ -167,7 +167,7 @@ class Text {
|
|
|
167
167
|
const _response = yield core.fetcher({
|
|
168
168
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SarvamAIEnvironment.Production, "text-lid"),
|
|
169
169
|
method: "POST",
|
|
170
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.0.
|
|
170
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.0.15", "User-Agent": "sarvamai/0.0.15", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
171
171
|
contentType: "application/json",
|
|
172
172
|
requestType: "json",
|
|
173
173
|
body: request,
|
|
@@ -259,7 +259,7 @@ class Text {
|
|
|
259
259
|
const _response = yield core.fetcher({
|
|
260
260
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SarvamAIEnvironment.Production, "transliterate"),
|
|
261
261
|
method: "POST",
|
|
262
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.0.
|
|
262
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.0.15", "User-Agent": "sarvamai/0.0.15", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
263
263
|
contentType: "application/json",
|
|
264
264
|
requestType: "json",
|
|
265
265
|
body: request,
|
|
@@ -83,7 +83,7 @@ class TextToSpeech {
|
|
|
83
83
|
const _response = yield core.fetcher({
|
|
84
84
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SarvamAIEnvironment.Production, "text-to-speech"),
|
|
85
85
|
method: "POST",
|
|
86
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.0.
|
|
86
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.0.15", "User-Agent": "sarvamai/0.0.15", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
87
87
|
contentType: "application/json",
|
|
88
88
|
requestType: "json",
|
|
89
89
|
body: request,
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.15";
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
package/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.15";
|
package/version.js
CHANGED