sarvamai 1.1.3-alpha.1 → 1.1.3

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.
Files changed (26) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/textToSpeech/client/Client.d.ts +5 -5
  3. package/dist/cjs/api/resources/textToSpeech/client/Client.js +5 -5
  4. package/dist/cjs/api/resources/textToSpeech/client/requests/TextToSpeechRequest.d.ts +15 -11
  5. package/dist/cjs/api/resources/textToSpeechStreaming/types/TextToSpeechStreamingModel.d.ts +3 -3
  6. package/dist/cjs/api/resources/textToSpeechStreaming/types/TextToSpeechStreamingModel.js +3 -3
  7. package/dist/cjs/api/types/ConfigureConnection.d.ts +14 -12
  8. package/dist/cjs/api/types/ConfigureConnection.js +4 -4
  9. package/dist/cjs/api/types/TextToSpeechModel.d.ts +1 -1
  10. package/dist/cjs/api/types/TextToSpeechModel.js +1 -1
  11. package/dist/cjs/version.d.ts +1 -1
  12. package/dist/cjs/version.js +1 -1
  13. package/dist/esm/BaseClient.mjs +2 -2
  14. package/dist/esm/api/resources/textToSpeech/client/Client.d.mts +5 -5
  15. package/dist/esm/api/resources/textToSpeech/client/Client.mjs +5 -5
  16. package/dist/esm/api/resources/textToSpeech/client/requests/TextToSpeechRequest.d.mts +15 -11
  17. package/dist/esm/api/resources/textToSpeechStreaming/types/TextToSpeechStreamingModel.d.mts +3 -3
  18. package/dist/esm/api/resources/textToSpeechStreaming/types/TextToSpeechStreamingModel.mjs +3 -3
  19. package/dist/esm/api/types/ConfigureConnection.d.mts +14 -12
  20. package/dist/esm/api/types/ConfigureConnection.mjs +4 -4
  21. package/dist/esm/api/types/TextToSpeechModel.d.mts +1 -1
  22. package/dist/esm/api/types/TextToSpeechModel.mjs +1 -1
  23. package/dist/esm/version.d.mts +1 -1
  24. package/dist/esm/version.mjs +1 -1
  25. package/package.json +1 -1
  26. package/reference.md +5 -5
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "sarvamai",
46
- "X-Fern-SDK-Version": "1.1.3-alpha.1",
47
- "User-Agent": "sarvamai/1.1.3-alpha.1",
46
+ "X-Fern-SDK-Version": "1.1.3",
47
+ "User-Agent": "sarvamai/1.1.3",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -12,18 +12,18 @@ export declare class TextToSpeechClient {
12
12
  protected readonly _options: NormalizedClientOptionsWithAuth<TextToSpeechClient.Options>;
13
13
  constructor(options?: TextToSpeechClient.Options);
14
14
  /**
15
- * Convert text into spoken audio. The output is a wave file encoded as a base64 string.
15
+ * Convert text into spoken audio. The output is a base64-encoded audio string that must be decoded before use.
16
16
  *
17
17
  * **Available Models:**
18
- * - **bulbul:v2** (default): Supports pitch, loudness, and pace controls
19
- * - **bulbul:v3**: Newer model with improved quality
18
+ * - **bulbul:v3**: Latest model with improved quality, 30+ voices, and temperature control
19
+ * - **bulbul:v2**: Legacy model with pitch and loudness controls
20
20
  *
21
21
  * **Important Notes for bulbul:v3:**
22
22
  * - Pitch and loudness parameters are NOT supported
23
- * - Pace must be between 0.5 and 2.0
23
+ * - Pace range: 0.5 to 2.0
24
24
  * - Preprocessing is automatically enabled
25
25
  * - Default sample rate is 24000 Hz
26
- * - Supports sample rates: 8000, 16000, 22050, 24000, 32000, 44100, 48000 Hz
26
+ * - Supports sample rates: 8000, 16000, 22050, 24000 Hz (REST API also supports 32000, 44100, 48000 Hz)
27
27
  *
28
28
  * @param {SarvamAI.TextToSpeechRequest} request
29
29
  * @param {TextToSpeechClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -55,18 +55,18 @@ class TextToSpeechClient {
55
55
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
56
56
  }
57
57
  /**
58
- * Convert text into spoken audio. The output is a wave file encoded as a base64 string.
58
+ * Convert text into spoken audio. The output is a base64-encoded audio string that must be decoded before use.
59
59
  *
60
60
  * **Available Models:**
61
- * - **bulbul:v2** (default): Supports pitch, loudness, and pace controls
62
- * - **bulbul:v3**: Newer model with improved quality
61
+ * - **bulbul:v3**: Latest model with improved quality, 30+ voices, and temperature control
62
+ * - **bulbul:v2**: Legacy model with pitch and loudness controls
63
63
  *
64
64
  * **Important Notes for bulbul:v3:**
65
65
  * - Pitch and loudness parameters are NOT supported
66
- * - Pace must be between 0.5 and 2.0
66
+ * - Pace range: 0.5 to 2.0
67
67
  * - Preprocessing is automatically enabled
68
68
  * - Default sample rate is 24000 Hz
69
- * - Supports sample rates: 8000, 16000, 22050, 24000, 32000, 44100, 48000 Hz
69
+ * - Supports sample rates: 8000, 16000, 22050, 24000 Hz (REST API also supports 32000, 44100, 48000 Hz)
70
70
  *
71
71
  * @param {SarvamAI.TextToSpeechRequest} request
72
72
  * @param {TextToSpeechClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -14,8 +14,8 @@ export interface TextToSpeechRequest {
14
14
  * - Supports code-mixed text (English and Indic languages)
15
15
  *
16
16
  * **Model-specific limits:**
17
- * - **bulbul:v2:** Max 1500 characters
18
17
  * - **bulbul:v3:** Max 2500 characters
18
+ * - **bulbul:v2:** Max 1500 characters
19
19
  *
20
20
  * **Important Note:**
21
21
  * - For numbers larger than 4 digits, use commas (e.g., '10,000' instead of '10000')
@@ -27,14 +27,14 @@ export interface TextToSpeechRequest {
27
27
  /**
28
28
  * The speaker voice to be used for the output audio.
29
29
  *
30
- * **Default:** Anushka (for bulbul:v2), Shubh (for bulbul:v3)
30
+ * **Default:** Shubh (for bulbul:v3), Anushka (for bulbul:v2)
31
31
  *
32
32
  * **Model Compatibility (Speakers compatible with respective model):**
33
+ * - **bulbul:v3:**
34
+ * - Shubh (default), Aditya, Ritu, Priya, Neha, Rahul, Pooja, Rohan, Simran, Kavya, Amit, Dev, Ishita, Shreya, Ratan, Varun, Manan, Sumit, Roopa, Kabir, Aayan, Ashutosh, Advait, Amelia, Sophia, Anand, Tanya, Tarun, Sunny, Mani, Gokul, Vijay, Shruti, Suhani, Mohit, Kavitha, Rehan, Soham, Rupali
33
35
  * - **bulbul:v2:**
34
36
  * - Female: Anushka, Manisha, Vidya, Arya
35
37
  * - Male: Abhilash, Karun, Hitesh
36
- * - **bulbul:v3:**
37
- * - Shubh (default), Aditya, Ritu, Priya, Neha, Rahul, Pooja, Rohan, Simran, Kavya, Amit, Dev, Ishita, Shreya, Ratan, Varun, Manan, Sumit, Roopa, Kabir, Aayan, Ashutosh, Advait, Amelia, Sophia, Anand, Tanya, Tarun, Sunny, Mani, Gokul, Vijay, Shruti, Suhani, Mohit, Kavitha, Rehan, Soham, Rupali
38
38
  *
39
39
  * **Note:** Speaker selection must match the chosen model version.
40
40
  */
@@ -42,26 +42,28 @@ export interface TextToSpeechRequest {
42
42
  /**
43
43
  * Controls the pitch of the audio. Lower values result in a deeper voice, while higher values make it sharper. The suitable range is between -0.75 and 0.75. Default is 0.0.
44
44
  *
45
- * **Note:** This parameter is only supported for bulbul:v2. It is NOT supported for bulbul:v3 and will cause a validation error if provided.
45
+ * **Note:** This parameter is only supported for bulbul:v2. It is NOT supported for bulbul:v3.
46
46
  */
47
47
  pitch?: number;
48
48
  /**
49
49
  * Controls the speed of the audio. Lower values result in slower speech, while higher values make it faster. Default is 1.0.
50
50
  *
51
51
  * **Model-specific ranges:**
52
- * - **bulbul:v2:** 0.3 to 3.0
53
52
  * - **bulbul:v3:** 0.5 to 2.0
53
+ * - **bulbul:v2:** 0.3 to 3.0
54
54
  */
55
55
  pace?: number;
56
56
  /**
57
57
  * Controls the loudness of the audio. Lower values result in quieter audio, while higher values make it louder. The suitable range is between 0.3 and 3.0. Default is 1.0.
58
58
  *
59
- * **Note:** This parameter is only supported for bulbul:v2. It is NOT supported for bulbul:v3 and will cause a validation error if provided.
59
+ * **Note:** This parameter is only supported for bulbul:v2. It is NOT supported for bulbul:v3.
60
60
  */
61
61
  loudness?: number;
62
62
  /**
63
63
  * Specifies the sample rate of the output audio. Supported values are 8000, 16000, 22050, 24000, 32000, 44100, 48000 Hz.
64
64
  *
65
+ * **Note:** Higher sample rates (32000, 44100, 48000 Hz) are only available with bulbul:v3 via the REST API, not in streaming mode.
66
+ *
65
67
  * **Default:** 24000 Hz
66
68
  */
67
69
  speech_sample_rate?: SarvamAI.SpeechSampleRate;
@@ -69,22 +71,24 @@ export interface TextToSpeechRequest {
69
71
  * Controls whether normalization of English words and numeric entities (e.g., numbers, dates) is performed. Set to true for better handling of mixed-language text.
70
72
  *
71
73
  * **Model-specific behavior:**
74
+ * - **bulbul:v3:** Not Supported
72
75
  * - **bulbul:v2:** Default is false
73
- * - **bulbul:v3:** Automatically enabled (true) and cannot be disabled
74
76
  */
75
77
  enable_preprocessing?: boolean;
76
78
  /**
77
79
  * Specifies the model to use for text-to-speech conversion.
78
80
  *
79
81
  * **Available models:**
80
- * - **bulbul:v2:** Default model with pitch, loudness controls
81
- * - **bulbul:v3:** Newer model with improved quality
82
+ * - **bulbul:v3:** Latest model with improved quality, 30+ voices, pace, and temperature control
83
+ * - **bulbul:v2:** Legacy model with pitch, loudness, and pace controls
82
84
  */
83
85
  model?: SarvamAI.TextToSpeechModel;
84
86
  /** Specifies the audio codec for the output audio file. Different codecs offer various compression and quality characteristics. */
85
87
  output_audio_codec?: SarvamAI.TextToSpeechOutputAudioCodec;
86
88
  /**
87
- * Controls the randomness of the output. Lower values make the output more focused and deterministic, while higher values make it more random. The suitable range is between 0.01 and 1.0. Default is 0.6.
89
+ * Temperature controls how much randomness and expressiveness the TTS model uses while generating speech.
90
+ *
91
+ * Lower values produce more stable and consistent output, while higher values sound more expressive but may introduce artifacts or errors. The suitable range is between 0.01 and 2.0. Default is 0.6.
88
92
  *
89
93
  * **Note:** This parameter is only supported for bulbul:v3. It has no effect on bulbul:v2.
90
94
  */
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * Text to speech model to use.
3
- * - **bulbul:v2** (default): Standard TTS model with pitch/loudness support
4
- * - **bulbul:v3**: Advanced model with improved quality (no pitch/loudness)
3
+ * - **bulbul:v3**: Latest model with improved quality, 30+ voices (no pitch/loudness)
4
+ * - **bulbul:v2** (default): Legacy TTS model with pitch/loudness/pace support
5
5
  */
6
6
  export declare const TextToSpeechStreamingModel: {
7
- readonly BulbulV2: "bulbul:v2";
8
7
  readonly BulbulV3: "bulbul:v3";
8
+ readonly BulbulV2: "bulbul:v2";
9
9
  };
10
10
  export type TextToSpeechStreamingModel = (typeof TextToSpeechStreamingModel)[keyof typeof TextToSpeechStreamingModel];
@@ -4,10 +4,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.TextToSpeechStreamingModel = void 0;
5
5
  /**
6
6
  * Text to speech model to use.
7
- * - **bulbul:v2** (default): Standard TTS model with pitch/loudness support
8
- * - **bulbul:v3**: Advanced model with improved quality (no pitch/loudness)
7
+ * - **bulbul:v3**: Latest model with improved quality, 30+ voices (no pitch/loudness)
8
+ * - **bulbul:v2** (default): Legacy TTS model with pitch/loudness/pace support
9
9
  */
10
10
  exports.TextToSpeechStreamingModel = {
11
- BulbulV2: "bulbul:v2",
12
11
  BulbulV3: "bulbul:v3",
12
+ BulbulV2: "bulbul:v2",
13
13
  };
@@ -5,8 +5,8 @@
5
5
  * will be automatically flushed and processed before applying the new configuration.
6
6
  *
7
7
  * **Model-Specific Notes:**
8
- * - **bulbul:v2:** Supports pitch, loudness, pace (0.3-3.0). Default sample rate: 22050 Hz.
9
- * - **bulbul:v3:** Does NOT support pitch/loudness. Pace range: 0.5-2.0. Default sample rate: 24000 Hz. Supports sample rates: 8000, 16000, 22050, 24000, 32000, 44100, 48000 Hz.
8
+ * - **bulbul:v3:** Latest model with improved quality, 30+ voices, pace (0.5-2.0), and temperature control. Does NOT support pitch or loudness. Default sample rate: 24000 Hz.
9
+ * - **bulbul:v2:** Legacy model. Supports pitch, loudness, pace (0.3-3.0). Default sample rate: 22050 Hz.
10
10
  */
11
11
  export interface ConfigureConnection {
12
12
  type: "config";
@@ -16,8 +16,8 @@ export declare namespace ConfigureConnection {
16
16
  interface Data {
17
17
  /**
18
18
  * Specifies the model to use for text-to-speech conversion.
19
- * - **bulbul:v2** (default): Standard TTS model with pitch/loudness support
20
- * - **bulbul:v3**: Advanced model with improved quality (no pitch/loudness)
19
+ * - **bulbul:v3**: Latest model with improved quality, 30+ voices (no pitch/loudness)
20
+ * - **bulbul:v2** (default): Legacy TTS model with pitch/loudness/pace support
21
21
  */
22
22
  model?: Data.Model;
23
23
  /** The language code in BCP-47 format. Primarily used by the pre-TTS text normalization model to handle language-specific text processing such as number formatting, abbreviations, and special characters. */
@@ -26,8 +26,8 @@ export declare namespace ConfigureConnection {
26
26
  * The speaker voice to be used for the output audio.
27
27
  *
28
28
  * **Model Compatibility:**
29
- * - **bulbul:v2:** anushka (default), abhilash, manisha, vidya, arya, karun, hitesh
30
29
  * - **bulbul:v3:** shubh (default), aditya, ritu, priya, neha, rahul, pooja, rohan, simran, kavya, amit, dev, ishita, shreya, ratan, varun, manan, sumit, roopa, kabir, aayan, ashutosh, advait, amelia, sophia, anand, tanya, tarun, sunny, mani, gokul, vijay, shruti, suhani, mohit, kavitha, rehan, soham, rupali
30
+ * - **bulbul:v2:** anushka (default), abhilash, manisha, vidya, arya, karun, hitesh
31
31
  *
32
32
  * **Note:** Speaker selection must match the chosen model version.
33
33
  */
@@ -45,8 +45,8 @@ export declare namespace ConfigureConnection {
45
45
  * while higher values make it faster. Default is 1.0.
46
46
  *
47
47
  * **Model-specific ranges:**
48
- * - **bulbul:v2:** 0.3 to 3.0
49
48
  * - **bulbul:v3:** 0.5 to 2.0
49
+ * - **bulbul:v2:** 0.3 to 3.0
50
50
  */
51
51
  pace?: number;
52
52
  /**
@@ -66,8 +66,10 @@ export declare namespace ConfigureConnection {
66
66
  */
67
67
  temperature?: number;
68
68
  /**
69
- * Specifies the sample rate of the output audio. Supported values are
70
- * 8000, 16000, 22050, 24000, 32000, 44100, 48000 Hz.
69
+ * Specifies the sample rate of the output audio. For streaming, supported values are
70
+ * 8000, 16000, 22050, 24000 Hz.
71
+ *
72
+ * **Note:** Higher sample rates (32000, 44100, 48000 Hz) are only available with bulbul:v3 via the REST API, not in streaming mode.
71
73
  *
72
74
  * **Default:** 24000 Hz
73
75
  */
@@ -92,12 +94,12 @@ export declare namespace ConfigureConnection {
92
94
  namespace Data {
93
95
  /**
94
96
  * Specifies the model to use for text-to-speech conversion.
95
- * - **bulbul:v2** (default): Standard TTS model with pitch/loudness support
96
- * - **bulbul:v3**: Advanced model with improved quality (no pitch/loudness)
97
+ * - **bulbul:v3**: Latest model with improved quality, 30+ voices (no pitch/loudness)
98
+ * - **bulbul:v2** (default): Legacy TTS model with pitch/loudness/pace support
97
99
  */
98
100
  const Model: {
99
- readonly BulbulV2: "bulbul:v2";
100
101
  readonly BulbulV3: "bulbul:v3";
102
+ readonly BulbulV2: "bulbul:v2";
101
103
  };
102
104
  type Model = (typeof Model)[keyof typeof Model];
103
105
  /** The language code in BCP-47 format. Primarily used by the pre-TTS text normalization model to handle language-specific text processing such as number formatting, abbreviations, and special characters. */
@@ -119,8 +121,8 @@ export declare namespace ConfigureConnection {
119
121
  * The speaker voice to be used for the output audio.
120
122
  *
121
123
  * **Model Compatibility:**
122
- * - **bulbul:v2:** anushka (default), abhilash, manisha, vidya, arya, karun, hitesh
123
124
  * - **bulbul:v3:** shubh (default), aditya, ritu, priya, neha, rahul, pooja, rohan, simran, kavya, amit, dev, ishita, shreya, ratan, varun, manan, sumit, roopa, kabir, aayan, ashutosh, advait, amelia, sophia, anand, tanya, tarun, sunny, mani, gokul, vijay, shruti, suhani, mohit, kavitha, rehan, soham, rupali
125
+ * - **bulbul:v2:** anushka (default), abhilash, manisha, vidya, arya, karun, hitesh
124
126
  *
125
127
  * **Note:** Speaker selection must match the chosen model version.
126
128
  */
@@ -8,12 +8,12 @@ var ConfigureConnection;
8
8
  (function (Data) {
9
9
  /**
10
10
  * Specifies the model to use for text-to-speech conversion.
11
- * - **bulbul:v2** (default): Standard TTS model with pitch/loudness support
12
- * - **bulbul:v3**: Advanced model with improved quality (no pitch/loudness)
11
+ * - **bulbul:v3**: Latest model with improved quality, 30+ voices (no pitch/loudness)
12
+ * - **bulbul:v2** (default): Legacy TTS model with pitch/loudness/pace support
13
13
  */
14
14
  Data.Model = {
15
- BulbulV2: "bulbul:v2",
16
15
  BulbulV3: "bulbul:v3",
16
+ BulbulV2: "bulbul:v2",
17
17
  };
18
18
  /** The language code in BCP-47 format. Primarily used by the pre-TTS text normalization model to handle language-specific text processing such as number formatting, abbreviations, and special characters. */
19
19
  Data.TargetLanguageCode = {
@@ -33,8 +33,8 @@ var ConfigureConnection;
33
33
  * The speaker voice to be used for the output audio.
34
34
  *
35
35
  * **Model Compatibility:**
36
- * - **bulbul:v2:** anushka (default), abhilash, manisha, vidya, arya, karun, hitesh
37
36
  * - **bulbul:v3:** shubh (default), aditya, ritu, priya, neha, rahul, pooja, rohan, simran, kavya, amit, dev, ishita, shreya, ratan, varun, manan, sumit, roopa, kabir, aayan, ashutosh, advait, amelia, sophia, anand, tanya, tarun, sunny, mani, gokul, vijay, shruti, suhani, mohit, kavitha, rehan, soham, rupali
37
+ * - **bulbul:v2:** anushka (default), abhilash, manisha, vidya, arya, karun, hitesh
38
38
  *
39
39
  * **Note:** Speaker selection must match the chosen model version.
40
40
  */
@@ -1,5 +1,5 @@
1
1
  export declare const TextToSpeechModel: {
2
- readonly BulbulV2: "bulbul:v2";
3
2
  readonly BulbulV3: "bulbul:v3";
3
+ readonly BulbulV2: "bulbul:v2";
4
4
  };
5
5
  export type TextToSpeechModel = (typeof TextToSpeechModel)[keyof typeof TextToSpeechModel];
@@ -3,6 +3,6 @@
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.TextToSpeechModel = void 0;
5
5
  exports.TextToSpeechModel = {
6
- BulbulV2: "bulbul:v2",
7
6
  BulbulV3: "bulbul:v3",
7
+ BulbulV2: "bulbul:v2",
8
8
  };
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.1.3-alpha.1";
1
+ export declare const SDK_VERSION = "1.1.3";
@@ -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 = "1.1.3-alpha.1";
4
+ exports.SDK_VERSION = "1.1.3";
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
6
6
  const headers = mergeHeaders({
7
7
  "X-Fern-Language": "JavaScript",
8
8
  "X-Fern-SDK-Name": "sarvamai",
9
- "X-Fern-SDK-Version": "1.1.3-alpha.1",
10
- "User-Agent": "sarvamai/1.1.3-alpha.1",
9
+ "X-Fern-SDK-Version": "1.1.3",
10
+ "User-Agent": "sarvamai/1.1.3",
11
11
  "X-Fern-Runtime": core.RUNTIME.type,
12
12
  "X-Fern-Runtime-Version": core.RUNTIME.version,
13
13
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -12,18 +12,18 @@ export declare class TextToSpeechClient {
12
12
  protected readonly _options: NormalizedClientOptionsWithAuth<TextToSpeechClient.Options>;
13
13
  constructor(options?: TextToSpeechClient.Options);
14
14
  /**
15
- * Convert text into spoken audio. The output is a wave file encoded as a base64 string.
15
+ * Convert text into spoken audio. The output is a base64-encoded audio string that must be decoded before use.
16
16
  *
17
17
  * **Available Models:**
18
- * - **bulbul:v2** (default): Supports pitch, loudness, and pace controls
19
- * - **bulbul:v3**: Newer model with improved quality
18
+ * - **bulbul:v3**: Latest model with improved quality, 30+ voices, and temperature control
19
+ * - **bulbul:v2**: Legacy model with pitch and loudness controls
20
20
  *
21
21
  * **Important Notes for bulbul:v3:**
22
22
  * - Pitch and loudness parameters are NOT supported
23
- * - Pace must be between 0.5 and 2.0
23
+ * - Pace range: 0.5 to 2.0
24
24
  * - Preprocessing is automatically enabled
25
25
  * - Default sample rate is 24000 Hz
26
- * - Supports sample rates: 8000, 16000, 22050, 24000, 32000, 44100, 48000 Hz
26
+ * - Supports sample rates: 8000, 16000, 22050, 24000 Hz (REST API also supports 32000, 44100, 48000 Hz)
27
27
  *
28
28
  * @param {SarvamAI.TextToSpeechRequest} request
29
29
  * @param {TextToSpeechClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -19,18 +19,18 @@ export class TextToSpeechClient {
19
19
  this._options = normalizeClientOptionsWithAuth(options);
20
20
  }
21
21
  /**
22
- * Convert text into spoken audio. The output is a wave file encoded as a base64 string.
22
+ * Convert text into spoken audio. The output is a base64-encoded audio string that must be decoded before use.
23
23
  *
24
24
  * **Available Models:**
25
- * - **bulbul:v2** (default): Supports pitch, loudness, and pace controls
26
- * - **bulbul:v3**: Newer model with improved quality
25
+ * - **bulbul:v3**: Latest model with improved quality, 30+ voices, and temperature control
26
+ * - **bulbul:v2**: Legacy model with pitch and loudness controls
27
27
  *
28
28
  * **Important Notes for bulbul:v3:**
29
29
  * - Pitch and loudness parameters are NOT supported
30
- * - Pace must be between 0.5 and 2.0
30
+ * - Pace range: 0.5 to 2.0
31
31
  * - Preprocessing is automatically enabled
32
32
  * - Default sample rate is 24000 Hz
33
- * - Supports sample rates: 8000, 16000, 22050, 24000, 32000, 44100, 48000 Hz
33
+ * - Supports sample rates: 8000, 16000, 22050, 24000 Hz (REST API also supports 32000, 44100, 48000 Hz)
34
34
  *
35
35
  * @param {SarvamAI.TextToSpeechRequest} request
36
36
  * @param {TextToSpeechClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -14,8 +14,8 @@ export interface TextToSpeechRequest {
14
14
  * - Supports code-mixed text (English and Indic languages)
15
15
  *
16
16
  * **Model-specific limits:**
17
- * - **bulbul:v2:** Max 1500 characters
18
17
  * - **bulbul:v3:** Max 2500 characters
18
+ * - **bulbul:v2:** Max 1500 characters
19
19
  *
20
20
  * **Important Note:**
21
21
  * - For numbers larger than 4 digits, use commas (e.g., '10,000' instead of '10000')
@@ -27,14 +27,14 @@ export interface TextToSpeechRequest {
27
27
  /**
28
28
  * The speaker voice to be used for the output audio.
29
29
  *
30
- * **Default:** Anushka (for bulbul:v2), Shubh (for bulbul:v3)
30
+ * **Default:** Shubh (for bulbul:v3), Anushka (for bulbul:v2)
31
31
  *
32
32
  * **Model Compatibility (Speakers compatible with respective model):**
33
+ * - **bulbul:v3:**
34
+ * - Shubh (default), Aditya, Ritu, Priya, Neha, Rahul, Pooja, Rohan, Simran, Kavya, Amit, Dev, Ishita, Shreya, Ratan, Varun, Manan, Sumit, Roopa, Kabir, Aayan, Ashutosh, Advait, Amelia, Sophia, Anand, Tanya, Tarun, Sunny, Mani, Gokul, Vijay, Shruti, Suhani, Mohit, Kavitha, Rehan, Soham, Rupali
33
35
  * - **bulbul:v2:**
34
36
  * - Female: Anushka, Manisha, Vidya, Arya
35
37
  * - Male: Abhilash, Karun, Hitesh
36
- * - **bulbul:v3:**
37
- * - Shubh (default), Aditya, Ritu, Priya, Neha, Rahul, Pooja, Rohan, Simran, Kavya, Amit, Dev, Ishita, Shreya, Ratan, Varun, Manan, Sumit, Roopa, Kabir, Aayan, Ashutosh, Advait, Amelia, Sophia, Anand, Tanya, Tarun, Sunny, Mani, Gokul, Vijay, Shruti, Suhani, Mohit, Kavitha, Rehan, Soham, Rupali
38
38
  *
39
39
  * **Note:** Speaker selection must match the chosen model version.
40
40
  */
@@ -42,26 +42,28 @@ export interface TextToSpeechRequest {
42
42
  /**
43
43
  * Controls the pitch of the audio. Lower values result in a deeper voice, while higher values make it sharper. The suitable range is between -0.75 and 0.75. Default is 0.0.
44
44
  *
45
- * **Note:** This parameter is only supported for bulbul:v2. It is NOT supported for bulbul:v3 and will cause a validation error if provided.
45
+ * **Note:** This parameter is only supported for bulbul:v2. It is NOT supported for bulbul:v3.
46
46
  */
47
47
  pitch?: number;
48
48
  /**
49
49
  * Controls the speed of the audio. Lower values result in slower speech, while higher values make it faster. Default is 1.0.
50
50
  *
51
51
  * **Model-specific ranges:**
52
- * - **bulbul:v2:** 0.3 to 3.0
53
52
  * - **bulbul:v3:** 0.5 to 2.0
53
+ * - **bulbul:v2:** 0.3 to 3.0
54
54
  */
55
55
  pace?: number;
56
56
  /**
57
57
  * Controls the loudness of the audio. Lower values result in quieter audio, while higher values make it louder. The suitable range is between 0.3 and 3.0. Default is 1.0.
58
58
  *
59
- * **Note:** This parameter is only supported for bulbul:v2. It is NOT supported for bulbul:v3 and will cause a validation error if provided.
59
+ * **Note:** This parameter is only supported for bulbul:v2. It is NOT supported for bulbul:v3.
60
60
  */
61
61
  loudness?: number;
62
62
  /**
63
63
  * Specifies the sample rate of the output audio. Supported values are 8000, 16000, 22050, 24000, 32000, 44100, 48000 Hz.
64
64
  *
65
+ * **Note:** Higher sample rates (32000, 44100, 48000 Hz) are only available with bulbul:v3 via the REST API, not in streaming mode.
66
+ *
65
67
  * **Default:** 24000 Hz
66
68
  */
67
69
  speech_sample_rate?: SarvamAI.SpeechSampleRate;
@@ -69,22 +71,24 @@ export interface TextToSpeechRequest {
69
71
  * Controls whether normalization of English words and numeric entities (e.g., numbers, dates) is performed. Set to true for better handling of mixed-language text.
70
72
  *
71
73
  * **Model-specific behavior:**
74
+ * - **bulbul:v3:** Not Supported
72
75
  * - **bulbul:v2:** Default is false
73
- * - **bulbul:v3:** Automatically enabled (true) and cannot be disabled
74
76
  */
75
77
  enable_preprocessing?: boolean;
76
78
  /**
77
79
  * Specifies the model to use for text-to-speech conversion.
78
80
  *
79
81
  * **Available models:**
80
- * - **bulbul:v2:** Default model with pitch, loudness controls
81
- * - **bulbul:v3:** Newer model with improved quality
82
+ * - **bulbul:v3:** Latest model with improved quality, 30+ voices, pace, and temperature control
83
+ * - **bulbul:v2:** Legacy model with pitch, loudness, and pace controls
82
84
  */
83
85
  model?: SarvamAI.TextToSpeechModel;
84
86
  /** Specifies the audio codec for the output audio file. Different codecs offer various compression and quality characteristics. */
85
87
  output_audio_codec?: SarvamAI.TextToSpeechOutputAudioCodec;
86
88
  /**
87
- * Controls the randomness of the output. Lower values make the output more focused and deterministic, while higher values make it more random. The suitable range is between 0.01 and 1.0. Default is 0.6.
89
+ * Temperature controls how much randomness and expressiveness the TTS model uses while generating speech.
90
+ *
91
+ * Lower values produce more stable and consistent output, while higher values sound more expressive but may introduce artifacts or errors. The suitable range is between 0.01 and 2.0. Default is 0.6.
88
92
  *
89
93
  * **Note:** This parameter is only supported for bulbul:v3. It has no effect on bulbul:v2.
90
94
  */
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * Text to speech model to use.
3
- * - **bulbul:v2** (default): Standard TTS model with pitch/loudness support
4
- * - **bulbul:v3**: Advanced model with improved quality (no pitch/loudness)
3
+ * - **bulbul:v3**: Latest model with improved quality, 30+ voices (no pitch/loudness)
4
+ * - **bulbul:v2** (default): Legacy TTS model with pitch/loudness/pace support
5
5
  */
6
6
  export declare const TextToSpeechStreamingModel: {
7
- readonly BulbulV2: "bulbul:v2";
8
7
  readonly BulbulV3: "bulbul:v3";
8
+ readonly BulbulV2: "bulbul:v2";
9
9
  };
10
10
  export type TextToSpeechStreamingModel = (typeof TextToSpeechStreamingModel)[keyof typeof TextToSpeechStreamingModel];
@@ -1,10 +1,10 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
2
  /**
3
3
  * Text to speech model to use.
4
- * - **bulbul:v2** (default): Standard TTS model with pitch/loudness support
5
- * - **bulbul:v3**: Advanced model with improved quality (no pitch/loudness)
4
+ * - **bulbul:v3**: Latest model with improved quality, 30+ voices (no pitch/loudness)
5
+ * - **bulbul:v2** (default): Legacy TTS model with pitch/loudness/pace support
6
6
  */
7
7
  export const TextToSpeechStreamingModel = {
8
- BulbulV2: "bulbul:v2",
9
8
  BulbulV3: "bulbul:v3",
9
+ BulbulV2: "bulbul:v2",
10
10
  };
@@ -5,8 +5,8 @@
5
5
  * will be automatically flushed and processed before applying the new configuration.
6
6
  *
7
7
  * **Model-Specific Notes:**
8
- * - **bulbul:v2:** Supports pitch, loudness, pace (0.3-3.0). Default sample rate: 22050 Hz.
9
- * - **bulbul:v3:** Does NOT support pitch/loudness. Pace range: 0.5-2.0. Default sample rate: 24000 Hz. Supports sample rates: 8000, 16000, 22050, 24000, 32000, 44100, 48000 Hz.
8
+ * - **bulbul:v3:** Latest model with improved quality, 30+ voices, pace (0.5-2.0), and temperature control. Does NOT support pitch or loudness. Default sample rate: 24000 Hz.
9
+ * - **bulbul:v2:** Legacy model. Supports pitch, loudness, pace (0.3-3.0). Default sample rate: 22050 Hz.
10
10
  */
11
11
  export interface ConfigureConnection {
12
12
  type: "config";
@@ -16,8 +16,8 @@ export declare namespace ConfigureConnection {
16
16
  interface Data {
17
17
  /**
18
18
  * Specifies the model to use for text-to-speech conversion.
19
- * - **bulbul:v2** (default): Standard TTS model with pitch/loudness support
20
- * - **bulbul:v3**: Advanced model with improved quality (no pitch/loudness)
19
+ * - **bulbul:v3**: Latest model with improved quality, 30+ voices (no pitch/loudness)
20
+ * - **bulbul:v2** (default): Legacy TTS model with pitch/loudness/pace support
21
21
  */
22
22
  model?: Data.Model;
23
23
  /** The language code in BCP-47 format. Primarily used by the pre-TTS text normalization model to handle language-specific text processing such as number formatting, abbreviations, and special characters. */
@@ -26,8 +26,8 @@ export declare namespace ConfigureConnection {
26
26
  * The speaker voice to be used for the output audio.
27
27
  *
28
28
  * **Model Compatibility:**
29
- * - **bulbul:v2:** anushka (default), abhilash, manisha, vidya, arya, karun, hitesh
30
29
  * - **bulbul:v3:** shubh (default), aditya, ritu, priya, neha, rahul, pooja, rohan, simran, kavya, amit, dev, ishita, shreya, ratan, varun, manan, sumit, roopa, kabir, aayan, ashutosh, advait, amelia, sophia, anand, tanya, tarun, sunny, mani, gokul, vijay, shruti, suhani, mohit, kavitha, rehan, soham, rupali
30
+ * - **bulbul:v2:** anushka (default), abhilash, manisha, vidya, arya, karun, hitesh
31
31
  *
32
32
  * **Note:** Speaker selection must match the chosen model version.
33
33
  */
@@ -45,8 +45,8 @@ export declare namespace ConfigureConnection {
45
45
  * while higher values make it faster. Default is 1.0.
46
46
  *
47
47
  * **Model-specific ranges:**
48
- * - **bulbul:v2:** 0.3 to 3.0
49
48
  * - **bulbul:v3:** 0.5 to 2.0
49
+ * - **bulbul:v2:** 0.3 to 3.0
50
50
  */
51
51
  pace?: number;
52
52
  /**
@@ -66,8 +66,10 @@ export declare namespace ConfigureConnection {
66
66
  */
67
67
  temperature?: number;
68
68
  /**
69
- * Specifies the sample rate of the output audio. Supported values are
70
- * 8000, 16000, 22050, 24000, 32000, 44100, 48000 Hz.
69
+ * Specifies the sample rate of the output audio. For streaming, supported values are
70
+ * 8000, 16000, 22050, 24000 Hz.
71
+ *
72
+ * **Note:** Higher sample rates (32000, 44100, 48000 Hz) are only available with bulbul:v3 via the REST API, not in streaming mode.
71
73
  *
72
74
  * **Default:** 24000 Hz
73
75
  */
@@ -92,12 +94,12 @@ export declare namespace ConfigureConnection {
92
94
  namespace Data {
93
95
  /**
94
96
  * Specifies the model to use for text-to-speech conversion.
95
- * - **bulbul:v2** (default): Standard TTS model with pitch/loudness support
96
- * - **bulbul:v3**: Advanced model with improved quality (no pitch/loudness)
97
+ * - **bulbul:v3**: Latest model with improved quality, 30+ voices (no pitch/loudness)
98
+ * - **bulbul:v2** (default): Legacy TTS model with pitch/loudness/pace support
97
99
  */
98
100
  const Model: {
99
- readonly BulbulV2: "bulbul:v2";
100
101
  readonly BulbulV3: "bulbul:v3";
102
+ readonly BulbulV2: "bulbul:v2";
101
103
  };
102
104
  type Model = (typeof Model)[keyof typeof Model];
103
105
  /** The language code in BCP-47 format. Primarily used by the pre-TTS text normalization model to handle language-specific text processing such as number formatting, abbreviations, and special characters. */
@@ -119,8 +121,8 @@ export declare namespace ConfigureConnection {
119
121
  * The speaker voice to be used for the output audio.
120
122
  *
121
123
  * **Model Compatibility:**
122
- * - **bulbul:v2:** anushka (default), abhilash, manisha, vidya, arya, karun, hitesh
123
124
  * - **bulbul:v3:** shubh (default), aditya, ritu, priya, neha, rahul, pooja, rohan, simran, kavya, amit, dev, ishita, shreya, ratan, varun, manan, sumit, roopa, kabir, aayan, ashutosh, advait, amelia, sophia, anand, tanya, tarun, sunny, mani, gokul, vijay, shruti, suhani, mohit, kavitha, rehan, soham, rupali
125
+ * - **bulbul:v2:** anushka (default), abhilash, manisha, vidya, arya, karun, hitesh
124
126
  *
125
127
  * **Note:** Speaker selection must match the chosen model version.
126
128
  */
@@ -5,12 +5,12 @@ export var ConfigureConnection;
5
5
  (function (Data) {
6
6
  /**
7
7
  * Specifies the model to use for text-to-speech conversion.
8
- * - **bulbul:v2** (default): Standard TTS model with pitch/loudness support
9
- * - **bulbul:v3**: Advanced model with improved quality (no pitch/loudness)
8
+ * - **bulbul:v3**: Latest model with improved quality, 30+ voices (no pitch/loudness)
9
+ * - **bulbul:v2** (default): Legacy TTS model with pitch/loudness/pace support
10
10
  */
11
11
  Data.Model = {
12
- BulbulV2: "bulbul:v2",
13
12
  BulbulV3: "bulbul:v3",
13
+ BulbulV2: "bulbul:v2",
14
14
  };
15
15
  /** The language code in BCP-47 format. Primarily used by the pre-TTS text normalization model to handle language-specific text processing such as number formatting, abbreviations, and special characters. */
16
16
  Data.TargetLanguageCode = {
@@ -30,8 +30,8 @@ export var ConfigureConnection;
30
30
  * The speaker voice to be used for the output audio.
31
31
  *
32
32
  * **Model Compatibility:**
33
- * - **bulbul:v2:** anushka (default), abhilash, manisha, vidya, arya, karun, hitesh
34
33
  * - **bulbul:v3:** shubh (default), aditya, ritu, priya, neha, rahul, pooja, rohan, simran, kavya, amit, dev, ishita, shreya, ratan, varun, manan, sumit, roopa, kabir, aayan, ashutosh, advait, amelia, sophia, anand, tanya, tarun, sunny, mani, gokul, vijay, shruti, suhani, mohit, kavitha, rehan, soham, rupali
34
+ * - **bulbul:v2:** anushka (default), abhilash, manisha, vidya, arya, karun, hitesh
35
35
  *
36
36
  * **Note:** Speaker selection must match the chosen model version.
37
37
  */
@@ -1,5 +1,5 @@
1
1
  export declare const TextToSpeechModel: {
2
- readonly BulbulV2: "bulbul:v2";
3
2
  readonly BulbulV3: "bulbul:v3";
3
+ readonly BulbulV2: "bulbul:v2";
4
4
  };
5
5
  export type TextToSpeechModel = (typeof TextToSpeechModel)[keyof typeof TextToSpeechModel];
@@ -1,5 +1,5 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
2
  export const TextToSpeechModel = {
3
- BulbulV2: "bulbul:v2",
4
3
  BulbulV3: "bulbul:v3",
4
+ BulbulV2: "bulbul:v2",
5
5
  };
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.1.3-alpha.1";
1
+ export declare const SDK_VERSION = "1.1.3";
@@ -1 +1 @@
1
- export const SDK_VERSION = "1.1.3-alpha.1";
1
+ export const SDK_VERSION = "1.1.3";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sarvamai",
3
- "version": "1.1.3-alpha.1",
3
+ "version": "1.1.3",
4
4
  "private": false,
5
5
  "repository": "github:sarvamai/sarvam-javascript-sdk",
6
6
  "type": "commonjs",
package/reference.md CHANGED
@@ -419,18 +419,18 @@ await client.speechToText.translate({
419
419
  <dl>
420
420
  <dd>
421
421
 
422
- Convert text into spoken audio. The output is a wave file encoded as a base64 string.
422
+ Convert text into spoken audio. The output is a base64-encoded audio string that must be decoded before use.
423
423
 
424
424
  **Available Models:**
425
- - **bulbul:v2** (default): Supports pitch, loudness, and pace controls
426
- - **bulbul:v3**: Newer model with improved quality
425
+ - **bulbul:v3**: Latest model with improved quality, 30+ voices, and temperature control
426
+ - **bulbul:v2**: Legacy model with pitch and loudness controls
427
427
 
428
428
  **Important Notes for bulbul:v3:**
429
429
  - Pitch and loudness parameters are NOT supported
430
- - Pace must be between 0.5 and 2.0
430
+ - Pace range: 0.5 to 2.0
431
431
  - Preprocessing is automatically enabled
432
432
  - Default sample rate is 24000 Hz
433
- - Supports sample rates: 8000, 16000, 22050, 24000, 32000, 44100, 48000 Hz
433
+ - Supports sample rates: 8000, 16000, 22050, 24000 Hz (REST API also supports 32000, 44100, 48000 Hz)
434
434
  </dd>
435
435
  </dl>
436
436
  </dd>