Language

VoiceResult Class

Definition

A persisted voice response representing one model inference turn within a conversation. In list results the output projection may be omitted; retrieve the full response (GET .../responses/{response_id}) or the paged response-items route (GET .../responses/{response_id}/items) for its output items. created_at/completed_at are Foundry durable ordering extensions.

public class VoiceResult : System.ClientModel.Primitives.IJsonModel<Azure.AI.Projects.Agents.VoiceResult>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.Projects.Agents.VoiceResult>
type VoiceResult = class
    interface IJsonModel<VoiceResult>
    interface IPersistableModel<VoiceResult>
Public Class VoiceResult
Implements IJsonModel(Of VoiceResult), IPersistableModel(Of VoiceResult)
Inheritance
VoiceResult
Implements

Properties

Name Description
Audio

The audio configuration used for the response, including the voice and audio format used for output.

CompletedOn

The Unix timestamp (in seconds) for when the response completed.

ConversationId

Which conversation the response is added to, determined by the conversation field in the response.create event. If auto, the response will be added to the default conversation and the value of conversation_id will be an id like conv_1234. If none, the response will not be added to any conversation and the value of conversation_id will be null. If responses are being triggered automatically by VAD the response will be added to the default conversation

CreatedOn

The Unix timestamp (in seconds) for when the response was created.

Id

The unique ID of the response, will look like resp_1234.

MaxOutputTokens

Maximum number of output tokens for a single assistant response, inclusive of tool calls, that was used in this response.

To assign an object to this property use FromObjectAsJson<T>(T, JsonSerializerOptions).

To assign an already formatted json string to this property use FromString(String).

<remarks> Supported types:

</remarks>

Examples:

  • BinaryData.FromObjectAsJson("foo"). : Creates a payload of "foo".
  • BinaryData.FromString("\"foo\""). : Creates a payload of "foo".
  • BinaryData.FromObjectAsJson(new { key = "value" }). : Creates a payload of { "key": "value" }.
  • BinaryData.FromString("{\"key\": \"value\"}"). : Creates a payload of { "key": "value" }.

Metadata

Gets the Metadata.

To assign an object to the value of this property use FromObjectAsJson<T>(T, JsonSerializerOptions).

To assign an already formatted json string to this property use FromString(String).

Examples:

  • BinaryData.FromObjectAsJson("foo"). : Creates a payload of "foo".
  • BinaryData.FromString("\"foo\""). : Creates a payload of "foo".
  • BinaryData.FromObjectAsJson(new { key = "value" }). : Creates a payload of { "key": "value" }.
  • BinaryData.FromString("{\"key\": \"value\"}"). : Creates a payload of { "key": "value" }.

Object

The object type, must be realtime.response.

Output

The list of output items generated by the response.

OutputModalities

The set of modalities the model used to respond, currently the only possible values are [\"audio\"], [\"text\"]. Audio output always include a text transcript. Setting the output to mode text will disable audio output from the model.

Status

The final status of the response (completed, cancelled, failed, or incomplete, in_progress).

StatusDetails

Additional details about the status.

Temperature

The sampling temperature used for the response.

Usage

Usage statistics for the Response, this will correspond to billing. A Realtime API session will maintain a conversation context and append new Items to the Conversation, thus output from previous turns (text and audio tokens) will become the input for later turns.

Methods

Name Description
JsonModelCreateCore(Utf8JsonReader, ModelReaderWriterOptions)
JsonModelWriteCore(Utf8JsonWriter, ModelReaderWriterOptions)
PersistableModelCreateCore(BinaryData, ModelReaderWriterOptions)
PersistableModelWriteCore(ModelReaderWriterOptions)

Operators

Name Description
Explicit(ClientResult to VoiceResult)

Explicit Interface Implementations

Name Description
IJsonModel<VoiceResult>.Create(Utf8JsonReader, ModelReaderWriterOptions)
IJsonModel<VoiceResult>.Write(Utf8JsonWriter, ModelReaderWriterOptions)
IPersistableModel<VoiceResult>.Create(BinaryData, ModelReaderWriterOptions)
IPersistableModel<VoiceResult>.GetFormatFromOptions(ModelReaderWriterOptions)
IPersistableModel<VoiceResult>.Write(ModelReaderWriterOptions)

Applies to