VoiceConversationOptions
AgentPrism.Core.dllOptions of the real-time voice conversation layer.
public sealed class VoiceConversationOptionsInheritance
Section titled “Inheritance”object ← VoiceConversationOptions
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”This capability changes the hosting model. A conversation
connection stays open for minutes and binds to one server instance (a sticky
session). The capability is therefore optional: no WebSocket endpoint opens and
no behaviour changes until UseVoiceConversation is called.
The type is not a record: option classes must
not produce a ToString that can be written to a log.
Constructors
Section titled “Constructors”VoiceConversationOptions()
Section titled “ VoiceConversationOptions()”public VoiceConversationOptions()Fields
Section titled “Fields”SectionName
Section titled “ SectionName”The default name of the configuration section.
public const string SectionName = "AgentPrism:Voice:Conversation"Field Value
Section titled “Field Value”Properties
Section titled “Properties”IdleTimeout
Section titled “ IdleTimeout”Gets or sets the longest time that can pass without a frame. The default is 2 minutes.
public TimeSpan IdleTimeout { get; set; }Property Value
Section titled “Property Value”InputSampleRate
Section titled “ InputSampleRate”Gets or sets the sample rate (Hz) of clients that send raw PCM. The default is 16,000.
public int InputSampleRate { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”Raw PCM has no header; before the audio goes to the transcription provider the server writes a WAV header, and that header carries this value. A wrong value makes the audio decode at the wrong rate.
MaxConcurrentConnectionsPerTenant
Section titled “ MaxConcurrentConnectionsPerTenant”Gets or sets the maximum number of conversation connections that one tenant can hold open at the same time. The default is 5.
public int MaxConcurrentConnectionsPerTenant { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”An open connection is not a server thread, but it holds a socket, a buffer and an agent session. An unlimited number of connections would let a single tenant fill the server.
MaxConnectionDuration
Section titled “ MaxConnectionDuration”Gets or sets the longest time that a connection can stay open. The default is 30 minutes.
public TimeSpan MaxConnectionDuration { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”When the time expires the connection closes cleanly and the client reconnects. An endless connection means that a leaking resource is never noticed.
MaxSpokenCharactersPerTurn
Section titled “ MaxSpokenCharactersPerTurn”Gets or sets how many characters of one response are spoken. The default is 5,000.
public int MaxSpokenCharactersPerTurn { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”When the limit is exceeded the remaining text is not spoken, but it still streams as captions: the user sees the whole answer and does not get an answer that was silently truncated.
MaxUtteranceBytes
Section titled “ MaxUtteranceBytes”Gets or sets how many bytes a single utterance can hold. The default is 8 MB.
public int MaxUtteranceBytes { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”Next to the duration limit there is also a byte limit: when the client sends arbitrary data instead of audio the duration may never expire.
MaxUtteranceDuration
Section titled “ MaxUtteranceDuration”Gets or sets the longest duration of a single utterance. The default is 60 seconds.
public TimeSpan MaxUtteranceDuration { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”End-of-speech detection (VAD) is on the client; the server does no signal processing. This limit is a safety net: when the VAD of the client never fires the utterance closes on its own and goes to transcription.
OutputMediaType
Section titled “ OutputMediaType”Gets or sets the MIME type of the synthesized audio. The default is
audio/mpeg.
public string OutputMediaType { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”The value must be the same as the configured output format of the
speech provider (AgentPrism:Voice:OutputFormat). Streaming synthesis
returns raw bytes only and does not report the type; the client has to know the
type to decode the audio. A wrong value produces a silent decode failure in the
browser.
PersistAudio
Section titled “ PersistAudio”Gets or sets a value that indicates whether the conversation audio is written
to the attachments table. The default is false.
public bool PersistAudio { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”Voice is personal data. That it is not stored by default is deliberate. When it is enabled the retention policy applies and the user interface shows the user that the audio is recorded — no recording happens silently.
VoiceId
Section titled “ VoiceId”Gets or sets the identifier of the voice that speaks the responses. When it is
empty the default voice of the provider is used
(AgentPrism:Voice:DefaultVoiceId).
public string? VoiceId { get; set; }