Class SpeechRequest
Generates audio from the input text.
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 |