AI Dev Kit
Search Results for

    Show / Hide Table of Contents

    Class SpeechRequest

    Inheritance
    object
    RequestBody
    AudioRequest
    VoiceRequest
    SpeechRequest
    Inherited Members
    VoiceRequest.VoiceId
    VoiceRequest.Voice
    VoiceRequest.EnableLogging
    VoiceRequest.Model
    AudioRequest.OutputFormat
    Namespace: Glitch9.AIDevKit.ElevenLabs
    Assembly: .dll
    Syntax
    public class SpeechRequest : VoiceRequest

    Properties

    ApplyLanguageTextNormalization

    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
    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
    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
    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’s 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
    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
    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’s 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
    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
    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
    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
    public uint? Seed { get; set; }
    Property Value
    Type Description
    uint?

    Text

    Required. The text that will get converted into speech.

    Declaration
    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
    public VoiceSettings VoiceSettings { get; set; }
    Property Value
    Type Description
    VoiceSettings

    Extension Methods

    RequestExtensions.ExecuteAsync(SpeechRequest)
    RequestExtensions.StreamAsync(SpeechRequest, StreamAudioPlayer)
    In this article
    Back to top Generated by DocFX