Class TextToSpeechRequest
Inherited Members
Namespace: Glitch9.AIDevKit.ElevenLabs
Assembly: Glitch9.AIDevKit.Provider.ElevenLabs.dll
Syntax
public class TextToSpeechRequest : ElevenLabsVoiceRequest
Properties
| Edit this page View SourceApplyLanguageTextNormalization
Optional. This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. Defaults to false.
Declaration
[JsonProperty("apply_language_text_normalization")]
public bool? ApplyLanguageTextNormalization { get; set; }
Property Value
| Type | Description |
|---|---|
| bool? |
ApplyTextNormalization
Optional. This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. Cannot be turned on for Eleven_turbo_v2_5 or Eleven_flash_v2_5 models. Allowed values: auto, on, off. Defaults to 'auto'.
Declaration
[JsonProperty("apply_text_normalization")]
public string ApplyTextNormalization { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
LanguageCode
Optional. Language code (ISO 639-1) used to enforce a language for the model. Currently only Turbo v2.5 and Flash v2.5 support language enforcement. For other models, an error will be returned if language code is provided.
Declaration
[JsonProperty("language_code")]
public string LanguageCode { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
NextRequestIds
Optional. A list of request_id of the samples that come after this generation. next_request_ids is especially useful for maintaining the speech continuity when regenerating a sample that has had some audio quality issues. For example, if you have generated 3 speech clips, and you want to improve clip 2, passing the request id of clip 3 as a next_request_id (and that of clip 1 as a previous_request_id) will help maintain natural flow in the combined speech. The results will be best when the same model is used across the generations. In case both next_text and next_request_ids is send, next_text will be ignored. A maximum of 3 request_ids can be send.
Declaration
[JsonProperty("next_request_ids")]
public List<string> NextRequestIds { get; set; }
Property Value
| Type | Description |
|---|---|
| List<string> |
NextText
Optional. The text that comes after the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation.
Declaration
[JsonProperty("next_text")]
public string NextText { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
PreviousRequestIds
Optional. A list of request_id of the samples that were generated before this generation. Can be used to improve the speech continuity when splitting up a large task into multiple requests. The results will be best when the same model is used across the generations. In case both previous_text and previous_request_ids is send, previous_text will be ignored. A maximum of 3 request_ids can be send.
Declaration
[JsonProperty("previous_request_ids")]
public List<string> PreviousRequestIds { get; set; }
Property Value
| Type | Description |
|---|---|
| List<string> |
PreviousText
Optional. The text that came before the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation.
Declaration
[JsonProperty("previous_text")]
public string PreviousText { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
PronunciationDictionaryLocators
Optional. A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request.
Declaration
[JsonProperty("pronunciation_dictionary_locators")]
public List<PronunciationDictionaryLocator> PronunciationDictionaryLocators { get; set; }
Property Value
| Type | Description |
|---|---|
| List<PronunciationDictionaryLocator> |
Seed
Optional. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295.
Declaration
[JsonProperty("seed")]
public long? Seed { get; set; }
Property Value
| Type | Description |
|---|---|
| long? |
Text
Required. The text that will get converted into speech.
Declaration
[JsonProperty("text")]
public string Text { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
VoiceSettings
Optional. Voice settings overriding stored settings for the given voice. They are applied only on the given request.
Declaration
[JsonProperty("voice_settings")]
public VoiceSettings VoiceSettings { get; set; }
Property Value
| Type | Description |
|---|---|
| VoiceSettings |