AI Summary: This article covers how to use the Whisper API for phone call transcription in 2026, targeting backend engineers who need to connect PSTN or SIP audio to OpenAI’s transcription models. The Whisper API accepts files up to 25 MB in formats including wav, mp3, and ogg, but OpenAI’s documentation does not specify a supported sample rate, which creates a resampling requirement when bridging 8 kHz telephony audio. Developers must decide between file upload for completed recordings and a live WebSocket session for in-call transcription, and must supply carrier connectivity, call recording, and audio conversion themselves. Teler provides the WebSocket media transport and phone number provisioning layer that sits between the carrier and the transcription model.
Scope: This walkthrough covers file transcription and live WebSocket transcription using the Whisper API (whisper-1) and the newer gpt-4o-transcribe model against a live PSTN call, verified against OpenAI API documentation as of September 2026. It does not cover SIP-side PBX configuration or on-premise Whisper deployments.
Quick Answer: To use the Whisper API for phone call transcription in 2026, record the call audio, convert it to a supported format such as wav or mp3, and POST it to v1/audio/transcriptions. For live in-call transcription, open a WebSocket to wss://api.openai.com/v1/realtime?intent=transcription and stream audio chunks. Neither path includes PSTN connectivity or carrier access, which you must supply separately.
The Whisper API gives developers a direct HTTP and WebSocket interface for converting speech to text, but wiring it to a live phone call requires bridging a gap between telephony audio formats and the model’s input requirements. This article walks through both paths.
What is the Whisper API?
The Whisper API is a speech-to-text service from OpenAI that converts recorded or live audio into text via an HTTP endpoint or a WebSocket session. It occupies the transcription layer of a voice stack: it receives audio and returns text, and it does not handle call routing, carrier connectivity, or conversational turn-taking. The model identifier for the original version is whisper-1, which OpenAI now describes as historical; the current recommended models for file transcription are gpt-transcribe and gpt-4o-transcribe. A developer building a phone transcription system must supply the telephony transport, the call recording or media streaming path, and any audio format conversion before the API receives a single byte.

Why is phone call transcription with the Whisper API harder than it looks?
PSTN (Public Switched Telephone Network) audio arrives as 8 kHz PCM, encoded to G.711 mu-law or a-law per ITU-T G.711. The Whisper API accepts wav, mp3, mp4, mpeg, mpga, m4a, ogg, flac, and webm, but OpenAI’s documentation does not specify a minimum or target sample rate for any of those containers. That silence creates a practical problem: you must resample and repackage the carrier audio before the model sees it, and the resampling hop adds latency and a potential quality loss that compounds every other delay in the pipeline.
Beyond format, there is a latency constraint. Developers on the OpenAI community forum report that transcribing 20 seconds of speech can take roughly 5 seconds with the batch endpoint, and even short utterances of four words can take over 3 seconds (OpenAI Developer Community, 2023 and 2024). That budget is incompatible with a conversational loop where a caller expects a response within a second or two. The batch path works for completed recordings; the live path requires a different architecture.
What does the audio path from carrier to model actually look like?
Every hop in the chain owns a piece of the latency and format budget. The table below maps each hop for both the batch and live paths.
| Hop | Format in | Format out | Transport | Owner |
|---|---|---|---|---|
| Carrier to telephony layer | G.711 8 kHz PCM | RTP over UDP (per RFC 3550) | SIP/RTP | Carrier + telephony provider |
| Telephony layer to media bridge | RTP stream | Raw PCM or wav chunks | WebSocket or internal pipe | Telephony provider (e.g., Teler) |
| Media bridge to STT model | wav / mp3 / ogg | Transcript JSON or events | HTTP POST or WebSocket | Developer + OpenAI |
| STT model response to application | Transcript events | Text string | HTTP response or WebSocket frame | OpenAI |
Teler streams call audio over WebSocket at either 8k or 16k sample rate, configurable per session. When connecting to OpenAI’s Realtime API, which operates at 24 kHz, the developer must resample the 8k stream before forwarding it. That resampling step is the single most common source of unexpected latency in this stack.

