Voice Live API for Voice Agents

This content was generated with the assistance of AI and should be verified against the official documentation before being relied on in production.

See the section bibliography for the reference material consulted while preparing these pages.

This page targets Azure CLI 2.90.0, the Voice Live api-version 2026-04-10 and the SDKs azure-ai-voicelive 1.3.0 (Python), Azure.AI.VoiceLive 1.2.0 (.NET), com.azure:azure-ai-voicelive 1.1.0 (Java) and @azure/ai-voicelive 1.1.0 (JavaScript), checked on 2026-10-06.

Voice Live is a managed, low-latency speech-to-speech API for building voice agents. You open one WebSocket, stream microphone audio in, and get synthesized speech back, with the speech recognition, the model call, the voice and the turn-taking handled by the service. Its events are compatible with the Azure OpenAI Realtime API, so clients written for one mostly work with the other.

The vendor-neutral design questions (cascaded vs speech-to-speech, turn-taking, production concerns) are covered on Realtime APIs, Voice Architectures, Turn-Taking and Interruptions and Production Voice Agents.

Features

  • Audio input processing: noise suppression and server-side echo cancellation, so the agent doesn’t hear itself on a speakerphone.

  • Turn detection: semantic end-of-turn detection (not only silence) and interruption detection (barge-in), so the user can talk over the agent.

  • Model choice: native realtime models (gpt-realtime, gpt-realtime-mini) or a text model (GPT-5.x, GPT-4.1, Phi) with Azure speech recognition and synthesis wrapped around it.

  • Voices: any Azure neural or HD voice, a custom voice, or the model’s own voice.

  • Function calling: the model can call tools you declare in the session, and you send back the result.

  • Avatars: a standard or custom text-to-speech avatar streamed over WebRTC.

  • Customization: phrase lists and custom speech models for recognition, custom voice for output.

Models and pricing tiers

Voice Live is billed per token, in three tiers that group the supported models:

Tier Models (examples)

Pro

gpt-realtime, gpt-5, gpt-4.1

Standard

gpt-realtime-mini, gpt-4.1-mini, gpt-5-mini

Lite

gpt-5-nano, phi4-mm-realtime, phi4-mini

Custom voice and avatar output are billed on top. Check the Voice Live pricing page for the current model list.

