Class SpeechRequest
Body of POST /v1/audio/speech (non-streaming) and the base of stream requests.
public sealed class SpeechRequest
- Inheritance
-
SpeechRequest
- Inherited Members
Properties
BusyTimeoutMs
Upper bound on waiting for a busy model, in milliseconds.
public long? BusyTimeoutMs { get; set; }
Property Value
- long?
GuidanceScale
Classifier-free guidance scale.
public double? GuidanceScale { get; set; }
Property Value
Input
Text to speak. Required.
public string? Input { get; set; }
Property Value
Instruct
Model option instruct. Mutually exclusive with Instructions (server-side 400 mirrored client-side).
public string? Instruct { get; set; }
Property Value
Instructions
OpenAI-style top-level instructions; the server maps them to model option instruction. Mutually exclusive with Instruct.
public string? Instructions { get; set; }
Property Value
Language
Language code.
public string? Language { get; set; }
Property Value
MaxSteps
Maximum inference steps (diffusion families).
public int? MaxSteps { get; set; }
Property Value
- int?
MaxTokens
Maximum generated tokens.
public int? MaxTokens { get; set; }
Property Value
- int?
Model
Configured model id. Required.
public string? Model { get; set; }
Property Value
NumInferenceSteps
Number of inference steps (diffusion families).
public int? NumInferenceSteps { get; set; }
Property Value
- int?
Options
Model-family-specific options: the escape hatch mirroring the server's stringly-typed option map.
public Dictionary<string, string>? Options { get; set; }
Property Value
ReferenceText
Transcript of the voice reference audio.
public string? ReferenceText { get; set; }
Property Value
RepetitionPenalty
Repetition penalty.
public double? RepetitionPenalty { get; set; }
Property Value
ResponseFormat
wav (default), json, pcm, mp3 where the frontend is compiled.
public ResponseFormat? ResponseFormat { get; set; }
Property Value
Seed
Sampling seed. Sent as a JSON string when set: the documented full-uint64-safe spelling (JSON numeric seeds may lose precision above 2^53).
public string? Seed { get; set; }
Property Value
SpeakingRate
Alias of Speed. Mutually exclusive with it on this client.
public double? SpeakingRate { get; set; }
Property Value
Speed
Positive speech-rate multiplier. Mutually exclusive with SpeakingRate.
public double? Speed { get; set; }
Property Value
Temperature
Sampling temperature.
public double? Temperature { get; set; }
Property Value
TopK
Top-k sampling.
public int? TopK { get; set; }
Property Value
- int?
TopP
Top-p (nucleus) sampling.
public double? TopP { get; set; }
Property Value
Voice
Voice preset name, voice-dir name, or native voice id. Empty/null is omitted.
public string? Voice { get; set; }
Property Value
VoiceRef
Voice reference: a server-local path string or a VoiceRefObject.
public object? VoiceRef { get; set; }
Property Value
Methods
Validate()
Validates cross-field rules (required fields, instruct XOR instructions, speed XOR speaking_rate, option collisions).
public void Validate()