VoiceConversationProtocol
AgentPrism.Core.dllThe frame names and the audio formats of the conversation WebSocket.
public static class VoiceConversationProtocolInheritance
Section titled “Inheritance”object ← VoiceConversationProtocol
Inherited Members
Section titled “Inherited Members”object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”The names stay aligned with the existing SSE contract; the user interface does not carry two different mental models. These are a stable contract: to change them breaks clients.
Text frames are JSON and binary frames are raw audio. The direction follows from the name of the frame, not from its type.
Fields
Section titled “Fields”ClientCancel
Section titled “ ClientCancel”Interruption (barge-in): stop the generation.
public const string ClientCancel = "cancel"Field Value
Section titled “Field Value”ClientCommit
Section titled “ ClientCommit”Speech ended; answer now.
public const string ClientCommit = "commit"Field Value
Section titled “Field Value”ClientStart
Section titled “ ClientStart”Starts the conversation.
public const string ClientStart = "start"Field Value
Section titled “Field Value”ClientStop
Section titled “ ClientStop”Closes the connection.
public const string ClientStop = "stop"Field Value
Section titled “Field Value”ServerAudioEnd
Section titled “ ServerAudioEnd”The audio chunks ended.
public const string ServerAudioEnd = "audioEnd"Field Value
Section titled “Field Value”ServerAudioStart
Section titled “ ServerAudioStart”The binary frames that follow are audio chunks.
public const string ServerAudioStart = "audioStart"Field Value
Section titled “Field Value”ServerDone
Section titled “ ServerDone”The turn ended.
public const string ServerDone = "done"Field Value
Section titled “Field Value”ServerError
Section titled “ ServerError”An error.
public const string ServerError = "error"Field Value
Section titled “Field Value”ServerReady
Section titled “ ServerReady”The server is ready for the conversation.
public const string ServerReady = "ready"Field Value
Section titled “Field Value”ServerRunStarted
Section titled “ ServerRunStarted”The run started; the frame carries its identifier.
public const string ServerRunStarted = "runStarted"Field Value
Section titled “Field Value”ServerText
Section titled “ ServerText”A text response (caption).
public const string ServerText = "text"Field Value
Section titled “Field Value”ServerTranscript
Section titled “ ServerTranscript”The transcribed speech text.
public const string ServerTranscript = "transcript"Field Value
Section titled “Field Value”SubProtocol
Section titled “ SubProtocol”The name of the WebSocket sub-protocol. The handshake echoes it back.
public const string SubProtocol = "agentprism.voice.v1"Field Value
Section titled “Field Value”TokenSubProtocolPrefix
Section titled “ TokenSubProtocolPrefix”The sub-protocol prefix that carries the bearer token.
public const string TokenSubProtocolPrefix = "agentprism.token."Field Value
Section titled “Field Value”Remarks
Section titled “Remarks”The token is not put in the query string: the address is
written to server logs, to reverse proxy logs and to the browser history. A
browser cannot add a custom header to a WebSocket handshake; the standard way
out is the Sec-WebSocket-Protocol header.