Design an AI Voice Platform Like ElevenLabs: Text-to-Speech at Scale

System design for an AI voice platform like ElevenLabs: streaming text-to-speech, GPU serving, voice cloning, long-form audio, usage billing and safety.

Advanced 10 min read · Updated

The question: design an AI voice platform like ElevenLabs. Developers send text and get natural speech back, streamed fast enough for a live conversation or generated carefully for a ten-hour audiobook. Users can clone a voice from a short sample, and the system must stop people from cloning someone else's voice. It's a good interview problem because one product holds real-time streaming, heavy batch jobs, per-voice model data, usage billing and serious abuse risk.

What's public and what's our design. ElevenLabs publishes its API behaviour, model list, latency figures, regions, plan limits and safety policies, and its job postings describe Kubernetes GPU clusters for inference and training across cloud and on-prem. It hasn't published its internal serving design or model architecture. This page separates those: named figures come from the public documents (checked November 2026; they change often), and the architecture is a reasoned design for the same product, not a description of ElevenLabs' private systems.

1. What the product does

Start by naming the workloads, since they have opposite needs. A voice agent can't wait for half a second, while an audiobook can wait for an hour but must never have an audible seam.

AgentsLive appsReal-time~100 ms model timeAudiobooksDubbingLong formminutes to hoursInstant clonePro cloneVoicesper-user dataVoice platform
The product surface. Each branch shares speech models, voices and billing, but has its own latency and reliability needs, so each gets its own path through the system.
UsePriorityFails if...
Voice agent (live LLM tokens)Time to first byteThe caller hears a pause
App narration (a paragraph)Speed and qualityThe app feels slow
Audiobook (an entire book)Quality and consistencyThe voice drifts between chapters
Bulk (alerts, phone menus)Cost per characterIt costs too much

2. Clarify requirements

QuestionAnswer (agreed with the interviewer)
Core features?Text to speech over HTTP and WebSocket; voice library; instant and professional cloning; long-form projects
Scale?5 billion characters per day from 1M developers and creators
Latency?Real-time models: first audio byte under ~200 ms in-region; high-quality models may be slower
Languages?30+ languages, with the same voice across them
Limits?Plan-based concurrency and character quotas
Safety?No unauthorised cloning, block prohibited content, trace generated audio to an account
eleven_v4_turbo~100 mseleven_flash_v2_5~100 mseleven_flash_v2~135 mseleven_v3_conversational~165 ms
Published median model latencies for ElevenLabs' faster text-to-speech models, excluding network and application time. Real-time models trade a little audio quality for this speed, and the most expressive models don't list a latency at all.

3. Estimates

The natural unit here is the character, as that's how the work is requested and billed. A useful rule of thumb comes from the documented limits: 10,000 characters is about 10 minutes of speech, so 1,000 characters is about one minute. The key measurement for a GPU is the real-time factor (RTF): how many seconds of audio it produces per second of compute, including batching.

Volume       : 5B characters/day ÷ 1,000 chars per minute
               = 5M minutes of audio/day
Audio rate   : 5M ÷ 1,440 ≈ 3,470 minutes of audio per real minute
Model mix    : 70% fast model at ~50× RTF  → 2,430 ÷ 50 ≈ 49 GPUs
               30% quality model at ~10× RTF → 1,040 ÷ 10 ≈ 104 GPUs
Peak         : (49 + 104) × 3 peak factor ≈ 460 GPUs
Fleet        : 460 × 1.3 headroom ≈ 600 GPUs
Starts       : 30 s average clip → 10M clips/day ≈ 115/s, ~350/s peak
Storage      : 128 kbps MP3 ≈ 1 MB per minute
               → ~5 TB/day if all output is retained
Cost check   : 600 GPUs × ~$2/hour × 24 ≈ $29K/day
               ≈ $0.006 per 1,000 characters of compute
