Speaker-labeled transcription with WhisperX on SageMaker AI AWS released a WhisperX Deep Learning Container that packages OpenAI's Whisper with wav2vec2 forced alignment for per-word timestamps and speaker diarization, deployable to Amazon SageMaker AI real-time or asynchronous endpoints without building a custom image. The container serves on port 8080, exposes POST /invocations and GET /ping, accepts multipart/form-data audio with optional language, diarize, and response_format fields, and returns json, verbose_json, srt, or vtt output. AWS recommends the asynchronous endpoint for long audio and the real-time endpoint for short clips. Artificial Intelligence https://aws.amazon.com/blogs/machine-learning/ Speaker-labeled transcription with WhisperX on SageMaker AI Any team working with spoken audio hits the same wall with generic speech-to-text. Think contact-center calls, all-hands meetings, podcasts, depositions, and broadcast media. These workloads need two things that standard transcription gets wrong. First, timestamps land at the utterance level, off by several seconds. Second, there’s no reliable answer to “who said what.” Those gaps make transcripts hard to search, caption, redact, or analyze at scale. A missing speaker label breaks compliance review, and an imprecise timestamp breaks a caption or a redaction. WhisperX closes both gaps. It wraps OpenAI’s Whisper with batched inference, adds wav2vec2 forced alignment for precise per-word timestamps, and adds speaker diarization to label who spoke. These capabilities map directly to real workloads. Contact centers can measure talk time, check script adherence, and run sentiment analysis, while teams turn meetings into searchable notes. Media and e-learning teams generate accurate captions in SubRip Subtitle SRT and Web Video Text Tracks VTT format for large content libraries. Time-sensitive uses get text the moment someone speaks. In regulated fields like healthcare, legal, and finance, speaker-labeled transcripts support audits and legal discovery. The AWS WhisperX Deep Learning Container DLC packages all of this into a GPU-ready image. You deploy it to an Amazon SageMaker AI real-time or asynchronous endpoint without building a custom image. In this post, we show how to deploy both endpoint types and when to choose each. We also cover the production details that matter: the GPU AMI pin, scaling, Amazon Simple Storage Service Amazon S3 setup, and cost controls. This post is part of a multimodal series showcasing specialized AWS DLCs. The series spans three AWS DLCs across four use cases: 1 vLLM-Omni for text-to-speech, 2 vLLM-Omni for image and video, 3 WhisperX for speech-to-text this post , and 4 llama.cpp. What is WhisperX, and what workloads it unlocks Whisper is a popular open source automatic speech recognition ASR model family from OpenAI that transcribes spoken audio into text accurately across many languages. It focuses on high-quality transcription and produces timestamps at the phrase or segment level. WhisperX is an open source project that builds on Whisper and extends it for production workloads. It adds per-word timestamps, speaker labels, and faster transcription, three capabilities that together turn raw audio into structured, analyzable transcripts. Why a purpose-built Deep Learning Container The AWS WhisperX DLC is a maintained, GPU-ready image that already contains Whisper, the alignment models, and the diarization weights, with no Hugging Face token required. It follows the standard Amazon SageMaker AI serving contract, so you deploy it like any other model. - Serving contract: The container serves on port 8080 and exposes POST /invocations for inference and GET /ping for health checks. - Request format: The endpoint expects multipart/form-data , with the audio as the file part plus optional string fields such as language , diarize , and response format . Amazon SageMaker AI passes the ContentType header including the multipart boundary through to the container unchanged. - Output formats: json , verbose json , srt , and vtt , so the same endpoint feeds analytics pipelines and video editors alike. Choosing between real-time and asynchronous endpoints Amazon SageMaker AI supports both real-time and asynchronous endpoints, so you can serve the same WhisperX DLC through either pattern. The decision usually comes down to clip length and interactivity. For long audio, use the asynchronous endpoint: it’s the recommended path when transcription, alignment, and diarization need more time to run. Reserve the real-time endpoint for short, interactive clips that finish within the Amazon SageMaker AI 60-second response cap. | Dimension | Real-time endpoint | Asynchronous endpoint | | Best for | Short, interactive clips | Long audio, high-volume batch | | Latency | Synchronous, must finish < 60s | Submit-and-poll. No response cap | | Invocation | InvokeEndpoint inline body | InvokeEndpointAsync S3 reference | | I/O | Body in request / response | Input + output in Amazon S3 | | Scaling | Add instances one request/container | Add instances. Can autoscale to zero | | Cost profile | Bills while endpoint is up | Scale-to-zero when idle saves cost | Solution architecture Both patterns share the same container contract. Amazon SageMaker AI forwards each request to the WhisperX DLC on port 8080 . The real-time pattern is synchronous, and the asynchronous pattern brokers input and output through Amazon S3. Instance selection ml.g4dn.xlarge for cost, ml.g5.2xlarge for headroom and the required GPU AMI pin apply to both, and you scale throughput by adding instances rather than concurrency. The request/response sequence for each endpoint type is shown in its walkthrough section. Prerequisites 1. An AWS account and an Amazon SageMaker AI execution role that can create model , create endpoint , and for asynchronous inference read and write S3. 2. GPU service quota for your endpoint instance type for example, ml.g4dn.xlarge or ml.g5.2xlarge . 3. The WhisperX DLC image URI from Amazon Elastic Container Registry Amazon ECR for example, 763104351884.dkr.ecr.