Skip to content

Speech Realtime

azure/speech-realtime

Azure AI Speech's streaming speech to text through the Speech SDK, returning interim and final results during continuous recognition, with live speaker diarization via ConversationTranscriber, phrase lists and spoken-language identification. Part of the service since its 2018 launch.

API
import WebSocket from "ws";
import { readFile } from "node:fs/promises";

// Use mono, 16 kHz, signed 16-bit little-endian PCM.
const audio = await readFile("recording.pcm");
const url = new URL("/v1/audio/transcriptions/stream", process.env.AUDIOLAB_API_URL);
url.protocol = url.protocol === "https:" ? "wss:" : "ws:";
const socket = new WebSocket(url, {
  headers: { Authorization: `Bearer ${process.env.AUDIOLAB_API_KEY}` },
});
socket.on("open", () => socket.send(JSON.stringify({
  type: "session.start", model: "azure/speech-realtime",
  encoding: "pcm_s16le", sample_rate: 16000, channels: 1,
})));
socket.on("message", (data) => {
  const event = JSON.parse(data.toString());
  console.log(event);
  if (event.type === "session.started") {
    for (let offset = 0; offset < audio.length; offset += 3200)
      socket.send(audio.subarray(offset, offset + 3200));
    socket.send(JSON.stringify({ type: "session.finish" }));
  }
});
Input Price
$0.0142 / minute
Output Price
—
Input
Audio
Output
Text

Capabilities

Explore what Speech Realtime supports, then use the API section for a request tailored to this model.

StreamDiarizationWord timestampsSegment timestampsConfidenceKeyterms

Languages

Multilingual

Model Information

Product
Speech-to-Text
Release Date
Sep 2018
Data Policy
Configurable
Region
US
Input
Audio
Output
Text
Provider Documentation

Playground

Try Speech Realtime by Microsoft Azure. Requests use the selected workspace’s credits and API pricing.

Speech RealtimeCredits —
Speech Realtime
This model uses a dedicated input format. Explore its API example or open the supported playground.

Providers

Compare available endpoints, pricing, and context limits for Speech Realtime.

ProviderContextOutputInput PriceOutput PriceEndpoint
Microsoft AzureNot specifiedText$0.0142 / minute—
azure/speech-realtime:azure

Prices are catalog rates. Your workspace’s estimate and endpoint pricing determine the final charge.

Input and Output Limits

Formats and limits AudioLab enforces on each request.

LimitValue
Max bytesNot specified
Max secondsNot specified
Formats

Provider Notes

azure/speech-realtime bridges the official Speech SDK continuous recognizer behind AudioLab's WebSocket route and switches to ConversationTranscriber for live speaker diarization. It accepts mono PCM16 at the session sample rate, supports up to four candidate locales for at-start language identification or ten for continuous identification, and limits phrase lists to Microsoft's documented 500 phrases. Time segmentation requires a 20–70 second maximum; semantic segmentation has no silence control. The file-only speech-fast API supports translation, prompt arrays, channels, diarization, and phrase lists. MAI Transcribe 1 and 1.5 remain file-only and do not support diarization, translation, or prompt tuning; 1.5 adds phrase lists and readable/verbatim style. Availability varies by Azure region.

Performance

Status

Current catalog availability. Your workspace’s access is checked separately before a request runs.

Getting Started

Use your workspace API key and the exact model identifier below. Set the API URL to the endpoint shown in your workspace and keep credentials on your server.

API
import WebSocket from "ws";
import { readFile } from "node:fs/promises";

// Use mono, 16 kHz, signed 16-bit little-endian PCM.
const audio = await readFile("recording.pcm");
const url = new URL("/v1/audio/transcriptions/stream", process.env.AUDIOLAB_API_URL);
url.protocol = url.protocol === "https:" ? "wss:" : "ws:";
const socket = new WebSocket(url, {
  headers: { Authorization: `Bearer ${process.env.AUDIOLAB_API_KEY}` },
});
socket.on("open", () => socket.send(JSON.stringify({
  type: "session.start", model: "azure/speech-realtime",
  encoding: "pcm_s16le", sample_rate: 16000, channels: 1,
})));
socket.on("message", (data) => {
  const event = JSON.parse(data.toString());
  console.log(event);
  if (event.type === "session.started") {
    for (let offset = 0; offset < audio.length; offset += 3200)
      socket.send(audio.subarray(offset, offset + 3200));
    socket.send(JSON.stringify({ type: "session.finish" }));
  }
});
Read the Endpoint Reference

Request Parameters

Available parameters depend on the provider and request format. The endpoint reference explains accepted values and required fields.

ParameterDetails
modelazure/speech-realtime — Required model identifier.
locales / channelsView Accepted Values
diarization.enabled / diarization.max_speakers (speech-fast)View Accepted Values
phrase_list.phrases / phrase_list.biasing_weight (speech-fast and MAI 1.5)View Accepted Values
profanity_filter_modeView Accepted Values
enhanced_mode.task / target_language / prompt (speech-fast)View Accepted Values
enhanced_mode.transcribe_style (MAI 1.5)View Accepted Values
language_id_mode / word_timestamps / endpoint_id / dictation (realtime)View Accepted Values
diarization.diarize_interim_results (realtime)View Accepted Values
segmentation_strategy / segmentation silence and maximum time (realtime)View Accepted Values
initial_silence_timeout_ms / start_event_sensitivity / stable_partial_result_threshold (realtime)View Accepted Values
post_processing=true_text (realtime)View Accepted Values

Input and Output Limits

Formats and limits AudioLab enforces on each request.

LimitValue
Max bytesNot specified
Max secondsNot specified
Formats

Similar Models

Explore more speech-to-text and compare their capabilities.

ModelContextInput PriceOutput Price
MAI-Transcribe 2Microsoft AzureNot specified$0.0014 / minute—
MAI-Transcribe 1.5Microsoft AzureNot specified$0.0051 / minute—
MAI-Transcribe 1Microsoft AzureNot specified$0.0142 / minute—
Speech Fast TranscriptionMicrosoft AzureNot specified$0.0051 / minute—
Gemini 3.5 TranscribeGoogle GeminiNot specified$0.0043 / minute—
Saaras v4Sarvam AINot specified₹0.425 / minute—
View All Speech-to-Text