sarvamai 0.0.14 → 0.1.0-a0

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.
@@ -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.14", "User-Agent": "sarvamai/0.0.14", "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.0a0", "User-Agent": "sarvamai/0.1.0a0", "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.14", "User-Agent": "sarvamai/0.0.14", "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.0a0", "User-Agent": "sarvamai/0.1.0a0", "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.14", "User-Agent": "sarvamai/0.0.14", "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.0a0", "User-Agent": "sarvamai/0.1.0a0", "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.14", "User-Agent": "sarvamai/0.0.14", "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.0a0", "User-Agent": "sarvamai/0.1.0a0", "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.14", "User-Agent": "sarvamai/0.0.14", "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.0a0", "User-Agent": "sarvamai/0.1.0a0", "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.14", "User-Agent": "sarvamai/0.0.14", "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.0a0", "User-Agent": "sarvamai/0.1.0a0", "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
  /**
@@ -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.14", "User-Agent": "sarvamai/0.0.14", "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.0a0", "User-Agent": "sarvamai/0.1.0a0", "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.14", "User-Agent": "sarvamai/0.0.14", "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.0a0", "User-Agent": "sarvamai/0.1.0a0", "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.14", "User-Agent": "sarvamai/0.0.14", "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.0a0", "User-Agent": "sarvamai/0.1.0a0", "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.14", "User-Agent": "sarvamai/0.0.14", "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.0a0", "User-Agent": "sarvamai/0.1.0a0", "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.14", "User-Agent": "sarvamai/0.0.14", "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.0a0", "User-Agent": "sarvamai/0.1.0a0", "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.14", "User-Agent": "sarvamai/0.0.14", "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.0a0", "User-Agent": "sarvamai/0.1.0a0", "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.14";
1
+ export declare const SDK_VERSION = "0.1.0a0";
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.14";
4
+ exports.SDK_VERSION = "0.1.0a0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sarvamai",
3
- "version": "0.0.14",
3
+ "version": "0.1.0a0",
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.14";
1
+ export declare const SDK_VERSION = "0.1.0a0";
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.14";
4
+ exports.SDK_VERSION = "0.1.0a0";