(illustrative numbers; ElevenLabs doesn't publish its fleet or RTF)
Fast model (70% of audio)49 GPUsQuality model (30% of audio)104 GPUs
GPUs needed at average load, by model. The quality tier is only 30% of the audio yet uses twice the GPUs of the fast tier, which is why it costs more per character and why it gets a separate pool.

4. How text becomes speech

Modern neural text-to-speech systems follow a broad pattern, even though vendors don't publish details. Text is normalised and encoded. An acoustic model predicts speech features, conditioned on a voice. A vocoder (or a decoder inside an end-to-end model) turns those into a waveform. Published research such as Tacotron 2, FastSpeech 2, VITS and HiFi-GAN is the best way to learn these parts.

Textwith nearby contextNormalisernumbers · dates · langText encodertokens or phonemesAcoustic modeltiming · pitch · toneVoice dataembedding or weightsVocoderfeatures to waveformAudio frames
A typical neural TTS pipeline. The voice arrives as an embedding or as adapted weights, which is how one model can speak in millions of voices. The model also needs nearby text, because emphasis depends on the rest of the sentence.

Streaming changes the model design. A model that needs the whole sentence before speaking sounds better, but it can't start early. A low-latency model must commit to audio with limited lookahead. That's the core trade-off between the two model families, and it's why a platform offers both instead of one best model.

Model (public docs)Median latency, languagesIntended for
v4 Turbo~100 ms, 90+ languagesReal-time agents and assistants
Flash v2.5~100 ms, 32 languagesAgents and large-scale processing (40,000 characters per request)
v3 Conversational~165 ms, 70+ languagesReal-time expressive speech
Multilingual v2Not listed, 29 languagesStable long-form content (10,000 characters)
v4Not listed, 90+ languagesVoiceovers, dialogue, audiobooks (10,000 characters)
yesnonoTurbo / FlashLive conversation?v4 / MultilingualLong content?Flash, batchedHuge volume?Which model?
How a request should pick a model. Latency needs decide first, and then language coverage and expressiveness narrow it down. Bulk jobs go to whatever's cheapest at acceptable quality.

5. Architecture

ClientHTTP · WebSocketEdge APIauth · nearest regionLimiterconcurrency · quotaModerationtext · voice rulesRoutermodel · voice · tierReal-time poolsmall batchesQuality poolVoice storeembeddings · weightsUsage eventsbilling · audit
The overall design. Edge regions terminate connections and apply limits. A router sends each request to a model pool in the same region, loading voice data from a fast store. Audio streams back, and usage events flow asynchronously to billing.

A worked example. A startup's assistant says *"Your order ships Friday."* using a cloned brand voice on a Flash model:

AppEdge APIRouterGPU replicastream: text, voice_idauth · slot · moderationroute (flash, EU)text + voice embeddingaudio chunk 1 (~100 ms)chunk + char timingsmore chunksrelease slot · usage event
One request through the system. The limiter counts the generation slot only while audio is being produced, and usage is recorded after each chunk rather than in advance.

6. Preparing the text

Text models read literally, so "$3.5M" or "Dr. St. James St." can come out wrong. A normaliser turns written forms into words that can be spoken. It depends on language, context and a customer's own rules, which come from a pronunciation dictionary.

InputSpoken asRule
$3.5Mthree point five million dollarsCurrency and scale
Dr. St. James St.Doctor Saint James StreetAbbreviations depend on position
10/11/2026October eleventh or the tenth of NovemberDepends on locale
GIFCustomer's own choicePronunciation dictionary
ERR_4012error four zero one twoCodes read digit by digit
Raw textLanguagedetect or givenNormalisenumbers · unitsDictionarycustomer rulesModel inputPosition mapnormal to original
Text preparation before generation. Language detection and rules run on CPUs and take a few milliseconds. Keeping character positions lets the response map audio timing back to the customer's original text, for captions and lip sync.

7. Streaming over WebSockets

When text is available up front, streaming over HTTP is simple. When an LLM is writing the text, you don't have it yet, so the connection must be two-way. ElevenLabs' public WebSocket API shows a clean protocol for this: send an initial message, send text as it arrives, flush at the end, and receive base64 audio along with character timing.

LLM clientTTS WebSocketModelinit: settings + space"Your order ""ships Friday. "generate at thresholdaudio framesaudio + alignmentflush: trueisFinal: true
The WebSocket protocol, based on ElevenLabs' public API. Text is buffered until a threshold or a flush, so the server can generate audio with some context. Alignment data maps characters to time in each returned chunk.

Buffering is a real trade-off. Speech sounds better with more context, but waiting for text adds delay. The default chunk_length_schedule of [120, 160, 250, 290] starts generating after at least 120 characters, then 160 more, and so on. If your LLM only sends 50 characters and stops, generation waits unless you flush, or use auto_mode.

Default120160250290Live agentSentenceSentenceSentenceSentence
The default chunk schedule, in characters. Lower values reduce latency and can reduce quality, so a live agent usually flushes at sentence ends, while a long narration benefits from larger chunks.
LLM writes first phraseTTFBplayback startsmore generated0 ms2004006008001,000first audio
An illustrative timeline for an LLM feeding speech. The first useful phrase sets the time to first audio, and everything after that only needs to stay ahead of playback.

Audio must be produced faster than it plays. If generation falls behind playback, the listener hears a gap (a buffer underrun). So the key real-time health metric isn't just first-byte time, it's whether each session keeps an audio buffer ahead of the playhead.

8. GPU serving and scheduling

Serving TTS is different from serving an LLM. A request produces a burst of work that lasts seconds, and audio must be stitched in order. Real-time pools run small batches with a tiny batching window. Quality pools run larger batches, or longer jobs. Use one pool per model version, so a rollout doesn't mix models within a session.

RouterFlash queuewait < 20 msQuality queuewait < 1 sMicro-batchersmall · ~5 msBatcherlarger · by lengthGPU pool Amodel version 7GPU pool Bmodel version 3Autoscalerqueue depth
Scheduling within a region. Each model has its own pool and a short queue. A micro-batcher groups requests that arrive within a few milliseconds, and autoscaling watches queue depth, since GPU utilisation alone won't show a latency problem.

Concurrency limits protect the fleet. Rate limits per minute suit HTTP, but a generation holds a GPU slot. So plans limit simultaneous generations by model. The public limits show this clearly: heavier models get fewer slots at every plan.

Free4 slotsStarter6 slotsCreator10 slotsPro20 slotsScale / Business30 slots
Published concurrency limits per plan for Flash models. Multilingual v2 gets half of these at every level, reflecting its higher compute cost. Enterprise is "elevated" by arrangement.

Voice data must be fast to load. An instant clone is probably just a small embedding, which can be fetched in milliseconds and cached in memory. A professional clone involves heavier per-voice data, and ElevenLabs' docs note that PVC voices can be slower than default or instant voices on Flash. A sensible design keeps recent voices warm on replicas, and routes a voice to a replica that has it.

Requestvoice_idVoice type?Embedding cachedefault · instantSticky replicaprofessional cloneGenerate
Loading a voice for a request. A small embedding comes from a nearby cache, and larger per-voice weights are routed to a replica that already holds them, avoiding a load on the request path where possible.

Regions. ElevenLabs lists serving from the USA, the Netherlands and Singapore, with expected time to first byte of 100-150 ms in North America, Europe and Southeast Asia, and 150-200 ms in South and Northeast Asia, on Flash over WebSockets. Enterprise customers can get EU and India data-residency environments. Data residency has its own design cost: voices and logs must stay in the region, too.

Delhi userBerlin userEU-pinned userGlobal routinglatency + healthSingaporeNetherlandsEU residency
Global routing. Anycast or DNS sends a client to the nearest healthy region, while a residency customer is pinned to their region and never fails over outside it, even during an outage.

9. Long-form generation

An audiobook is too long for a single request. A 10-hour book is about 600,000 characters, while the long-form models accept 10,000 at a time. Splitting it is easy. Making the seams inaudible is the design problem.

ManuscriptSplitchapter · paragraphParagraph taskswith neighboursQuality poollow priorityAudio per taskhash-addressedJoin + levelcrossfade · loudnessAudiobook
A long-form job. The book is split at natural boundaries, each paragraph becomes a retryable task, and the results are joined and levelled. An editor can regenerate one paragraph without paying for the whole book.
  • Conditioning on neighbours: pass the previous and next text with each paragraph. A model that knows what came before keeps the same tone, instead of restarting its intonation at every paragraph.
  • Determinism and caching: hash text, voice, model version, settings and seed to get an audio key. An unchanged paragraph reuses stored audio when a user edits one line.
  • Loudness: normalise each chapter to an audio target (for example, a target loudness used by audiobook platforms) so listeners don't reach for the volume control.
  • Priority: background jobs run on spare capacity, with a per-account limit so that one publisher's catalogue doesn't delay everyone else.
  • Pin the model version for the whole project. A model upgrade halfway through a book can change the voice, so editors should opt in.
Contextend of para 41para 42start of para 43Audiononegeneratednone
Conditioning on neighbours. To generate paragraph 42, the model reads the end of 41 and the start of 43, but only 42 produces audio. That's what makes the seams much harder to hear.

10. Voice cloning

The public docs describe two methods, which ElevenLabs says work differently at a fundamental level. Instant Voice Cloning (IVC) works from about one to three minutes of audio and is ready almost at once. Professional Voice Cloning (PVC) trains on much more audio; third-party guides cite at least 30 minutes, with a few hours recommended, and it needs a verification step and several hours to process.

Instant cloneProfessional clone
Audio neededAbout 1-3 minutesMuch more: often 30+ minutes
Time to useSeconds to minutesHours (a training job)
Likely methodSpeaker embedding fed to a general modelPer-voice training or fine-tuning
AccuracyGood impression of the voiceCloser match, including nuance
Safety gateRights attestation, moderationVoice-based verification
Serving costSmall; cached embeddingLarger per-voice data; may be slower

A well-known approach to instant cloning comes from research on speaker verification: train a network to tell speakers apart, and it learns an embedding that captures how someone sounds. Feed that to a TTS model, and it can speak in a voice it never trained on (the SV2TTS paper showed this in 2018).

Upload1-3 minutesCleandenoise · VADSafety checksno-go · rightsSpeaker encoderVoice storeowner · embeddingReady for TTS
The instant path. Uploaded audio is cleaned and checked, the speaker encoder produces an embedding, and it's saved as a voice. All of this takes seconds, so the voice can be used straight away.
UserVoice APIVerificationTrainingupload 30+ minutesread this prompt aloudlive recording of the promptsame speaker: passqueue training jobtrain, then run a quality checkvoice ready (hours)
The professional path. It's a long asynchronous job, gated by verification. Training is expensive, so it doesn't start until the person has proved it's their voice, and a quality check runs before release.
voices(voice_id, owner_id, kind[instant|professional|library], name,
       language, embedding_ref, weights_ref, status, verification_id,
       created_at)
voice_samples(sample_id, voice_id, storage_path, duration_s,
              quality_score, consent_ref)
voice_shares(voice_id, shared_with, rate_per_1k_chars, revoked_at)

11. Safety

Cloning creates a specific harm: impersonating real people for fraud, harassment or political deception. Safety is a core design area, and it runs at three stages: before a voice is created, while speech is generated, and after audio is released. ElevenLabs' published controls include technological verification for its professional tool, blocking the cloning of celebrity and other high-risk voices, automated and human moderation, a public AI audio classifier, and support for the C2PA provenance standard.

Rights checkNo-go matchpublic figuresText moderationAccount limitstier · historyTraceable outputaccount logProvenanceC2PA · classifierEnforcementban · report
Controls across the lifecycle. Earlier controls prevent harm cheaply, and later controls exist so that any audio that does get out can be detected and traced back to an account.
Abuse caseExampleControl
FraudCloned relative's voice asks for moneyConsent checks, voice verification, no-go lists
Election deceptionFake candidate speechBlocked public figures, policy classifiers, review
HarassmentClone of a private personIdentity checks, reporting, bans
Evading filtersSpelling tricks in textNormalise before moderation; review repeat attempts
New voice sampleSpeaker encoderNo-go indexprotected voicesSimilarityAllowlow scoreHuman reviewborderlineBlock + loghigh score
How a no-go voice check works. A candidate voice is compared with embeddings of protected speakers. A high similarity blocks it, and a borderline score goes to human review, because similar-sounding people do exist.

Be honest about limits. Voice similarity can be fooled by altered audio, watermarks may not survive re-recording, and a classifier has false positives. Say that layered controls raise the cost of abuse without removing it, and that a human team and a fast takedown process stay necessary.

12. Voice agents on the platform

A voice agent is a major customer of these real-time APIs, and voice platforms increasingly offer it as a product. ElevenLabs' docs list real-time speech recognition (scribe_v2_realtime, about 150 ms) and eleven_realtime_v1 models for agents, alongside its Agents Platform. Turn detection, barge-in and tool calls are covered in depth on the voice AI agent page.

CallerSession workerWebRTC · turnsRealtime STT~150 msLLMcustomer's choiceFlash TTS~100 ms
A hosted voice agent built on the platform's own parts. Speech recognition and speech synthesis stay on nearby GPUs, the LLM may be the customer's choice, and barge-in cancels generation so unspoken audio isn't billed.

13. Usage, billing and caching

Character billing looks simple, but it has edge cases. If a stream fails halfway, charge only for audio produced. If a user cancels a barge-in, charge for what was generated. Retries with the same request id mustn't charge twice. Treat metering as an event stream with idempotent keys, not a counter updated on the request path. See idempotency.

GenerationEvent logrequest id · charsQuota counternear real timeAggregatordedupe · by accountEdge limiterInvoices
Metering as a pipeline. Workers emit usage events, a stream deduplicates and aggregates them, and invoices are built from durable records. A fast separate counter enforces quotas in near real time, and can be slightly out of date.

Caching audio pays off for repeated phrases such as "Please hold" and app prompts. The key must include everything that changes the sound: normalised text, voice, model version, settings, language and format. Cache only for customers who allow retention, and remember that a voice's owner may later revoke it, so the cache must honour that.

IVR prompts~70% cacheableApp narration~25%Voice agent replies~5%
An illustrative example of cache value for an app with a repeated phrase set. A small set of prompts can be a large share of characters, and a hit costs almost nothing compared with a GPU generation.

14. Quality and operations

Audio quality is hard to score with a formula. Combine automated checks with human listening, and test on the things that break most: numbers, names, unusual languages and long passages.

Offline checksASR round trip · clipsListening testblind A/BLoad testTTFB · RTFOpt-in releasenew model idDefault later
Shipping a new speech model. Automatic tests catch mispronunciation and clipping, human listening tests compare it with the current model, and latency is checked under real load. Existing projects stay pinned to the old version.
MetricWhy it matters
Time to first byte, p50/p95, by regionThe main real-time promise
Real-time factor per poolCapacity and cost per character
Buffer underruns per sessionGaps a listener really hears
ASR round-trip accuracyText-to-speech-to-text as a mispronunciation check
Clone quality rating and rejectsWhether cloning matches expectations
Moderation blocks and appeal outcomesSafety accuracy, including false positives

A clever check: run generated speech back through speech recognition and compare it with the original text. A mismatch on "$3.5M" flags a normalisation bug, with no human needed. It won't catch poor emotion or tone, which still needs listeners.

Follow-up questions to expect

  • *How would you support emotional delivery tags, like [whispers]?* Extend the text encoder to treat tags as control tokens, then evaluate them with listening tests. Moderate tags as well, and strip them from captions.
  • *A voice owner removes their consent. What happens?* Mark the voice as revoked so that new generations fail, purge caches, delete embeddings and weights, and respect any existing contracts on delivered audio.
  • *How do you share voices in a marketplace?* Keep the owner's rights and payouts in a separate table, meter usage per voice, and let the owner revoke it. Never expose the sample audio or embedding to the buyer.
  • *Dubbing into another language?* Transcribe, translate with timing constraints, generate speech in the same voice, and align it to the video. It's a pipeline over this platform.
  • *Real-time customers report a slow first byte. Where do you look?* Trace it as below.
Chunk scheduleNo flushClientFar regionNew TLSRouteQueue waitCold voiceServerSlow first byte
Debugging a slow first byte. Most causes aren't in the model. Compare regions and voices first, then look at text buffering on the client, which is the most common self-inflicted delay.

Where it’s used

Voice agents and assistants

Low-latency speech for conversational products; see voice AI agent.

Audiobooks and narration

Long-form generation with consistent voices and per-paragraph editing.

Dubbing and localisation

The same voice across languages, aligned with video timing.

Accessibility

Screen readers and personal voices for people who are losing their speech, with consent controls.

In an interview

  • Separate real-time, long-form and voice-creation paths, and size them in characters and real-time factor.
  • Explain the latency and context trade-off, and how text buffering affects the first byte.
  • Serve with per-model pools, micro-batching, plan concurrency limits and warm voice data.
  • Compare instant and professional cloning, and gate cloning with consent and verification.
  • Make usage metering idempotent, and layer safety before, during and after generation.

Frequently asked questions

How would you design a platform like ElevenLabs?

Separate real-time, long-form and voice-creation paths. Normalise text, stream it over WebSockets, serve each speech model from its own GPU pool with micro-batching and plan concurrency limits, keep voice data warm, gate cloning with consent and verification, and meter usage through idempotent events.

What is the difference between instant and professional voice cloning?

An instant clone uses about a minute or more of audio and is ready quickly, typically by deriving a speaker representation for a general model. A professional clone uses far more audio, needs voice verification and runs a training job over hours, giving a closer match.

Further reading