Endpoint and SDKs

  • WebSocket endpoint: wss://<resource>.services.ai.azure.com/voice-live/realtime?api-version=2026-04-10&model=<model>

  • Authentication: Entra ID bearer token (scope https://ai.azure.com/.default or https://cognitiveservices.azure.com/.default), or an api-key header for quick tests.

  • SDKs: azure-ai-voicelive, Azure.AI.VoiceLive, com.azure:azure-ai-voicelive, @azure/ai-voicelive.

Provisioning

In the Azure portal

  1. Use the Foundry resource foundry-bookshelf (Resources, Endpoints and Authentication).

  2. In the Foundry portal (https://ai.azure.com), open Playgrounds → Speech playground → Voice Live. Pick a model, a voice and turn detection options, and talk to it.

  3. View code shows the session configuration you chose as JSON.

  4. Assign Cognitive Services User (or Azure AI User) to the identity that opens the WebSocket.

With the Azure CLI

az role assignment create \
  --assignee "$(az identity show --name id-orders-api --resource-group "$RG" --query principalId -o tsv)" \
  --role "Cognitive Services User" \
  --scope "$(az cognitiveservices account show --name "$FOUNDRY" --resource-group "$RG" --query id -o tsv)"

Session flow

sequenceDiagram participant Client as Bookshelf voice client participant VL as Voice Live participant Orders as orders-api Client->>VL: Open WebSocket with bearer token Client->>VL: session.update with voice, turn detection and tools VL-->>Client: session.updated Client->>VL: input_audio_buffer.append, microphone audio VL-->>Client: input_audio_buffer.speech_stopped VL-->>Client: response.function_call_arguments.done get_order_status Client->>Orders: GET orders by id Orders-->>Client: status shipped, eta 2026-10-09 Client->>VL: conversation.item.create function_call_output Client->>VL: response.create VL-->>Client: response.audio.delta, synthesized speech VL-->>Client: response.done

Bookshelf: a voice order-status assistant

Customers call or click Talk to us and ask "Where is my order?". The assistant asks for the order number, calls orders-api through a function tool, and reads back the status.

import asyncio, json
from azure.ai.voicelive.aio import connect
from azure.ai.voicelive.models import (
    AzureStandardVoice, FunctionTool, RequestSession, ServerEventType, AzureSemanticVad,
)
from azure.identity.aio import DefaultAzureCredential

TOOLS = [FunctionTool(
    name="get_order_status",
    description="Look up a Bookshelf order by its number",
    parameters={"type": "object", "properties": {"order_id": {"type": "string"}}, "required": ["order_id"]},
)]

async def main():
    async with connect(
        endpoint="https://foundry-bookshelf.services.ai.azure.com/",
        credential=DefaultAzureCredential(),
        model="gpt-realtime-mini",
    ) as conn:
        await conn.session.update(session=RequestSession(
            instructions="You are Bookshelf's order assistant. Be brief.",
            voice=AzureStandardVoice(name="en-US-AvaMultilingualNeural"),
            turn_detection=AzureSemanticVad(),
            tools=TOOLS,
        ))
        async for event in conn:   # microphone streaming omitted for brevity
            if event.type == ServerEventType.RESPONSE_FUNCTION_CALL_ARGUMENTS_DONE:
                args = json.loads(event.arguments)
                status = await lookup_order(args["order_id"])  # calls orders-api
                await conn.conversation.item.create(item={
                    "type": "function_call_output", "call_id": event.call_id, "output": json.dumps(status)})
                await conn.response.create()

asyncio.run(main())
using Azure.AI.VoiceLive;
using Azure.Identity;

var client = new VoiceLiveClient(
    new Uri("https://foundry-bookshelf.services.ai.azure.com/"), new DefaultAzureCredential());

await using VoiceLiveSession session = await client.StartSessionAsync("gpt-realtime-mini");

var options = new VoiceLiveSessionOptions
{
    Instructions = "You are Bookshelf's order assistant. Be brief.",
    Voice = new AzureStandardVoice("en-US-AvaMultilingualNeural"),
    TurnDetection = new AzureSemanticVadTurnDetection(),
};
options.Tools.Add(new VoiceLiveFunctionDefinition("get_order_status")
{
    Description = "Look up a Bookshelf order by its number",
    Parameters = BinaryData.FromString(
        """{"type":"object","properties":{"order_id":{"type":"string"}},"required":["order_id"]}"""),
});
await session.ConfigureSessionAsync(options);

await foreach (SessionUpdate update in session.GetUpdatesAsync())
{
    if (update is SessionUpdateResponseFunctionCallArgumentsDone call)
    {
        string status = await OrdersApi.GetStatusJsonAsync(call.Arguments);
        await session.AddItemAsync(new FunctionCallOutputItem(call.CallId, status));
        await session.StartResponseAsync();
    }
}
import com.azure.ai.voicelive.VoiceLiveAsyncClient;
import com.azure.ai.voicelive.VoiceLiveClientBuilder;
import com.azure.ai.voicelive.models.*;
import com.azure.identity.DefaultAzureCredentialBuilder;

VoiceLiveAsyncClient client = new VoiceLiveClientBuilder()
    .endpoint("https://foundry-bookshelf.services.ai.azure.com/")
    .credential(new DefaultAzureCredentialBuilder().build())
    .buildAsyncClient();

client.startSession("gpt-realtime-mini").flatMap(session ->
    session.sendEvent(new ClientEventSessionUpdate(new VoiceLiveSessionOptions()
            .setInstructions("You are Bookshelf's order assistant. Be brief.")
            .setVoice(new AzureStandardVoice("en-US-AvaMultilingualNeural"))))
        .thenMany(session.receiveEvents())
        .doOnNext(event -> System.out.println(event.getType()))
        .then()
).block();

The raw protocol is plain JSON over WebSocket, which is handy for debugging with a generic client such as websocat. Get a token with the Azure CLI, send session.update, and check the host with curl:

TOKEN=$(az account get-access-token --scope https://ai.azure.com/.default --query accessToken -o tsv)

echo '{"type":"session.update","session":{"instructions":"Be brief.","voice":{"type":"azure-standard","name":"en-US-AvaMultilingualNeural"},"turn_detection":{"type":"azure_semantic_vad"}}}' \
  | websocat -H "Authorization: Bearer $TOKEN" \
    "wss://$FOUNDRY.services.ai.azure.com/voice-live/realtime?api-version=2026-04-10&model=gpt-realtime-mini"

# Check that the resource exposes the services.ai.azure.com host
curl -s -o /dev/null -w "%{http_code}\n" "https://$FOUNDRY.services.ai.azure.com/" -H "Authorization: Bearer $TOKEN"

Voice Live vs a cascaded pipeline

Concern Voice Live Your own STT → LLM → TTS pipeline

Latency

One round trip, server-side streaming between stages.

Three services, each adding network and buffering delay.

Turn-taking

Semantic end-of-turn and barge-in built in.

You implement VAD, endpointing and cancellation of in-flight TTS.

Audio quality

Noise suppression and echo cancellation on the server.

Your client or another service must do it.

Control

Configured through session options. Fewer knobs.

Full control over every stage, any vendor per stage, and inspectable text between stages.

Cost visibility

One per-token bill by tier.

Three bills (audio hours, tokens, characters).

Choose a cascaded pipeline when you must log or redact the intermediate text, mix vendors, or run some stages in containers. Choose Voice Live for the fastest path to a natural-sounding agent.

Use cases

Scenario Feature Why this feature Example input → output

Bookshelf: voice order-status assistant

Function calling to orders-api, semantic VAD

Short, transactional conversations; customers interrupt.

"Where’s order 4512?" → spoken "It shipped yesterday and arrives Friday."

Contact-center agents

Realtime model, custom voice, avatar

Natural conversation at scale; brand voice.

Billing question → answer plus handoff to a human

Automotive assistants

Noise suppression, echo cancellation

Road noise and in-car speakers.

"Find a charger nearby" → spoken directions

Public-service hotlines

Multilingual voices, LID

Callers speak many languages.

Question in Arabic → answer in Arabic

When not to use it