What do you need before writing a line of code?
- An OpenAI account with an API key scoped to audio endpoints
- A Teler account with at least one provisioned phone number (available in 50+ countries via the Teler API); see Teler documentation for number provisioning steps
- Python 3.10+ or Node.js 18+ with the
openaiSDK installed (pip install openaiornpm install openai) - A WebSocket client library:
websocketsfor Python or the built-inwsmodule for Node.js - An audio resampling library:
ffmpegon the system path, orlibrosa/soundfilefor Python - Network reachability from your server to
api.openai.comon port 443 and to Teler’s WebSocket endpoint - A SIP trunk or DID (Direct Inward Dialing) number pointed at Teler, if you are bridging an existing PBX
How do you implement Whisper API transcription for phone calls?
Step 1: Record and export the call audio
For batch transcription, the call must be fully recorded before you send it. Teler exposes a recording endpoint that returns a signed URL with a configurable lifetime of 60 to 86400 seconds (default 900). Download the file and confirm it is in a format the transcription endpoint accepts. If the carrier delivered G.711 mu-law, convert it to wav or mp3 before uploading.
import subprocess
def convert_g711_to_wav(input_path: str, output_path: str) -> None:
# Resample 8 kHz G.711 mu-law to 16 kHz PCM wav
subprocess.run(
[
"ffmpeg", "-y",
"-f", "mulaw", "-ar", "8000", "-ac", "1",
"-i", input_path,
"-ar", "16000", "-ac", "1",
output_path,
],
check=True,
)
The -ar 16000 flag sets the output sample rate; adjust it based on what your transcription model performs best on, but keep the output under the 25 MB file limit.
Step 2: POST the file to the transcription endpoint
The file transcription endpoint is POST /v1/audio/transcriptions. The model field accepts whisper-1, gpt-transcribe, or gpt-4o-transcribe. Use response_format=verbose_json if you need word-level timestamps for downstream processing.
from openai import OpenAI
client = OpenAI() # reads OPENAI_API_KEY from environment
with open("call_recording.wav", "rb") as audio_file:
transcript = client.audio.transcriptions.create(
model="whisper-1",
file=audio_file,
response_format="verbose_json",
timestamp_granularities=["word"],
)
print(transcript.text)
The timestamp_granularities parameter is only valid with verbose_json; passing it with text or srt will return an error.
Step 3: Open a live WebSocket session for in-call transcription
For live transcription during an active call, the correct endpoint is the Realtime transcription WebSocket. Developers on the OpenAI community forum discovered that ?intent=transcription is required in the connection URL, and that connecting with just a model name returns a model-not-supported error. After connecting, send a transcription_session.update payload before streaming audio.
import asyncio
import json
import websockets
import os
OPENAI_API_KEY = os.environ["OPENAI_API_KEY"]
URL = "wss://api.openai.com/v1/realtime?intent=transcription"
async def transcribe_live(audio_chunks):
headers = {
"Authorization": f"Bearer {OPENAI_API_KEY}",
"OpenAI-Beta": "realtime=v1",
}
async with websockets.connect(URL, additional_headers=headers) as ws:
# Configure the transcription session
await ws.send(json.dumps({
"type": "transcription_session.update",
"session": {"model": "whisper-1"},
}))
async for chunk in audio_chunks:
await ws.send(json.dumps({
"type": "input_audio_buffer.append",
"audio": chunk, # base64-encoded PCM
}))
async for message in ws:
event = json.loads(message)
if event.get("type") == "transcript":
print(event["text"])
Audio chunks must be base64-encoded; send them in the order they arrive from the media stream to avoid out-of-sequence transcript events.
Step 4: Bridge Teler’s media stream to the transcription session
Teler delivers call audio over a WebSocket connection to your server. Configure the stream at 16k sample rate and a chunk size between 20 and 2000 ms (in multiples of 20; the default is 400 ms). Your server receives audio frames, resamples if needed, and forwards them to the OpenAI WebSocket. To flush queued playback during a barge-in event, send {"type": "clear"} to Teler’s media socket. See the Teler media streaming documentation for the full message schema.
import base64
async def handle_teler_frame(frame: bytes, openai_ws) -> None:
# frame arrives as raw PCM from Teler at configured sample rate
encoded = base64.b64encode(frame).decode("utf-8")
await openai_ws.send(json.dumps({
"type": "input_audio_buffer.append",
"audio": encoded,
}))
Send at least 500 ms of audio back into the call per write to avoid choppy playback on the caller’s end.
Most teams discover their latency problem is not the model itself. It is the resampling hop they inserted between the carrier and the STT engine, often without measuring it. Profile that conversion step first before tuning chunk sizes or switching models.
– Subhash Kalluri, Founder & CEO, FreJun
What breaks in production when using the Whisper API for phone calls?
| Symptom | Root cause | Fix |
|---|---|---|
| 20 seconds of speech takes 5 seconds to transcribe | Batch endpoint buffers the full segment before processing; no native streaming partials | Chunk audio with VAD to flush shorter segments, or move to the Realtime WebSocket path |
| Sliding window produces duplicate or stitched text | Whisper is not a native streaming ASR pipeline; repeated transcription of overlapping windows creates redundant output | Use word timestamps to deduplicate; flush on VAD silence boundaries rather than fixed intervals |
| WebSocket connection returns model-not-supported error | Connecting with ?model=whisper-1 instead of ?intent=transcription; older samples do not match the current session shape | Connect to wss://api.openai.com/v1/realtime?intent=transcription and send transcription_session.update before streaming audio |
| Socket connects but audio never produces transcript events | Unresolved in community reports; likely a session configuration or audio encoding mismatch | Verify base64 encoding of PCM chunks and confirm transcription_session.update was acknowledged before sending audio |
| Interruption handling breaks conversational flow | Whisper has no built-in VAD or turn-taking control plane | Add a separate VAD layer such as Silero or webrtcvad outside the STT path; handle barge-in at the telephony layer |
The failure that catches most teams is the batch latency problem. Developers often prototype with the file upload endpoint, measure acceptable accuracy, and then discover in load testing that the round-trip time is incompatible with a live call. The fix is architectural, not a parameter change: the live WebSocket path and a VAD-based flush strategy are required from the start if the use case involves a caller waiting for a response. It is worth noting that Teler’s WebSocket transport adds its own processing hop, and while the platform targets sub-100ms packet delivery as a design specification, that figure does not include the STT model’s inference time.
Which transcription approach fits which phone call use case?
| Approach | Where media terminates | Latency cost | Operational burden | Best for |
|---|---|---|---|---|
File upload batch (POST /v1/audio/transcriptions) | OpenAI after upload | Full recording duration plus processing; 5s+ for 20s clips reported | Low: one HTTP call per recording | Post-call analytics, compliance archiving, QA review |
Live WebSocket (wss://api.openai.com/v1/realtime?intent=transcription) | OpenAI via persistent socket | Lower per-chunk; still not sub-second without VAD tuning | Medium: session management, reconnect logic, VAD | Live captions, in-call agent assist, real-time sentiment |
| Telephony bridge (media server forwards converted stream) | Your media server, then OpenAI | Adds resampling and forwarding hop | High: jitter buffer, resampling, format conversion | Existing PBX integrations where you control the media path |
| Out-of-band Realtime session (parallel transcription channel) | OpenAI via separate session | Decoupled from agent turn-taking | Medium-high: two concurrent sessions to orchestrate | Agent architectures needing a transcript channel independent of TTS playback |
For most new builds in 2026, the live WebSocket path with a VAD flush strategy is the right starting point. Choose the batch path when the call is already recorded and latency is not a constraint. Choose the telephony bridge approach only when an existing media server already terminates the call and rebuilding that path is not feasible. The community project WhisperLive by Collabora (last updated September 2026) demonstrates a nearly-live implementation pattern worth reviewing before building a custom bridge.
Frequently asked questions
What audio formats does the Whisper API accept for phone call recordings?
The transcription endpoint accepts flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, and webm. PSTN calls typically arrive as G.711 mu-law or a-law at 8 kHz, which is not in that list. You must convert the raw telephony audio to one of the supported containers before uploading. The file size limit is 25 MB; longer recordings must be split before submission.
Why does the Whisper API WebSocket return a model-not-supported error?
Connecting with ?model=whisper-1 in the URL triggers this error. The correct URL is wss://api.openai.com/v1/realtime?intent=transcription, and you must send a transcription_session.update message immediately after the connection opens. This requirement was not documented in early versions of the Realtime API guide and was discovered by developers through trial and error on the OpenAI community forum in late 2025.
Should I use SIP or WebSocket to connect my phone system to the transcription pipeline?
SIP handles call signaling and carrier connectivity; WebSocket carries the media stream to the transcription model. They are not alternatives: you need SIP (or a SIP trunk via a provider like Teler) to receive the call, and then a WebSocket session to forward the audio to OpenAI. Teler supports both SIP credential authentication and IP-based access control lists for the SIP leg, then delivers the media over WebSocket to your application server.
What happens to transcription accuracy under high call volume?
OpenAI’s documentation does not publish concurrency limits or per-minute rate limits for the transcription endpoint. Under high load, you should expect rate-limit responses and build retry logic with exponential backoff. The batch endpoint is easier to queue and retry than a live WebSocket session, so high-volume post-call transcription workloads are better suited to the file upload path with a job queue in front of it.
Does the Whisper API handle DTMF tones in phone call audio?
The Whisper API transcribes speech; it does not parse or strip DTMF (Dual-Tone Multi-Frequency) tones. If a caller presses digits during a call, those tones will appear as audio artifacts in the transcript or be silently dropped, depending on whether they were transmitted in-band or out-of-band. DTMF handling belongs at the telephony layer. Teler exposes a DTMF control interface with configurable tone duration of 40 to 1000 ms, separate from the media stream sent to the STT model.
What must I build myself that the Whisper API does not provide?
The Whisper API provides transcription only. You must build or source: PSTN carrier connectivity and phone number provisioning, call recording or live media streaming, audio format conversion and resampling, VAD for flush timing, interruption and barge-in handling, jitter buffering per RFC 3550, and any downstream LLM or TTS integration. The Teler programmable voice API covers the carrier, number provisioning, and WebSocket media transport pieces of that list.
Is whisper-1 still the right model to use in 2026?
whisper-1 remains available and is the only model that returns verbose_json with word-level timestamps in the current documentation. For general transcription accuracy, OpenAI now recommends gpt-transcribe or gpt-4o-transcribe as the starting point. If your pipeline depends on word timestamps for downstream alignment or speaker diarization, whisper-1 is still the documented path. Check the OpenAI speech-to-text guide for the current model comparison before committing to a model identifier in production.
How do I evaluate alternative speech-to-text providers if the Whisper API latency is too high?
Latency under real telephony conditions varies significantly across providers. A community benchmark published in May 2025 on Reddit’s r/speechtech tested 12 speech-to-text APIs and found that providers with adjustable latency settings, such as Speechmatics Ursa, maintained lower word error rates at reduced latency compared to Whisper-based approaches. The Top 7 Best Speech-to-Text API Providers in the US covers the current provider landscape if you need to evaluate alternatives.
What the Whisper API gives you and where to go next
The Whisper API gives developers a well-documented transcription endpoint that handles a wide range of audio formats, but using it for phone call transcription in 2026 requires solving the carrier connectivity, audio conversion, and latency problems independently. The single most important decision is whether your use case tolerates batch latency: if it does, the file upload path is simple and reliable; if it does not, the live WebSocket path with VAD-based flushing is the only viable route. For teams building on top of live PSTN calls, pairing the Whisper API with a telephony infrastructure layer that exposes raw media streams over WebSocket, such as Teler, removes the carrier and streaming plumbing from your application code. Review the OpenAI Whisper Alternatives in 2025: Faster, Cheaper, and More Scalable post if the latency profile of whisper-1 does not fit your call volume or response time requirements.