sarvamai 0.1.0 → 0.1.1
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 -2
- package/api/resources/text/client/Client.js +3 -3
- package/api/resources/textToSpeech/client/Client.d.ts +1 -1
- package/api/resources/textToSpeech/client/Client.js +2 -2
- package/api/resources/textToSpeech/client/requests/TextToSpeechRequest.d.ts +2 -14
- package/dist/api/resources/speechToText/client/Client.js +2 -2
- package/dist/api/resources/text/client/Client.js +3 -3
- package/dist/api/resources/textToSpeech/client/Client.d.ts +1 -1
- package/dist/api/resources/textToSpeech/client/Client.js +2 -2
- package/dist/api/resources/textToSpeech/client/requests/TextToSpeechRequest.d.ts +2 -14
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -102,7 +102,7 @@ class SpeechToText {
|
|
|
102
102
|
const _response = yield core.fetcher({
|
|
103
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"),
|
|
104
104
|
method: "POST",
|
|
105
|
-
headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.1.
|
|
105
|
+
headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "sarvamai/0.1.1", "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),
|
|
106
106
|
requestType: "file",
|
|
107
107
|
duplex: _maybeEncodedRequest.duplex,
|
|
108
108
|
body: _maybeEncodedRequest.body,
|
|
@@ -193,7 +193,7 @@ class SpeechToText {
|
|
|
193
193
|
const _response = yield core.fetcher({
|
|
194
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"),
|
|
195
195
|
method: "POST",
|
|
196
|
-
headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.1.
|
|
196
|
+
headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "sarvamai/0.1.1", "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),
|
|
197
197
|
requestType: "file",
|
|
198
198
|
duplex: _maybeEncodedRequest.duplex,
|
|
199
199
|
body: _maybeEncodedRequest.body,
|
|
@@ -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.1.
|
|
102
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "sarvamai/0.1.1", "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.1.
|
|
170
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "sarvamai/0.1.1", "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.1.
|
|
262
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "sarvamai/0.1.1", "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,
|
|
@@ -73,7 +73,7 @@ class TextToSpeech {
|
|
|
73
73
|
*
|
|
74
74
|
* @example
|
|
75
75
|
* await client.textToSpeech.convert({
|
|
76
|
-
*
|
|
76
|
+
* text: "text",
|
|
77
77
|
* target_language_code: "bn-IN"
|
|
78
78
|
* })
|
|
79
79
|
*/
|
|
@@ -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.1.
|
|
86
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "sarvamai/0.1.1", "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,
|
|
@@ -5,24 +5,12 @@ import * as SarvamAI from "../../../../index";
|
|
|
5
5
|
/**
|
|
6
6
|
* @example
|
|
7
7
|
* {
|
|
8
|
-
*
|
|
8
|
+
* text: "text",
|
|
9
9
|
* target_language_code: "bn-IN"
|
|
10
10
|
* }
|
|
11
11
|
*/
|
|
12
12
|
export interface TextToSpeechRequest {
|
|
13
|
-
|
|
14
|
-
* The text(s) to be converted into speech.
|
|
15
|
-
*
|
|
16
|
-
* **Features:**
|
|
17
|
-
* - Each text should be no longer than 500 characters
|
|
18
|
-
* - You can send up to 3 texts in a single API call
|
|
19
|
-
* - Supports code-mixed text (English and Indic languages)
|
|
20
|
-
*
|
|
21
|
-
* **Important Note:**
|
|
22
|
-
* - For numbers larger than 4 digits, use commas (e.g., '10,000' instead of '10000')
|
|
23
|
-
* - This ensures proper pronunciation as a whole number
|
|
24
|
-
*/
|
|
25
|
-
inputs: string[];
|
|
13
|
+
text: string;
|
|
26
14
|
/** The language of the text is BCP-47 format */
|
|
27
15
|
target_language_code: SarvamAI.TextToSpeechLanguage;
|
|
28
16
|
/**
|
|
@@ -102,7 +102,7 @@ class SpeechToText {
|
|
|
102
102
|
const _response = yield core.fetcher({
|
|
103
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"),
|
|
104
104
|
method: "POST",
|
|
105
|
-
headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.1.
|
|
105
|
+
headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "sarvamai/0.1.1", "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),
|
|
106
106
|
requestType: "file",
|
|
107
107
|
duplex: _maybeEncodedRequest.duplex,
|
|
108
108
|
body: _maybeEncodedRequest.body,
|
|
@@ -193,7 +193,7 @@ class SpeechToText {
|
|
|
193
193
|
const _response = yield core.fetcher({
|
|
194
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"),
|
|
195
195
|
method: "POST",
|
|
196
|
-
headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.1.
|
|
196
|
+
headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "sarvamai/0.1.1", "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),
|
|
197
197
|
requestType: "file",
|
|
198
198
|
duplex: _maybeEncodedRequest.duplex,
|
|
199
199
|
body: _maybeEncodedRequest.body,
|
|
@@ -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.1.
|
|
102
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "sarvamai/0.1.1", "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.1.
|
|
170
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "sarvamai/0.1.1", "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.1.
|
|
262
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "sarvamai/0.1.1", "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,
|
|
@@ -73,7 +73,7 @@ class TextToSpeech {
|
|
|
73
73
|
*
|
|
74
74
|
* @example
|
|
75
75
|
* await client.textToSpeech.convert({
|
|
76
|
-
*
|
|
76
|
+
* text: "text",
|
|
77
77
|
* target_language_code: "bn-IN"
|
|
78
78
|
* })
|
|
79
79
|
*/
|
|
@@ -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.1.
|
|
86
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "sarvamai/0.1.1", "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,
|
|
@@ -5,24 +5,12 @@ import * as SarvamAI from "../../../../index";
|
|
|
5
5
|
/**
|
|
6
6
|
* @example
|
|
7
7
|
* {
|
|
8
|
-
*
|
|
8
|
+
* text: "text",
|
|
9
9
|
* target_language_code: "bn-IN"
|
|
10
10
|
* }
|
|
11
11
|
*/
|
|
12
12
|
export interface TextToSpeechRequest {
|
|
13
|
-
|
|
14
|
-
* The text(s) to be converted into speech.
|
|
15
|
-
*
|
|
16
|
-
* **Features:**
|
|
17
|
-
* - Each text should be no longer than 500 characters
|
|
18
|
-
* - You can send up to 3 texts in a single API call
|
|
19
|
-
* - Supports code-mixed text (English and Indic languages)
|
|
20
|
-
*
|
|
21
|
-
* **Important Note:**
|
|
22
|
-
* - For numbers larger than 4 digits, use commas (e.g., '10,000' instead of '10000')
|
|
23
|
-
* - This ensures proper pronunciation as a whole number
|
|
24
|
-
*/
|
|
25
|
-
inputs: string[];
|
|
13
|
+
text: string;
|
|
26
14
|
/** The language of the text is BCP-47 format */
|
|
27
15
|
target_language_code: SarvamAI.TextToSpeechLanguage;
|
|
28
16
|
/**
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.1.
|
|
1
|
+
export declare const SDK_VERSION = "0.1.1";
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
package/reference.md
CHANGED
package/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.1.
|
|
1
|
+
export declare const SDK_VERSION = "0.1.1";
|
package/version.js
CHANGED