| |
|
|
| import typing_extensions |
| from ..types.configure_connection_data_model import ConfigureConnectionDataModel |
| from ..types.configure_connection_data_output_audio_bitrate import ConfigureConnectionDataOutputAudioBitrate |
| from ..types.configure_connection_data_output_audio_codec import ConfigureConnectionDataOutputAudioCodec |
| from ..types.configure_connection_data_speaker import ConfigureConnectionDataSpeaker |
| from ..types.configure_connection_data_target_language_code import ConfigureConnectionDataTargetLanguageCode |
|
|
|
|
| class ConfigureConnectionDataParams(typing_extensions.TypedDict): |
| model: typing_extensions.NotRequired[ConfigureConnectionDataModel] |
| """ |
| Specifies the model to use for text-to-speech conversion. |
| - **bulbul:v2** (default): Standard TTS model with pitch/loudness support |
| - **bulbul:v3**: Advanced model with temperature control (no pitch/loudness) |
| """ |
|
|
| target_language_code: ConfigureConnectionDataTargetLanguageCode |
| """ |
| The language of the text in BCP-47 format |
| """ |
|
|
| speaker: ConfigureConnectionDataSpeaker |
| """ |
| The speaker voice to be used for the output audio. |
| |
| **Model Compatibility:** |
| - **bulbul:v2:** anushka (default), abhilash, manisha, vidya, arya, karun, hitesh |
| - **bulbul:v3:** 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 |
| |
| **Note:** Speaker selection must match the chosen model version. |
| """ |
|
|
| pitch: typing_extensions.NotRequired[float] |
| """ |
| 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. |
| |
| **Note:** NOT supported for bulbul:v3. Will be ignored if provided. |
| """ |
|
|
| pace: typing_extensions.NotRequired[float] |
| """ |
| Controls the speed of the audio. Lower values result in slower speech, |
| while higher values make it faster. Default is 1.0. |
| |
| **Model-specific ranges:** |
| - **bulbul:v2:** 0.3 to 3.0 |
| - **bulbul:v3:** 0.5 to 2.0 |
| """ |
|
|
| loudness: typing_extensions.NotRequired[float] |
| """ |
| 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. |
| |
| **Note:** NOT supported for bulbul:v3. Will be ignored if provided. |
| """ |
|
|
| temperature: typing_extensions.NotRequired[float] |
| """ |
| 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. |
| |
| **Note:** Only supported for bulbul:v3. Will be ignored for bulbul:v2. |
| """ |
|
|
| speech_sample_rate: typing_extensions.NotRequired[int] |
| """ |
| Specifies the sample rate of the output audio. Supported values are |
| 8000, 16000, 22050, 24000 Hz. |
| |
| **Model-specific defaults:** |
| - **bulbul:v2:** 22050 Hz |
| - **bulbul:v3:** 24000 Hz |
| """ |
|
|
| enable_preprocessing: typing_extensions.NotRequired[bool] |
| """ |
| 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. |
| |
| **Model-specific defaults:** |
| - **bulbul:v2:** false (optional) |
| - **bulbul:v3:** Always enabled (cannot be disabled) |
| """ |
|
|
| output_audio_codec: typing_extensions.NotRequired[ConfigureConnectionDataOutputAudioCodec] |
| """ |
| Audio codec (currently supports MP3 only, optimized for real-time playback) |
| """ |
|
|
| output_audio_bitrate: typing_extensions.NotRequired[ConfigureConnectionDataOutputAudioBitrate] |
| """ |
| Audio bitrate (choose from 5 supported bitrate options) |
| """ |
|
|
| dict_id: typing_extensions.NotRequired[str] |
| """ |
| The ID of a pronunciation dictionary to apply during synthesis. |
| When provided, matching words in the input text will be replaced |
| with their custom pronunciations before generating speech. |
| |
| Create and manage dictionaries via the `/text-to-speech/pronunciation-dictionary` endpoints. |
| |
| **Note:** Only supported by **bulbul:v3**. |
| """ |
|
|
| min_buffer_size: typing_extensions.NotRequired[int] |
| """ |
| Minimum character length that triggers buffer flushing for TTS model processing |
| """ |
|
|
| max_chunk_length: typing_extensions.NotRequired[int] |
| """ |
| Maximum length for sentence splitting (adjust based on content length) |
| """ |
|
|