VoiceOptions
AgentPrism.Voice.dllSettings for the voice tools.
public sealed class VoiceOptionsInheritance
Section titled “Inheritance”Inherited Members
Section titled “Inherited Members”object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”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.
Constructors
Section titled “Constructors”VoiceOptions()
Section titled “ VoiceOptions()”public VoiceOptions()Fields
Section titled “Fields”DefaultOutputFormat
Section titled “ DefaultOutputFormat”Default output format.
public const string DefaultOutputFormat = "mp3_44100_128"Field Value
Section titled “Field Value”Remarks
Section titled “Remarks”MP3 is chosen because the attachment store does type checking from the
magic byte. pcm_* and ulaw_* outputs have no header
and are rejected.
SectionName
Section titled “ SectionName”Default name of the configuration section.
public const string SectionName = "AgentPrism:Voice"Field Value
Section titled “Field Value”Properties
Section titled “Properties”ApiKey
Section titled “ ApiKey”The API key. A secret: it lives only in
dotnet user-secrets or an environment variable.
public string? ApiKey { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”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.
DefaultVoiceId
Section titled “ DefaultVoiceId”Voice to use when the request gives no voice id.
public string? DefaultVoiceId { get; set; }Property Value
Section titled “Property Value”Endpoint
Section titled “ Endpoint”Base address. When empty, the provider’s public address is used.
public Uri? Endpoint { get; set; }Property Value
Section titled “Property Value”Uri?
MaxCharactersPerRequest
Section titled “ MaxCharactersPerRequest”Maximum characters that can be spoken in a single request. Default 5,000.
public int MaxCharactersPerRequest { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”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.
MaxConcurrentRequests
Section titled “ MaxConcurrentRequests”How many voice requests can run at once. Default 2.
public int MaxConcurrentRequests { get; set; }Property Value
Section titled “Property Value”OutputFormat
Section titled “ OutputFormat”Output format.
public string OutputFormat { get; set; }Property Value
Section titled “Property Value”Provider
Section titled “ Provider”Provider name. Currently only elevenlabs is supported.
public string Provider { get; set; }Property Value
Section titled “Property Value”RequireApproval
Section titled “ RequireApproval”Whether voice tools require explicit approval before a call. Default false.
public bool RequireApproval { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”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.
SynthesisModelId
Section titled “ SynthesisModelId”Default synthesis model.
public string? SynthesisModelId { get; set; }Property Value
Section titled “Property Value”Timeout
Section titled “ Timeout”Request timeout. 100 seconds when empty.
public TimeSpan? Timeout { get; set; }Property Value
Section titled “Property Value”TranscriptionModelId
Section titled “ TranscriptionModelId”Default transcription model.
public string? TranscriptionModelId { get; set; }