sarvamai 0.0.15 → 0.1.0-b0

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.
@@ -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.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),
105
+ headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.1.0b0", "User-Agent": "sarvamai/0.1.0b0", "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.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),
196
+ headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.1.0b0", "User-Agent": "sarvamai/0.1.0b0", "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.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),
102
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.1.0b0", "User-Agent": "sarvamai/0.1.0b0", "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.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),
170
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.1.0b0", "User-Agent": "sarvamai/0.1.0b0", "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.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),
262
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.1.0b0", "User-Agent": "sarvamai/0.1.0b0", "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,
@@ -40,7 +40,7 @@ export declare class TextToSpeech {
40
40
  *
41
41
  * @example
42
42
  * await client.textToSpeech.convert({
43
- * inputs: ["inputs"],
43
+ * text: "text",
44
44
  * target_language_code: "bn-IN"
45
45
  * })
46
46
  */
@@ -73,7 +73,7 @@ class TextToSpeech {
73
73
  *
74
74
  * @example
75
75
  * await client.textToSpeech.convert({
76
- * inputs: ["inputs"],
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.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),
86
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.1.0b0", "User-Agent": "sarvamai/0.1.0b0", "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
- * inputs: ["inputs"],
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.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),
105
+ headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.1.0b0", "User-Agent": "sarvamai/0.1.0b0", "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.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),
196
+ headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.1.0b0", "User-Agent": "sarvamai/0.1.0b0", "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.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),
102
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.1.0b0", "User-Agent": "sarvamai/0.1.0b0", "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.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),
170
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.1.0b0", "User-Agent": "sarvamai/0.1.0b0", "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.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),
262
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.1.0b0", "User-Agent": "sarvamai/0.1.0b0", "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,
@@ -40,7 +40,7 @@ export declare class TextToSpeech {
40
40
  *
41
41
  * @example
42
42
  * await client.textToSpeech.convert({
43
- * inputs: ["inputs"],
43
+ * text: "text",
44
44
  * target_language_code: "bn-IN"
45
45
  * })
46
46
  */
@@ -73,7 +73,7 @@ class TextToSpeech {
73
73
  *
74
74
  * @example
75
75
  * await client.textToSpeech.convert({
76
- * inputs: ["inputs"],
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.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),
86
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.1.0b0", "User-Agent": "sarvamai/0.1.0b0", "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
- * inputs: ["inputs"],
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.0.15";
1
+ export declare const SDK_VERSION = "0.1.0b0";
package/dist/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "0.0.15";
4
+ exports.SDK_VERSION = "0.1.0b0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sarvamai",
3
- "version": "0.0.15",
3
+ "version": "0.1.0b0",
4
4
  "private": false,
5
5
  "repository": "https://github.com/sarvamai/sarvam-javascript-sdk",
6
6
  "main": "./index.js",
package/reference.md CHANGED
@@ -445,7 +445,7 @@ The output is a wave file encoded as a base64 string.
445
445
 
446
446
  ```typescript
447
447
  await client.textToSpeech.convert({
448
- inputs: ["inputs"],
448
+ text: "text",
449
449
  target_language_code: "bn-IN",
450
450
  });
451
451
  ```
package/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.0.15";
1
+ export declare const SDK_VERSION = "0.1.0b0";
package/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "0.0.15";
4
+ exports.SDK_VERSION = "0.1.0b0";