AI Dev Kit
Search Results for

    Show / Hide Table of Contents

    Class SpeechRequest

    Generates audio from the input text.

    Inheritance
    object
    AIRequest
    SpeechRequest
    Inherited Members
    AIRequest.Model
    AIRequest.N
    AIRequest.Metadata
    AIRequest.User
    Namespace: Glitch9.AIDevKit.OpenAI
    Assembly: .dll
    Syntax
    public class SpeechRequest : AIRequest

    Properties

    Prompt

    Required. The input text to generate audio for. The maximum length is 4096 characters.

    Declaration
    public string Prompt { get; set; }
    Property Value
    Type Description
    string

    ResponseFormat

    The format of the response.

    Declaration
    public AudioEncoding? ResponseFormat { get; set; }
    Property Value
    Type Description
    AudioEncoding?

    Speed

    The speed of the generated audio. Select a value from 0.25 to 4.0.

    Declaration
    public float? Speed { get; set; }
    Property Value
    Type Description
    float?
    Remarks

    1.0 is the default.

    Voice

    Required. The voice to use when generating the audio. Supported voices are alloy, echo, fable, onyx, nova, and shimmer. Previews of the voices are available in the Text to speech guide.

    Declaration
    public Voice Voice { get; set; }
    Property Value
    Type Description
    Voice

    Extension Methods

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