sarvamai 1.1.2 → 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.
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/textToSpeech/client/Client.d.ts +6 -6
- package/dist/cjs/api/resources/textToSpeech/client/Client.js +6 -6
- package/dist/cjs/api/resources/textToSpeech/client/requests/TextToSpeechRequest.d.ts +19 -17
- package/dist/cjs/api/resources/textToSpeechStreaming/types/TextToSpeechStreamingModel.d.ts +3 -3
- package/dist/cjs/api/resources/textToSpeechStreaming/types/TextToSpeechStreamingModel.js +3 -3
- package/dist/cjs/api/types/ConfigureConnection.d.ts +34 -22
- package/dist/cjs/api/types/ConfigureConnection.js +19 -5
- package/dist/cjs/api/types/TextToSpeechModel.d.ts +1 -1
- package/dist/cjs/api/types/TextToSpeechModel.js +1 -1
- package/dist/cjs/api/types/TextToSpeechSpeaker.d.ts +14 -0
- package/dist/cjs/api/types/TextToSpeechSpeaker.js +14 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/textToSpeech/client/Client.d.mts +6 -6
- package/dist/esm/api/resources/textToSpeech/client/Client.mjs +6 -6
- package/dist/esm/api/resources/textToSpeech/client/requests/TextToSpeechRequest.d.mts +19 -17
- package/dist/esm/api/resources/textToSpeechStreaming/types/TextToSpeechStreamingModel.d.mts +3 -3
- package/dist/esm/api/resources/textToSpeechStreaming/types/TextToSpeechStreamingModel.mjs +3 -3
- package/dist/esm/api/types/ConfigureConnection.d.mts +34 -22
- package/dist/esm/api/types/ConfigureConnection.mjs +19 -5
- package/dist/esm/api/types/TextToSpeechModel.d.mts +1 -1
- package/dist/esm/api/types/TextToSpeechModel.mjs +1 -1
- package/dist/esm/api/types/TextToSpeechSpeaker.d.mts +14 -0
- package/dist/esm/api/types/TextToSpeechSpeaker.mjs +14 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +6 -6
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -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.
|
|
47
|
-
"User-Agent": "sarvamai/1.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
|
|
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:
|
|
19
|
-
* - **bulbul:
|
|
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
|
-
* **Important Notes for bulbul:v3
|
|
21
|
+
* **Important Notes for bulbul:v3:**
|
|
22
22
|
* - Pitch and loudness parameters are NOT supported
|
|
23
|
-
* - Pace
|
|
23
|
+
* - Pace range: 0.5 to 2.0
|
|
24
24
|
* - Preprocessing is automatically enabled
|
|
25
25
|
* - Default sample rate is 24000 Hz
|
|
26
|
-
* -
|
|
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
|
|
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:
|
|
62
|
-
* - **bulbul:
|
|
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
|
-
* **Important Notes for bulbul:v3
|
|
64
|
+
* **Important Notes for bulbul:v3:**
|
|
65
65
|
* - Pitch and loudness parameters are NOT supported
|
|
66
|
-
* - Pace
|
|
66
|
+
* - Pace range: 0.5 to 2.0
|
|
67
67
|
* - Preprocessing is automatically enabled
|
|
68
68
|
* - Default sample rate is 24000 Hz
|
|
69
|
-
* -
|
|
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,27 +14,27 @@ export interface TextToSpeechRequest {
|
|
|
14
14
|
* - Supports code-mixed text (English and Indic languages)
|
|
15
15
|
*
|
|
16
16
|
* **Model-specific limits:**
|
|
17
|
+
* - **bulbul:v3:** Max 2500 characters
|
|
17
18
|
* - **bulbul:v2:** Max 1500 characters
|
|
18
|
-
* - **bulbul:v3-beta:** Max 2500 characters
|
|
19
19
|
*
|
|
20
20
|
* **Important Note:**
|
|
21
21
|
* - For numbers larger than 4 digits, use commas (e.g., '10,000' instead of '10000')
|
|
22
22
|
* - This ensures proper pronunciation as a whole number
|
|
23
23
|
*/
|
|
24
24
|
text: string;
|
|
25
|
-
/** The language
|
|
25
|
+
/** The language code in BCP-47 format. This parameter is primarily used by the pre-TTS text normalization model to handle language-specific text processing such as number formatting, abbreviations, and special characters. */
|
|
26
26
|
target_language_code: SarvamAI.TextToSpeechLanguage;
|
|
27
27
|
/**
|
|
28
28
|
* The speaker voice to be used for the output audio.
|
|
29
29
|
*
|
|
30
|
-
* **Default:**
|
|
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-beta:**
|
|
37
|
-
* - Aditya, Ritu, Priya, Neha, Rahul, Pooja, Rohan, Simran, Kavya, Amit, Dev, Ishita, Shreya, Ratan, Varun, Manan, Sumit, Roopa, Kabir, Aayan, Shubh, Ashutosh, Advait, Amelia, Sophia
|
|
38
38
|
*
|
|
39
39
|
* **Note:** Speaker selection must match the chosen model version.
|
|
40
40
|
*/
|
|
@@ -42,53 +42,55 @@ 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
|
|
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:v3:** 0.5 to 2.0
|
|
52
53
|
* - **bulbul:v2:** 0.3 to 3.0
|
|
53
|
-
* - **bulbul:v3-beta:** 0.5 to 2.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
|
|
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
|
-
* Specifies the sample rate of the output audio. Supported values are 8000, 16000, 22050, 24000 Hz.
|
|
63
|
+
* Specifies the sample rate of the output audio. Supported values are 8000, 16000, 22050, 24000, 32000, 44100, 48000 Hz.
|
|
64
64
|
*
|
|
65
|
-
* **
|
|
66
|
-
*
|
|
67
|
-
*
|
|
65
|
+
* **Note:** Higher sample rates (32000, 44100, 48000 Hz) are only available with bulbul:v3 via the REST API, not in streaming mode.
|
|
66
|
+
*
|
|
67
|
+
* **Default:** 24000 Hz
|
|
68
68
|
*/
|
|
69
69
|
speech_sample_rate?: SarvamAI.SpeechSampleRate;
|
|
70
70
|
/**
|
|
71
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.
|
|
72
72
|
*
|
|
73
73
|
* **Model-specific behavior:**
|
|
74
|
+
* - **bulbul:v3:** Not Supported
|
|
74
75
|
* - **bulbul:v2:** Default is false
|
|
75
|
-
* - **bulbul:v3-beta:** Automatically enabled (true) and cannot be disabled
|
|
76
76
|
*/
|
|
77
77
|
enable_preprocessing?: boolean;
|
|
78
78
|
/**
|
|
79
79
|
* Specifies the model to use for text-to-speech conversion.
|
|
80
80
|
*
|
|
81
81
|
* **Available models:**
|
|
82
|
-
* - **bulbul:
|
|
83
|
-
* - **bulbul:
|
|
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
|
|
84
84
|
*/
|
|
85
85
|
model?: SarvamAI.TextToSpeechModel;
|
|
86
86
|
/** Specifies the audio codec for the output audio file. Different codecs offer various compression and quality characteristics. */
|
|
87
87
|
output_audio_codec?: SarvamAI.TextToSpeechOutputAudioCodec;
|
|
88
88
|
/**
|
|
89
|
-
*
|
|
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.
|
|
90
92
|
*
|
|
91
|
-
* **Note:** This parameter is only supported for bulbul:v3
|
|
93
|
+
* **Note:** This parameter is only supported for bulbul:v3. It has no effect on bulbul:v2.
|
|
92
94
|
*/
|
|
93
95
|
temperature?: number;
|
|
94
96
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Text to speech model to use.
|
|
3
|
-
* - **bulbul:
|
|
4
|
-
* - **bulbul:
|
|
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 BulbulV3: "bulbul:v3";
|
|
7
8
|
readonly BulbulV2: "bulbul:v2";
|
|
8
|
-
readonly BulbulV3Beta: "bulbul:v3-beta";
|
|
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:
|
|
8
|
-
* - **bulbul:
|
|
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
|
+
BulbulV3: "bulbul:v3",
|
|
11
12
|
BulbulV2: "bulbul:v2",
|
|
12
|
-
BulbulV3Beta: "bulbul:v3-beta",
|
|
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:
|
|
9
|
-
* - **bulbul:
|
|
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,18 +16,18 @@ export declare namespace ConfigureConnection {
|
|
|
16
16
|
interface Data {
|
|
17
17
|
/**
|
|
18
18
|
* Specifies the model to use for text-to-speech conversion.
|
|
19
|
-
* - **bulbul:
|
|
20
|
-
* - **bulbul:
|
|
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
|
-
/** The language
|
|
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. */
|
|
24
24
|
target_language_code: Data.TargetLanguageCode;
|
|
25
25
|
/**
|
|
26
26
|
* The speaker voice to be used for the output audio.
|
|
27
27
|
*
|
|
28
28
|
* **Model Compatibility:**
|
|
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
|
|
29
30
|
* - **bulbul:v2:** anushka (default), abhilash, manisha, vidya, arya, karun, hitesh
|
|
30
|
-
* - **bulbul:v3-beta:** aditya (default), ritu, priya, neha, rahul, pooja, rohan, simran, kavya, amit, dev, ishita, shreya, ratan, varun, manan, sumit, roopa, kabir, aayan, shubh, ashutosh, advait, amelia, sophia
|
|
31
31
|
*
|
|
32
32
|
* **Note:** Speaker selection must match the chosen model version.
|
|
33
33
|
*/
|
|
@@ -37,7 +37,7 @@ export declare namespace ConfigureConnection {
|
|
|
37
37
|
* while higher values make it sharper. The suitable range is between -0.75
|
|
38
38
|
* and 0.75. Default is 0.0.
|
|
39
39
|
*
|
|
40
|
-
* **Note:** NOT supported for bulbul:v3
|
|
40
|
+
* **Note:** NOT supported for bulbul:v3. Will be ignored if provided.
|
|
41
41
|
*/
|
|
42
42
|
pitch?: number;
|
|
43
43
|
/**
|
|
@@ -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:v3:** 0.5 to 2.0
|
|
48
49
|
* - **bulbul:v2:** 0.3 to 3.0
|
|
49
|
-
* - **bulbul:v3-beta:** 0.5 to 2.0
|
|
50
50
|
*/
|
|
51
51
|
pace?: number;
|
|
52
52
|
/**
|
|
@@ -54,7 +54,7 @@ export declare namespace ConfigureConnection {
|
|
|
54
54
|
* while higher values make it louder. The suitable range is between 0.3
|
|
55
55
|
* and 3.0. Default is 1.0.
|
|
56
56
|
*
|
|
57
|
-
* **Note:** NOT supported for bulbul:v3
|
|
57
|
+
* **Note:** NOT supported for bulbul:v3. Will be ignored if provided.
|
|
58
58
|
*/
|
|
59
59
|
loudness?: number;
|
|
60
60
|
/**
|
|
@@ -62,16 +62,16 @@ export declare namespace ConfigureConnection {
|
|
|
62
62
|
* focused and deterministic, while higher values make it more random.
|
|
63
63
|
* The suitable range is between 0.01 and 1.0. Default is 0.6.
|
|
64
64
|
*
|
|
65
|
-
* **Note:** Only supported for bulbul:v3
|
|
65
|
+
* **Note:** Only supported for bulbul:v3. Will be ignored for bulbul:v2.
|
|
66
66
|
*/
|
|
67
67
|
temperature?: number;
|
|
68
68
|
/**
|
|
69
|
-
* Specifies the sample rate of the output audio.
|
|
69
|
+
* Specifies the sample rate of the output audio. For streaming, supported values are
|
|
70
70
|
* 8000, 16000, 22050, 24000 Hz.
|
|
71
71
|
*
|
|
72
|
-
* **
|
|
73
|
-
*
|
|
74
|
-
*
|
|
72
|
+
* **Note:** Higher sample rates (32000, 44100, 48000 Hz) are only available with bulbul:v3 via the REST API, not in streaming mode.
|
|
73
|
+
*
|
|
74
|
+
* **Default:** 24000 Hz
|
|
75
75
|
*/
|
|
76
76
|
speech_sample_rate?: number;
|
|
77
77
|
/**
|
|
@@ -79,9 +79,7 @@ export declare namespace ConfigureConnection {
|
|
|
79
79
|
* (e.g., numbers, dates) is performed. Set to true for better handling
|
|
80
80
|
* of mixed-language text.
|
|
81
81
|
*
|
|
82
|
-
* **
|
|
83
|
-
* - **bulbul:v2:** false (optional)
|
|
84
|
-
* - **bulbul:v3-beta:** Always enabled (cannot be disabled)
|
|
82
|
+
* **Note:** Only supported for bulbul:v2. Not applicable for bulbul:v3.
|
|
85
83
|
*/
|
|
86
84
|
enable_preprocessing?: boolean;
|
|
87
85
|
/** Audio codec (currently supports MP3 only, optimized for real-time playback) */
|
|
@@ -96,15 +94,15 @@ export declare namespace ConfigureConnection {
|
|
|
96
94
|
namespace Data {
|
|
97
95
|
/**
|
|
98
96
|
* Specifies the model to use for text-to-speech conversion.
|
|
99
|
-
* - **bulbul:
|
|
100
|
-
* - **bulbul:
|
|
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
|
|
101
99
|
*/
|
|
102
100
|
const Model: {
|
|
101
|
+
readonly BulbulV3: "bulbul:v3";
|
|
103
102
|
readonly BulbulV2: "bulbul:v2";
|
|
104
|
-
readonly BulbulV3Beta: "bulbul:v3-beta";
|
|
105
103
|
};
|
|
106
104
|
type Model = (typeof Model)[keyof typeof Model];
|
|
107
|
-
/** The language
|
|
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. */
|
|
108
106
|
const TargetLanguageCode: {
|
|
109
107
|
readonly BnIn: "bn-IN";
|
|
110
108
|
readonly EnIn: "en-IN";
|
|
@@ -123,8 +121,8 @@ export declare namespace ConfigureConnection {
|
|
|
123
121
|
* The speaker voice to be used for the output audio.
|
|
124
122
|
*
|
|
125
123
|
* **Model Compatibility:**
|
|
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
|
|
126
125
|
* - **bulbul:v2:** anushka (default), abhilash, manisha, vidya, arya, karun, hitesh
|
|
127
|
-
* - **bulbul:v3-beta:** aditya (default), ritu, priya, neha, rahul, pooja, rohan, simran, kavya, amit, dev, ishita, shreya, ratan, varun, manan, sumit, roopa, kabir, aayan, shubh, ashutosh, advait, amelia, sophia
|
|
128
126
|
*
|
|
129
127
|
* **Note:** Speaker selection must match the chosen model version.
|
|
130
128
|
*/
|
|
@@ -161,6 +159,20 @@ export declare namespace ConfigureConnection {
|
|
|
161
159
|
readonly Advait: "advait";
|
|
162
160
|
readonly Amelia: "amelia";
|
|
163
161
|
readonly Sophia: "sophia";
|
|
162
|
+
readonly Anand: "anand";
|
|
163
|
+
readonly Tanya: "tanya";
|
|
164
|
+
readonly Tarun: "tarun";
|
|
165
|
+
readonly Sunny: "sunny";
|
|
166
|
+
readonly Mani: "mani";
|
|
167
|
+
readonly Gokul: "gokul";
|
|
168
|
+
readonly Vijay: "vijay";
|
|
169
|
+
readonly Shruti: "shruti";
|
|
170
|
+
readonly Suhani: "suhani";
|
|
171
|
+
readonly Mohit: "mohit";
|
|
172
|
+
readonly Kavitha: "kavitha";
|
|
173
|
+
readonly Rehan: "rehan";
|
|
174
|
+
readonly Soham: "soham";
|
|
175
|
+
readonly Rupali: "rupali";
|
|
164
176
|
};
|
|
165
177
|
type Speaker = (typeof Speaker)[keyof typeof Speaker];
|
|
166
178
|
/** Audio codec (currently supports MP3 only, optimized for real-time playback) */
|
|
@@ -8,14 +8,14 @@ var ConfigureConnection;
|
|
|
8
8
|
(function (Data) {
|
|
9
9
|
/**
|
|
10
10
|
* Specifies the model to use for text-to-speech conversion.
|
|
11
|
-
* - **bulbul:
|
|
12
|
-
* - **bulbul:
|
|
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
|
+
BulbulV3: "bulbul:v3",
|
|
15
16
|
BulbulV2: "bulbul:v2",
|
|
16
|
-
BulbulV3Beta: "bulbul:v3-beta",
|
|
17
17
|
};
|
|
18
|
-
/** The language
|
|
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 = {
|
|
20
20
|
BnIn: "bn-IN",
|
|
21
21
|
EnIn: "en-IN",
|
|
@@ -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: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
|
|
36
37
|
* - **bulbul:v2:** anushka (default), abhilash, manisha, vidya, arya, karun, hitesh
|
|
37
|
-
* - **bulbul:v3-beta:** aditya (default), ritu, priya, neha, rahul, pooja, rohan, simran, kavya, amit, dev, ishita, shreya, ratan, varun, manan, sumit, roopa, kabir, aayan, shubh, ashutosh, advait, amelia, sophia
|
|
38
38
|
*
|
|
39
39
|
* **Note:** Speaker selection must match the chosen model version.
|
|
40
40
|
*/
|
|
@@ -71,6 +71,20 @@ var ConfigureConnection;
|
|
|
71
71
|
Advait: "advait",
|
|
72
72
|
Amelia: "amelia",
|
|
73
73
|
Sophia: "sophia",
|
|
74
|
+
Anand: "anand",
|
|
75
|
+
Tanya: "tanya",
|
|
76
|
+
Tarun: "tarun",
|
|
77
|
+
Sunny: "sunny",
|
|
78
|
+
Mani: "mani",
|
|
79
|
+
Gokul: "gokul",
|
|
80
|
+
Vijay: "vijay",
|
|
81
|
+
Shruti: "shruti",
|
|
82
|
+
Suhani: "suhani",
|
|
83
|
+
Mohit: "mohit",
|
|
84
|
+
Kavitha: "kavitha",
|
|
85
|
+
Rehan: "rehan",
|
|
86
|
+
Soham: "soham",
|
|
87
|
+
Rupali: "rupali",
|
|
74
88
|
};
|
|
75
89
|
/** Audio codec (currently supports MP3 only, optimized for real-time playback) */
|
|
76
90
|
Data.OutputAudioCodec = {
|
|
@@ -31,5 +31,19 @@ export declare const TextToSpeechSpeaker: {
|
|
|
31
31
|
readonly Advait: "advait";
|
|
32
32
|
readonly Amelia: "amelia";
|
|
33
33
|
readonly Sophia: "sophia";
|
|
34
|
+
readonly Anand: "anand";
|
|
35
|
+
readonly Tanya: "tanya";
|
|
36
|
+
readonly Tarun: "tarun";
|
|
37
|
+
readonly Sunny: "sunny";
|
|
38
|
+
readonly Mani: "mani";
|
|
39
|
+
readonly Gokul: "gokul";
|
|
40
|
+
readonly Vijay: "vijay";
|
|
41
|
+
readonly Shruti: "shruti";
|
|
42
|
+
readonly Suhani: "suhani";
|
|
43
|
+
readonly Mohit: "mohit";
|
|
44
|
+
readonly Kavitha: "kavitha";
|
|
45
|
+
readonly Rehan: "rehan";
|
|
46
|
+
readonly Soham: "soham";
|
|
47
|
+
readonly Rupali: "rupali";
|
|
34
48
|
};
|
|
35
49
|
export type TextToSpeechSpeaker = (typeof TextToSpeechSpeaker)[keyof typeof TextToSpeechSpeaker];
|
|
@@ -35,4 +35,18 @@ exports.TextToSpeechSpeaker = {
|
|
|
35
35
|
Advait: "advait",
|
|
36
36
|
Amelia: "amelia",
|
|
37
37
|
Sophia: "sophia",
|
|
38
|
+
Anand: "anand",
|
|
39
|
+
Tanya: "tanya",
|
|
40
|
+
Tarun: "tarun",
|
|
41
|
+
Sunny: "sunny",
|
|
42
|
+
Mani: "mani",
|
|
43
|
+
Gokul: "gokul",
|
|
44
|
+
Vijay: "vijay",
|
|
45
|
+
Shruti: "shruti",
|
|
46
|
+
Suhani: "suhani",
|
|
47
|
+
Mohit: "mohit",
|
|
48
|
+
Kavitha: "kavitha",
|
|
49
|
+
Rehan: "rehan",
|
|
50
|
+
Soham: "soham",
|
|
51
|
+
Rupali: "rupali",
|
|
38
52
|
};
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.1.
|
|
1
|
+
export declare const SDK_VERSION = "1.1.3";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -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.
|
|
10
|
-
"User-Agent": "sarvamai/1.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
|
|
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:
|
|
19
|
-
* - **bulbul:
|
|
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
|
-
* **Important Notes for bulbul:v3
|
|
21
|
+
* **Important Notes for bulbul:v3:**
|
|
22
22
|
* - Pitch and loudness parameters are NOT supported
|
|
23
|
-
* - Pace
|
|
23
|
+
* - Pace range: 0.5 to 2.0
|
|
24
24
|
* - Preprocessing is automatically enabled
|
|
25
25
|
* - Default sample rate is 24000 Hz
|
|
26
|
-
* -
|
|
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
|
|
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:
|
|
26
|
-
* - **bulbul:
|
|
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
|
-
* **Important Notes for bulbul:v3
|
|
28
|
+
* **Important Notes for bulbul:v3:**
|
|
29
29
|
* - Pitch and loudness parameters are NOT supported
|
|
30
|
-
* - Pace
|
|
30
|
+
* - Pace range: 0.5 to 2.0
|
|
31
31
|
* - Preprocessing is automatically enabled
|
|
32
32
|
* - Default sample rate is 24000 Hz
|
|
33
|
-
* -
|
|
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,27 +14,27 @@ export interface TextToSpeechRequest {
|
|
|
14
14
|
* - Supports code-mixed text (English and Indic languages)
|
|
15
15
|
*
|
|
16
16
|
* **Model-specific limits:**
|
|
17
|
+
* - **bulbul:v3:** Max 2500 characters
|
|
17
18
|
* - **bulbul:v2:** Max 1500 characters
|
|
18
|
-
* - **bulbul:v3-beta:** Max 2500 characters
|
|
19
19
|
*
|
|
20
20
|
* **Important Note:**
|
|
21
21
|
* - For numbers larger than 4 digits, use commas (e.g., '10,000' instead of '10000')
|
|
22
22
|
* - This ensures proper pronunciation as a whole number
|
|
23
23
|
*/
|
|
24
24
|
text: string;
|
|
25
|
-
/** The language
|
|
25
|
+
/** The language code in BCP-47 format. This parameter is primarily used by the pre-TTS text normalization model to handle language-specific text processing such as number formatting, abbreviations, and special characters. */
|
|
26
26
|
target_language_code: SarvamAI.TextToSpeechLanguage;
|
|
27
27
|
/**
|
|
28
28
|
* The speaker voice to be used for the output audio.
|
|
29
29
|
*
|
|
30
|
-
* **Default:**
|
|
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-beta:**
|
|
37
|
-
* - Aditya, Ritu, Priya, Neha, Rahul, Pooja, Rohan, Simran, Kavya, Amit, Dev, Ishita, Shreya, Ratan, Varun, Manan, Sumit, Roopa, Kabir, Aayan, Shubh, Ashutosh, Advait, Amelia, Sophia
|
|
38
38
|
*
|
|
39
39
|
* **Note:** Speaker selection must match the chosen model version.
|
|
40
40
|
*/
|
|
@@ -42,53 +42,55 @@ 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
|
|
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:v3:** 0.5 to 2.0
|
|
52
53
|
* - **bulbul:v2:** 0.3 to 3.0
|
|
53
|
-
* - **bulbul:v3-beta:** 0.5 to 2.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
|
|
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
|
-
* Specifies the sample rate of the output audio. Supported values are 8000, 16000, 22050, 24000 Hz.
|
|
63
|
+
* Specifies the sample rate of the output audio. Supported values are 8000, 16000, 22050, 24000, 32000, 44100, 48000 Hz.
|
|
64
64
|
*
|
|
65
|
-
* **
|
|
66
|
-
*
|
|
67
|
-
*
|
|
65
|
+
* **Note:** Higher sample rates (32000, 44100, 48000 Hz) are only available with bulbul:v3 via the REST API, not in streaming mode.
|
|
66
|
+
*
|
|
67
|
+
* **Default:** 24000 Hz
|
|
68
68
|
*/
|
|
69
69
|
speech_sample_rate?: SarvamAI.SpeechSampleRate;
|
|
70
70
|
/**
|
|
71
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.
|
|
72
72
|
*
|
|
73
73
|
* **Model-specific behavior:**
|
|
74
|
+
* - **bulbul:v3:** Not Supported
|
|
74
75
|
* - **bulbul:v2:** Default is false
|
|
75
|
-
* - **bulbul:v3-beta:** Automatically enabled (true) and cannot be disabled
|
|
76
76
|
*/
|
|
77
77
|
enable_preprocessing?: boolean;
|
|
78
78
|
/**
|
|
79
79
|
* Specifies the model to use for text-to-speech conversion.
|
|
80
80
|
*
|
|
81
81
|
* **Available models:**
|
|
82
|
-
* - **bulbul:
|
|
83
|
-
* - **bulbul:
|
|
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
|
|
84
84
|
*/
|
|
85
85
|
model?: SarvamAI.TextToSpeechModel;
|
|
86
86
|
/** Specifies the audio codec for the output audio file. Different codecs offer various compression and quality characteristics. */
|
|
87
87
|
output_audio_codec?: SarvamAI.TextToSpeechOutputAudioCodec;
|
|
88
88
|
/**
|
|
89
|
-
*
|
|
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.
|
|
90
92
|
*
|
|
91
|
-
* **Note:** This parameter is only supported for bulbul:v3
|
|
93
|
+
* **Note:** This parameter is only supported for bulbul:v3. It has no effect on bulbul:v2.
|
|
92
94
|
*/
|
|
93
95
|
temperature?: number;
|
|
94
96
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Text to speech model to use.
|
|
3
|
-
* - **bulbul:
|
|
4
|
-
* - **bulbul:
|
|
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 BulbulV3: "bulbul:v3";
|
|
7
8
|
readonly BulbulV2: "bulbul:v2";
|
|
8
|
-
readonly BulbulV3Beta: "bulbul:v3-beta";
|
|
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:
|
|
5
|
-
* - **bulbul:
|
|
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
|
+
BulbulV3: "bulbul:v3",
|
|
8
9
|
BulbulV2: "bulbul:v2",
|
|
9
|
-
BulbulV3Beta: "bulbul:v3-beta",
|
|
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:
|
|
9
|
-
* - **bulbul:
|
|
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,18 +16,18 @@ export declare namespace ConfigureConnection {
|
|
|
16
16
|
interface Data {
|
|
17
17
|
/**
|
|
18
18
|
* Specifies the model to use for text-to-speech conversion.
|
|
19
|
-
* - **bulbul:
|
|
20
|
-
* - **bulbul:
|
|
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
|
-
/** The language
|
|
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. */
|
|
24
24
|
target_language_code: Data.TargetLanguageCode;
|
|
25
25
|
/**
|
|
26
26
|
* The speaker voice to be used for the output audio.
|
|
27
27
|
*
|
|
28
28
|
* **Model Compatibility:**
|
|
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
|
|
29
30
|
* - **bulbul:v2:** anushka (default), abhilash, manisha, vidya, arya, karun, hitesh
|
|
30
|
-
* - **bulbul:v3-beta:** aditya (default), ritu, priya, neha, rahul, pooja, rohan, simran, kavya, amit, dev, ishita, shreya, ratan, varun, manan, sumit, roopa, kabir, aayan, shubh, ashutosh, advait, amelia, sophia
|
|
31
31
|
*
|
|
32
32
|
* **Note:** Speaker selection must match the chosen model version.
|
|
33
33
|
*/
|
|
@@ -37,7 +37,7 @@ export declare namespace ConfigureConnection {
|
|
|
37
37
|
* while higher values make it sharper. The suitable range is between -0.75
|
|
38
38
|
* and 0.75. Default is 0.0.
|
|
39
39
|
*
|
|
40
|
-
* **Note:** NOT supported for bulbul:v3
|
|
40
|
+
* **Note:** NOT supported for bulbul:v3. Will be ignored if provided.
|
|
41
41
|
*/
|
|
42
42
|
pitch?: number;
|
|
43
43
|
/**
|
|
@@ -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:v3:** 0.5 to 2.0
|
|
48
49
|
* - **bulbul:v2:** 0.3 to 3.0
|
|
49
|
-
* - **bulbul:v3-beta:** 0.5 to 2.0
|
|
50
50
|
*/
|
|
51
51
|
pace?: number;
|
|
52
52
|
/**
|
|
@@ -54,7 +54,7 @@ export declare namespace ConfigureConnection {
|
|
|
54
54
|
* while higher values make it louder. The suitable range is between 0.3
|
|
55
55
|
* and 3.0. Default is 1.0.
|
|
56
56
|
*
|
|
57
|
-
* **Note:** NOT supported for bulbul:v3
|
|
57
|
+
* **Note:** NOT supported for bulbul:v3. Will be ignored if provided.
|
|
58
58
|
*/
|
|
59
59
|
loudness?: number;
|
|
60
60
|
/**
|
|
@@ -62,16 +62,16 @@ export declare namespace ConfigureConnection {
|
|
|
62
62
|
* focused and deterministic, while higher values make it more random.
|
|
63
63
|
* The suitable range is between 0.01 and 1.0. Default is 0.6.
|
|
64
64
|
*
|
|
65
|
-
* **Note:** Only supported for bulbul:v3
|
|
65
|
+
* **Note:** Only supported for bulbul:v3. Will be ignored for bulbul:v2.
|
|
66
66
|
*/
|
|
67
67
|
temperature?: number;
|
|
68
68
|
/**
|
|
69
|
-
* Specifies the sample rate of the output audio.
|
|
69
|
+
* Specifies the sample rate of the output audio. For streaming, supported values are
|
|
70
70
|
* 8000, 16000, 22050, 24000 Hz.
|
|
71
71
|
*
|
|
72
|
-
* **
|
|
73
|
-
*
|
|
74
|
-
*
|
|
72
|
+
* **Note:** Higher sample rates (32000, 44100, 48000 Hz) are only available with bulbul:v3 via the REST API, not in streaming mode.
|
|
73
|
+
*
|
|
74
|
+
* **Default:** 24000 Hz
|
|
75
75
|
*/
|
|
76
76
|
speech_sample_rate?: number;
|
|
77
77
|
/**
|
|
@@ -79,9 +79,7 @@ export declare namespace ConfigureConnection {
|
|
|
79
79
|
* (e.g., numbers, dates) is performed. Set to true for better handling
|
|
80
80
|
* of mixed-language text.
|
|
81
81
|
*
|
|
82
|
-
* **
|
|
83
|
-
* - **bulbul:v2:** false (optional)
|
|
84
|
-
* - **bulbul:v3-beta:** Always enabled (cannot be disabled)
|
|
82
|
+
* **Note:** Only supported for bulbul:v2. Not applicable for bulbul:v3.
|
|
85
83
|
*/
|
|
86
84
|
enable_preprocessing?: boolean;
|
|
87
85
|
/** Audio codec (currently supports MP3 only, optimized for real-time playback) */
|
|
@@ -96,15 +94,15 @@ export declare namespace ConfigureConnection {
|
|
|
96
94
|
namespace Data {
|
|
97
95
|
/**
|
|
98
96
|
* Specifies the model to use for text-to-speech conversion.
|
|
99
|
-
* - **bulbul:
|
|
100
|
-
* - **bulbul:
|
|
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
|
|
101
99
|
*/
|
|
102
100
|
const Model: {
|
|
101
|
+
readonly BulbulV3: "bulbul:v3";
|
|
103
102
|
readonly BulbulV2: "bulbul:v2";
|
|
104
|
-
readonly BulbulV3Beta: "bulbul:v3-beta";
|
|
105
103
|
};
|
|
106
104
|
type Model = (typeof Model)[keyof typeof Model];
|
|
107
|
-
/** The language
|
|
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. */
|
|
108
106
|
const TargetLanguageCode: {
|
|
109
107
|
readonly BnIn: "bn-IN";
|
|
110
108
|
readonly EnIn: "en-IN";
|
|
@@ -123,8 +121,8 @@ export declare namespace ConfigureConnection {
|
|
|
123
121
|
* The speaker voice to be used for the output audio.
|
|
124
122
|
*
|
|
125
123
|
* **Model Compatibility:**
|
|
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
|
|
126
125
|
* - **bulbul:v2:** anushka (default), abhilash, manisha, vidya, arya, karun, hitesh
|
|
127
|
-
* - **bulbul:v3-beta:** aditya (default), ritu, priya, neha, rahul, pooja, rohan, simran, kavya, amit, dev, ishita, shreya, ratan, varun, manan, sumit, roopa, kabir, aayan, shubh, ashutosh, advait, amelia, sophia
|
|
128
126
|
*
|
|
129
127
|
* **Note:** Speaker selection must match the chosen model version.
|
|
130
128
|
*/
|
|
@@ -161,6 +159,20 @@ export declare namespace ConfigureConnection {
|
|
|
161
159
|
readonly Advait: "advait";
|
|
162
160
|
readonly Amelia: "amelia";
|
|
163
161
|
readonly Sophia: "sophia";
|
|
162
|
+
readonly Anand: "anand";
|
|
163
|
+
readonly Tanya: "tanya";
|
|
164
|
+
readonly Tarun: "tarun";
|
|
165
|
+
readonly Sunny: "sunny";
|
|
166
|
+
readonly Mani: "mani";
|
|
167
|
+
readonly Gokul: "gokul";
|
|
168
|
+
readonly Vijay: "vijay";
|
|
169
|
+
readonly Shruti: "shruti";
|
|
170
|
+
readonly Suhani: "suhani";
|
|
171
|
+
readonly Mohit: "mohit";
|
|
172
|
+
readonly Kavitha: "kavitha";
|
|
173
|
+
readonly Rehan: "rehan";
|
|
174
|
+
readonly Soham: "soham";
|
|
175
|
+
readonly Rupali: "rupali";
|
|
164
176
|
};
|
|
165
177
|
type Speaker = (typeof Speaker)[keyof typeof Speaker];
|
|
166
178
|
/** Audio codec (currently supports MP3 only, optimized for real-time playback) */
|
|
@@ -5,14 +5,14 @@ export var ConfigureConnection;
|
|
|
5
5
|
(function (Data) {
|
|
6
6
|
/**
|
|
7
7
|
* Specifies the model to use for text-to-speech conversion.
|
|
8
|
-
* - **bulbul:
|
|
9
|
-
* - **bulbul:
|
|
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
|
+
BulbulV3: "bulbul:v3",
|
|
12
13
|
BulbulV2: "bulbul:v2",
|
|
13
|
-
BulbulV3Beta: "bulbul:v3-beta",
|
|
14
14
|
};
|
|
15
|
-
/** The language
|
|
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 = {
|
|
17
17
|
BnIn: "bn-IN",
|
|
18
18
|
EnIn: "en-IN",
|
|
@@ -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: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
|
|
33
34
|
* - **bulbul:v2:** anushka (default), abhilash, manisha, vidya, arya, karun, hitesh
|
|
34
|
-
* - **bulbul:v3-beta:** aditya (default), ritu, priya, neha, rahul, pooja, rohan, simran, kavya, amit, dev, ishita, shreya, ratan, varun, manan, sumit, roopa, kabir, aayan, shubh, ashutosh, advait, amelia, sophia
|
|
35
35
|
*
|
|
36
36
|
* **Note:** Speaker selection must match the chosen model version.
|
|
37
37
|
*/
|
|
@@ -68,6 +68,20 @@ export var ConfigureConnection;
|
|
|
68
68
|
Advait: "advait",
|
|
69
69
|
Amelia: "amelia",
|
|
70
70
|
Sophia: "sophia",
|
|
71
|
+
Anand: "anand",
|
|
72
|
+
Tanya: "tanya",
|
|
73
|
+
Tarun: "tarun",
|
|
74
|
+
Sunny: "sunny",
|
|
75
|
+
Mani: "mani",
|
|
76
|
+
Gokul: "gokul",
|
|
77
|
+
Vijay: "vijay",
|
|
78
|
+
Shruti: "shruti",
|
|
79
|
+
Suhani: "suhani",
|
|
80
|
+
Mohit: "mohit",
|
|
81
|
+
Kavitha: "kavitha",
|
|
82
|
+
Rehan: "rehan",
|
|
83
|
+
Soham: "soham",
|
|
84
|
+
Rupali: "rupali",
|
|
71
85
|
};
|
|
72
86
|
/** Audio codec (currently supports MP3 only, optimized for real-time playback) */
|
|
73
87
|
Data.OutputAudioCodec = {
|
|
@@ -31,5 +31,19 @@ export declare const TextToSpeechSpeaker: {
|
|
|
31
31
|
readonly Advait: "advait";
|
|
32
32
|
readonly Amelia: "amelia";
|
|
33
33
|
readonly Sophia: "sophia";
|
|
34
|
+
readonly Anand: "anand";
|
|
35
|
+
readonly Tanya: "tanya";
|
|
36
|
+
readonly Tarun: "tarun";
|
|
37
|
+
readonly Sunny: "sunny";
|
|
38
|
+
readonly Mani: "mani";
|
|
39
|
+
readonly Gokul: "gokul";
|
|
40
|
+
readonly Vijay: "vijay";
|
|
41
|
+
readonly Shruti: "shruti";
|
|
42
|
+
readonly Suhani: "suhani";
|
|
43
|
+
readonly Mohit: "mohit";
|
|
44
|
+
readonly Kavitha: "kavitha";
|
|
45
|
+
readonly Rehan: "rehan";
|
|
46
|
+
readonly Soham: "soham";
|
|
47
|
+
readonly Rupali: "rupali";
|
|
34
48
|
};
|
|
35
49
|
export type TextToSpeechSpeaker = (typeof TextToSpeechSpeaker)[keyof typeof TextToSpeechSpeaker];
|
|
@@ -32,4 +32,18 @@ export const TextToSpeechSpeaker = {
|
|
|
32
32
|
Advait: "advait",
|
|
33
33
|
Amelia: "amelia",
|
|
34
34
|
Sophia: "sophia",
|
|
35
|
+
Anand: "anand",
|
|
36
|
+
Tanya: "tanya",
|
|
37
|
+
Tarun: "tarun",
|
|
38
|
+
Sunny: "sunny",
|
|
39
|
+
Mani: "mani",
|
|
40
|
+
Gokul: "gokul",
|
|
41
|
+
Vijay: "vijay",
|
|
42
|
+
Shruti: "shruti",
|
|
43
|
+
Suhani: "suhani",
|
|
44
|
+
Mohit: "mohit",
|
|
45
|
+
Kavitha: "kavitha",
|
|
46
|
+
Rehan: "rehan",
|
|
47
|
+
Soham: "soham",
|
|
48
|
+
Rupali: "rupali",
|
|
35
49
|
};
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.1.
|
|
1
|
+
export declare const SDK_VERSION = "1.1.3";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "1.1.
|
|
1
|
+
export const SDK_VERSION = "1.1.3";
|
package/package.json
CHANGED
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
|
|
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:
|
|
426
|
-
- **bulbul:
|
|
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
|
-
**Important Notes for bulbul:v3
|
|
428
|
+
**Important Notes for bulbul:v3:**
|
|
429
429
|
- Pitch and loudness parameters are NOT supported
|
|
430
|
-
- Pace
|
|
430
|
+
- Pace range: 0.5 to 2.0
|
|
431
431
|
- Preprocessing is automatically enabled
|
|
432
432
|
- Default sample rate is 24000 Hz
|
|
433
|
-
-
|
|
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>
|