Table of Contents

Class SpeechRequest

Namespace
Mabs.AudioCpp.Models
Assembly
AudioCpp.dll

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

double?

Input

Text to speak. Required.

public string? Input { get; set; }

Property Value

string

Instruct

Model option instruct. Mutually exclusive with Instructions (server-side 400 mirrored client-side).

public string? Instruct { get; set; }

Property Value

string

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

string

Language

Language code.

public string? Language { get; set; }

Property Value

string

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

string

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

Dictionary<string, string>

ReferenceText

Transcript of the voice reference audio.

public string? ReferenceText { get; set; }

Property Value

string

RepetitionPenalty

Repetition penalty.

public double? RepetitionPenalty { get; set; }

Property Value

double?

ResponseFormat

wav (default), json, pcm, mp3 where the frontend is compiled.

public ResponseFormat? ResponseFormat { get; set; }

Property Value

ResponseFormat?

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

string

SpeakingRate

Alias of Speed. Mutually exclusive with it on this client.

public double? SpeakingRate { get; set; }

Property Value

double?

Speed

Positive speech-rate multiplier. Mutually exclusive with SpeakingRate.

public double? Speed { get; set; }

Property Value

double?

Temperature

Sampling temperature.

public double? Temperature { get; set; }

Property Value

double?

TopK

Top-k sampling.

public int? TopK { get; set; }

Property Value

int?

TopP

Top-p (nucleus) sampling.

public double? TopP { get; set; }

Property Value

double?

Voice

Voice preset name, voice-dir name, or native voice id. Empty/null is omitted.

public string? Voice { get; set; }

Property Value

string

VoiceRef

Voice reference: a server-local path string or a VoiceRefObject.

public object? VoiceRef { get; set; }

Property Value

object

Methods

Validate()

Validates cross-field rules (required fields, instruct XOR instructions, speed XOR speaking_rate, option collisions).

public void Validate()