Skip to content

VoiceOptions

Namespace AgentPrism · Assembly AgentPrism.Voice.dll

Settings for the voice tools.

public sealed class VoiceOptions

objectVoiceOptions

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

The type cannot be a record: the compiler-generated ToString writes every property, and a single LogDebug("{Options}", o) call would leak VoiceOptions.ApiKey into the log. SecretLeakTests verifies the type does not define its own ToString.

public VoiceOptions()

Default output format.

public const string DefaultOutputFormat = "mp3_44100_128"

string

MP3 is chosen because the attachment store does type checking from the magic byte. pcm_* and ulaw_* outputs have no header and are rejected.

Default name of the configuration section.

public const string SectionName = "AgentPrism:Voice"

string

The API key. A secret: it lives only in dotnet user-secrets or an environment variable.

public string? ApiKey { get; set; }

string?

The key’s value is held here, not its name. The rule forbids writing secrets to the DATABASE; voice configuration never reaches the database, and the other four provider packages also carry a plain ApiKey.

Voice to use when the request gives no voice id.

public string? DefaultVoiceId { get; set; }

string?

Base address. When empty, the provider’s public address is used.

public Uri? Endpoint { get; set; }

Uri?

Maximum characters that can be spoken in a single request. Default 5,000.

public int MaxCharactersPerRequest { get; set; }

int

When the limit is exceeded, the tool returns an error; it does not silently truncate the text. Truncation produces a sentence the user never hears, and the reason becomes invisible.

How many voice requests can run at once. Default 2.

public int MaxConcurrentRequests { get; set; }

int

Output format.

public string OutputFormat { get; set; }

string

Provider name. Currently only elevenlabs is supported.

public string Provider { get; set; }

string

Whether voice tools require explicit approval before a call. Default false.

public bool RequireApproval { get; set; }

bool

The tool causes no irreversible side effect — it produces a file and spends money. Cost can be a reason on its own; that is why the setting exists, off by default.

Default synthesis model.

public string? SynthesisModelId { get; set; }

string?

Request timeout. 100 seconds when empty.

public TimeSpan? Timeout { get; set; }

TimeSpan?

Default transcription model.

public string? TranscriptionModelId { get; set; }

string?