R&D · solution design, 2026-12-05
50 simultaneous voice-agent calls, 08:00 to 23:00
A low-cost design for 50 calls at once, 15 hours a day, on Unidatum Speech: nine Graviton4 c8g.4xlarge at the peak, each running speech to text and two of our own Kokoro voices (the layout we measured), a load balancer with the service's own admission cap, an auto scaling group that follows the day, spot capacity above an on-demand floor, and Deepgram as the last overflow. About $0.9 to $1.6 thousand a month for speech to text alone and $1.2 to $2.8 thousand with our own voices, against $6.6 thousand for Deepgram speech to text alone. The full document is docs/SOLUTION-50-CALLS.md in the repository; the model is docs/data/solution50.py.
- measured our own runs: solid lines and bars, data files linked
- sourced a price or fact read from a vendor page, with the page and date (all 2026-12-05 unless shown)
- modelled arithmetic or a simulation on those inputs: dashed lines, hatched bars, assumptions listed under the chart and the script linked
- assumption an input we chose, editable in the script
The answer
Speech and voices together
Nine c8g.4xlarge at the peak, each running 6 fast + 2 final vCPUs of speech to text and two 4-thread Kokoro voices on the other 8: 7 to 8 calls per instance at the knee, 6.8 planned, so 9 carry 61 calls and 54 after losing one measured (first partial about 0.95 s, finals 1 to 1.7 s, voice first audio 0.8 s).
Speech to text alone
If the agent's voice is a cloud service: five c8g.4xlarge (80 vCPUs), 68 planned streams against 50 calls, 54 after a loss measured capacity (knee 16, 13.6 planned), modelled fleet. About one stream per vCPU at the knee.
How it is bought
Two on-demand instances as the floor, the rest on spot, scheduled 07:45 to 23:15 and following load. No savings plan: a plan is paid 24 hours a day and this fleet runs 15, so a 1-year plan costs more per used hour than on-demand modelled.
Front and fallback
One application load balancer (WebSocket, idle timeout 3600 s), max_sessions 7 per instance, HTTP 503 CAPACITY sends the client to Deepgram, which PowerConduit already does. A separate AMD voice pool is a later, modelled saving.
| plan | hours per day |
|---|---|
| 1-year Compute Savings Plan, no upfront | 17.2 |
| 3-year Compute Savings Plan, no upfront | 11.6 |
Sizing: vCPUs, instances and headroom
Our measurements of 2026-12-05: a c8g.8xlarge with 24 of 32 vCPUs carried 28 live English streams cleanly (p90 final lag 1.7 s, 24 planned); a c8g.4xlarge on all 16 vCPUs, loaded from a second instance, had its knee at 16 streams (p90 1.85 s, none lost to 24), 13.6 planned measured. The fast stage gets three times the cores of the final stage. Whisper small (other languages) carries about 12 streams per 24 vCPUs. Memory about 20 GB per 24 worker cores. Service start to healthy 8.0 to 8.7 s.
Why small instances. The speech-only fleet is five 4xlarge; with the agent's voices on the same instances (measured, last section) it is nine. Every Graviton size costs the same per vCPU ($0.0399 an hour on-demand), so the size is about granularity and blast radius. Five 4xlarge follow a daily curve in steps of 13.6 streams, survive the loss of any one instance and are the size measured on all its cores. A single 16xlarge or two 8xlarge for 50 calls have 92% load and no failover; three 8xlarge or two 16xlarge work but cost more at night and are modelled, not measured. AMD c7a carries fewer streams per vCPU (0.71 against 0.85 planned) at a 29% higher price per vCPU, so six are needed; it is the better home for voices.
Headroom for the ramp. At 50 calls each instance holds 10 sessions against a cap of 14 and a knee of 16. The group sizes to calls x 1.1 / 13.6, at least two, ten minutes ahead of the load; a jump from 35 to 50 in a minute is absorbed by the cap and by the spill to Deepgram. Non-English calls count double: each Whisper stream costs about two English streams.
Cost options per month
AWS prices read from the AWS Price List API, the Savings Plans offering rates and the spot price history, us-east-1, Linux, on 2026-12-05 sourced.
| instance | vcpu | on demand usd h | sp1y no upfront usd h | sp3y no upfront usd h | spot mean 30d usd h |
|---|---|---|---|---|---|
| c8g.4xlarge | 16 | 0.63808 | 0.45744 | 0.30892 | 0.3176 |
| c8g.8xlarge | 32 | 1.27616 | 0.91488 | 0.61784 | 0.5484 |
| c8g.12xlarge | 48 | 1.91424 | 1.37231 | 0.92676 | 0.8997 |
| c8g.16xlarge | 64 | 2.55232 | 1.82975 | 1.23568 | 0.9277 |
| c7a.4xlarge | 16 | 0.82112 | 0.59338 | 0.39646 | 0.3073 |
| c7a.8xlarge | 32 | 1.64224 | 1.18677 | 0.79291 | 0.6324 |
| c8g.4xlarge+voices | 16 | 0.63808 | 0.45744 | 0.30892 | 0.3176 |
- Scheduling alone saves 35% against running 24/7 on-demand, with no commitment; following the load saves another third on a real day.
- A plan is paid for 24 hours. The 3-year plan wins only above 11.6 hours of use a day, the 1-year plan above 17.2. At 15 hours the 3-year plan costs $0.49 per used hour against $0.64 on-demand and the 1-year plan $0.73. It suits only the part of the fleet that is up all day, or an account with other steady compute for the night hours.
- Spot with an on-demand floor of two is the cheapest honest option ($898 to $1,179), 16 to 25% below scheduled on-demand, with 10% of spot hours charged on-demand as the fallback.
- Deepgram Nova-3 streaming is $0.0048 a minute pay as you go and $0.0042 on Growth ($4,000 a year prepaid); concurrency caps 150 and 225 streams; the page still marks the price "promo" with no end date (deepgram.com/pricing, 2026-12-05). If it ends, add about 60%.
- Own hardware costs $69 to $337 a month for 50 calls (14 Mac minis at the measured cap of 4 streams, or 7 i9 workstations at half their cores, amortised over 48 months with power) modelled, but with no failover, one site, a home uplink and our own time. It is the right home for the first dozen internal channels, not a 50-call service level. The M4 mini is no longer sold; Apple lists the M6 from $899 (2026-08-25) sourced.
Spot with on-demand fallback: what a live call sees
EC2 gives a two-minute interruption notice through instance metadata and an event, and often an earlier rebalance recommendation; Auto Scaling's price-capacity-optimized strategy and Capacity Rebalancing replace instances ahead of time; a warm pool does not support spot in a mixed group (docs.aws.amazon.com, 2026-12-05) sourced.
A small sidecar on each instance polls both signals every 5 seconds, fails the readiness check at the first one, and closes the rest of the calls at a pause 20 seconds before the end. The agent runtime reconnects and replays the last 3 seconds of audio: in our earlier handoff test a handoff at a pause lost 0% of words, mid-utterance with replay 0%, without replay 25.9% measured. If spot is short, two on-demand instances stay and Deepgram takes the excess; a runbook action switches the group to on-demand for the day.
With a 10% monthly interruption rate assumption and two of five instances on-demand, the model expects 0.1 interruption events a month and about 0.7 calls a month cut out of 184,000 before the drain and the replay shorten even that modelled. The real risk is a wave across a zone, which the on-demand floor, three zones and the spill are for.
If average concurrency is less than 50
A typical call-centre curve keeps the same peak and lowers the average to 25 to 35 calls. The group follows the curve, so the cost falls with the average (the call-centre day above: $898 instead of $1,179) but never below the two-instance floor of about $670. The chart shows a flat load of N calls for 15 hours with the fleet sized for N.
Break-even: the fleet is cheaper than Deepgram pay as you go from 5.1 average calls (139 thousand minutes a month), against Growth from 5.8; with $500 a month of operations, from 8.9 calls (243 thousand minutes). Below about ten average calls, stay on Deepgram.
Text to speech
If the agent speaks 40% of the time assumption, 50 calls mean 20 voices speaking on average and 28 at the 99th percentile (binomial; 19 with 40% of the speech cached): the no-wait bound. The EC2 test below served 6 to 8 calls' agents with two voices (0.25 to 0.33 voices per call) at a median first audio of 0.8 s. One audio minute is 855 characters. measured Kokoro needs 2 vCPUs per voice on AMD c7a (real-time factor 0.45) and 4 on Graviton4 (0.35).
| option | cache hit | peak voices p99 | instances | monthly usd scheduled od | per call minute | concurrency limit |
|---|---|---|---|---|---|---|
| Kokoro on c7a.4xlarge (2 vCPU per voice) | 0 | 28 | 4 | 1524 | 0.00111 | your own pool |
| Kokoro on c7a.4xlarge (2 vCPU per voice) | 0.4 | 19 | 3 | 1143 | 0.00083 | your own pool |
| Kokoro on c8g.4xlarge (4 vCPU per voice) | 0 | 28 | 7 | 2072 | 0.00151 | your own pool |
| Kokoro on c8g.4xlarge (4 vCPU per voice) | 0.4 | 19 | 5 | 1480 | 0.00108 | your own pool |
| Fish Audio s3-pro | 0 | 28 | 0 | 7022 | 0.00513 | Scale plan: 50 concurrent, $500 a month (fee becomes credit) |
| Fish Audio s3-pro | 0.4 | 19 | 0 | 4213 | 0.00308 | Scale plan: 50 concurrent, $500 a month (fee becomes credit) |
| Deepgram Aura-2 PAYG | 0 | 28 | 0 | 14043 | 0.01026 | 45 streaming (PAYG), 60 (Growth) |
| Deepgram Aura-2 PAYG | 0.4 | 19 | 0 | 8426 | 0.00616 | 45 streaming (PAYG), 60 (Growth) |
| Deepgram Aura-2 Growth | 0 | 28 | 0 | 12639 | 0.00923 | 45 streaming (PAYG), 60 (Growth) |
| Deepgram Aura-2 Growth | 0.4 | 19 | 0 | 7583 | 0.00554 | 45 streaming (PAYG), 60 (Growth) |
| Deepgram Aura-1 PAYG | 0 | 28 | 0 | 7022 | 0.00513 | 45 streaming (PAYG), 60 (Growth) |
| Deepgram Aura-1 PAYG | 0.4 | 19 | 0 | 4213 | 0.00308 | 45 streaming (PAYG), 60 (Growth) |
| Amazon Polly neural | 0 | 28 | 0 | 7490 | 0.00547 | not read |
| Amazon Polly neural | 0.4 | 19 | 0 | 4494 | 0.00328 | not read |
| Amazon Polly generative | 0 | 28 | 0 | 14043 | 0.01026 | not read |
| Amazon Polly generative | 0.4 | 19 | 0 | 8426 | 0.00616 | not read |
| OpenAI tts-1 | 0 | 28 | 0 | 7022 | 0.00513 | not read |
| OpenAI tts-1 | 0.4 | 19 | 0 | 4213 | 0.00308 | not read |
| ElevenLabs Flash (as listed, $0.04 per 1,000 characters) | 0 | 28 | 0 | 18724 | 0.01368 | not read |
| ElevenLabs Flash (as listed, $0.04 per 1,000 characters) | 0.4 | 19 | 0 | 11235 | 0.00821 | not read |
- Own voices: measured on Graviton4, four vCPUs per voice and about 2 vCPUs per call, first audio 0.8 s, text stays in the network: $0.0013 to $0.0022 per call-minute all-in with speech to text on the same instances. A separate pool of 3 to 4 c7a instances (2 vCPUs per voice, $1,100 to $1,500 a month at the no-wait size) costs about the same without a cache and 9% less with one; c7a voices were measured alone, not yet next to speech.
- Fish Audio s3-pro: $15 per million UTF-8 bytes, 5 concurrent requests on pay as you go, 50 on the $500 Scale plan; vendor-stated model time to first audio about 40 to 60 ms excluding the network; text goes to Fish Audio (US and Tokyo regions, retention not fixed, zero retention only on enterprise contracts) sourced. The voice library and the latency are the reasons to pay four to five times as much.
- Deepgram Aura-2 $30 per million characters (Aura-1 $15), streaming limit 45 on pay as you go, 60 on Growth; documentation example 616 ms to first byte against marketing figures of 90 to 200 ms sourced. Polly neural $16, OpenAI tts-1 $15, ElevenLabs Flash $0.04 per thousand characters as listed.
- Local speech to text with a cloud voice costs about the same as Deepgram speech to text alone ($5.4 to $8.2 thousand a month with Fish). The service already has a Fish provider with a Kokoro fallback, so a per-call choice of voice is a request field.
- Cache greetings, confirmations, hold phrases and fixed script lines: it cuts the pool by a quarter and every per-character bill by 40% at a 40% hit rate assumption, and plays with no first-audio delay.
Architecture
Load balancer and routing
ALB has native WebSocket support; idle timeout 60 s by default, up to 4000 s; deregistration delay up to 3600 s; NLB TCP idle 350 s, 350 s fixed with TLS sourced. The service enforces max_sessions (503 CAPACITY before the upgrade; 7 with voices) and /health reports sessions of capacity. The target-group check should use a readiness that fails when 90% full or draining; do not let the ELB health check drive replacement, or a full instance would be replaced.
Auto scaling
Scheduled actions at 07:45 (min 2, desired 3) and 23:15 (zero); target tracking on sessions as a share of max_sessions, target 70%, from the service's unidatum_speech_sessions gauge published by a sidecar; a step alarm on final lag p95 above 1.8 s; a termination hook that waits for the calls to end (up to 15 minutes).
Cold start and warm pool
Service start to healthy 8.0 to 8.7 s measured; on EC2 plan 60 to 120 s from launch to first call and 9 to 30 s on a running instance assumption (boot and lazy snapshot reads not measured). Scheduled scale-out hides it for the daily ramp; an on-demand floor group with a warm pool of stopped, pre-initialised instances (disk cost only) covers surprises; spot pools have none.
Images and updates
Packer bakes one AMI per release with the models, no downloads at boot; instance refresh outside open hours; the daily scale to zero replaces every instance, which also removes the state build-up seen after long runs measured.
Zones and health
Two zones for the floor, three for spot; losing a zone leaves 3 of 5 instances, 41 planned streams, and Deepgram for the rest; six instances if the full 50 must survive a zone loss. EC2 health plus a sidecar that marks an instance unhealthy after three minutes of failed /health.
Security
Private subnets; the instances accept port 18790 only from the load balancer; SSM Session Manager (or Tailscale) instead of SSH; TLS at the ALB with ACM; service keys in Parameter Store, one per client project; IMDSv2; encrypted disks; VPC endpoints or one NAT gateway for egress; the Deepgram and Fish keys only where they are used.
Operations, runbook and failure modes
| When | What to do |
|---|---|
| 07:55 each day | Check that the instances are in service and the canary call is green; page if fewer than two. |
| Calls rejected | Rising sessions_rejected_total: check the Deepgram spill count, raise the group maximum; if lag p95 is above 2 s add instances, never raise max_sessions. |
| Spot short | Desired minus in service above zero for five minutes: set the on-demand share to 100% until 23:15; the spill covers the gap. |
| Zone outage | The group launches elsewhere; if capacity is short, spill to Deepgram and raise the maximum. |
| Release | Bake, smoke-test on one instance, update the image parameter, instance refresh at 23:30; roll back by resetting the parameter. |
| Voices stall | First-audio p95 above 1 s: add a voice instance, raise the cache, check for 2-core voices above 80% busy. |
| Failure | Effect | Mitigation |
|---|---|---|
| One instance lost at the peak | 10 calls reconnect | Four instances carry 54 planned streams; replay on reconnect; spill |
| Spot reclaim wave | up to three instances in two minutes | Floor of two on-demand; drain on the first signal; many pools; on-demand switch |
| Scheduled action late | thin start at 08:00 | Starts at 07:45; alarm at 07:55 |
| Degradation after long uptime | lag grows, streams lost | Daily scale to zero |
| Final pass overloaded | unpunctuated finals after 8 s | Lag guard; alarm on final_fallbacks_total |
| More non-English than planned | capacity halves for those calls | Alarm on the language share; size by mix |
An infrastructure sketch (launch templates, a mixed-instances group with an on-demand base of two, scheduled actions, a custom-metric target-tracking policy, the lifecycle drain hook and the target group) is in docs/SOLUTION-50-CALLS.md section 5.8. A smaller start is two instances, scheduled, about $680 a month, 13 calls with voices (27 speech-only streams); nothing changes in the design as the group's maximum is raised.
Phased plan and go or no-go
| Option | Monthly | Choose it when |
|---|---|---|
| Deepgram pay as you go or Growth | $6,570 / $4,424; $5,749 / $3,871 | fewer than about 9 average calls, or the first month |
| Fleet, scheduled on-demand | $1,580 / $1,074 | the safe default after the gates |
| Fleet, 2 on-demand + spot, follows load | $1,179 / $898 | the recommendation |
| Fleet + 3-year plan on the floor | $1,252 / $943 | after a year of data |
| 24/7 on a plan or on-demand | $1,235 or $2,437 | only if the account has other steady compute |
| Own machines | $69 to $337 | internal traffic up to about a dozen calls |
| Speech + voices on the same c8g instances | $1,838 / $1,354 (on-demand $2,774 / $1,901) | the first build, English agents |
| Voices on a separate c7a pool | speech + $500 to $1,524 | a later saving if the soak confirms it |
| Voices: Fish Audio | + $2,837 to $7,022 | a particular voice or language is required |
Benchmarks still to run, and the numbers to confirm
- A 50-stream, 15-hour soak on the real instance mix with a call simulator that ramps 0 to 50 in an hour, speaks and pauses, and requests voices at 40% duty. Gate: p90 final lag under 2 s, first partial under 1.2 s, rejects under 1%, voice first-audio median under 1 s and no more stalls than voices alone, memory under 85%.
- Speech plus voices on one instance (first run below); non-English share at 10 and 25%; snapshot-restore and warm-pool resume times;
least_outstanding_requestsagainst round robin with open WebSockets; a spot interruption rehearsal with live calls; the cache hit rate on the real script. - Numbers to confirm: streams per instance on real telephone audio, the real concurrency curve and call length, the speaking share, the language mix, the c8g spot interruption rate, whether the Nova-3 promo price is still on, operations hours.
- Service changes proposed, not made: a
/readyendpoint with a utilisation ceiling and a drain mode (today SIGTERM stops the HTTP server after 5 seconds).
Go if the three gates pass and the real average is above about ten calls; no go (stay on Deepgram) if the soak fails the latency gate on the chosen layout, or the average stays below ten.
A short real test on EC2
Two c8g.4xlarge in one zone, 33.9 minutes, $0.75 (cap $5), tagged, with a safety shutdown, both terminated and verified gone with the AWS CLI; instance A ran the service, instance B the load: N speech streams plus N agents that speak 40% of the time through /speak. One run per layout, 2026-12-05 measured.
- Speech only: 14 streams p90 1.64 s, 16 streams 1.89 s, none lost: the knee of 16 and the planned 13.6 hold.
- Speech plus voices on the same 16 vCPUs: 7 to 8 calls with 6 fast + 2 final vCPUs and two 4-thread voices; p90 final lag 1.69 s at 7 and 1.73 to 1.85 s at 8, voice real-time factor 0.45, first audio 0.8 s median (3.0 s p90 at 8 when three speak at once). Plan 6.8 per instance: about 2 vCPUs a call.
- Voices of two threads fell behind (real-time factor 0.82 at 6 calls, 1.13 at 8): on Graviton4 a voice needs four.
- No layout had zero stalls, voices alone included (Kokoro synthesises sentence by sentence); 9 to 10% of audio time with 4-thread voices against 8.4% alone. Use "no more than the voices alone", or a one-second jitter buffer on the client.
- What it changed: the voice pool sized by simultaneous speakers is the no-wait bound; the measured layout needs 9 instances for 50 calls with voices ($1,838 a month on spot) and costs about the same as the modelled separate AMD pool without a cache, with one image and one group.
- Limits: one run per cell (8 calls twice, noise about 0.1 s); split of cores not tuned; synthetic agent model without barge-in; clean read English; no AMD mixed run; nothing at 12 or more calls. Raw files:
service/tests/ec2/solution50/; data: ec2_mixed_c8g4xl.csv.
Sources
All read on 2026-12-05. AWS documentation pages carry no date. Several vendor pages were read through a summarising tool: re-check any figure before a contract. Azure and Google text-to-speech prices could not be confirmed and are left out.
- AWS: Price List API and Savings Plans offering rates (command line, us-east-1, effective 2026-12-01); EC2 spot price history (30 days to 2026-12-05); spot interruption notices, rebalance recommendations, allocation strategies, warm pools, scheduled scaling, target tracking, ALB attributes, NLB, load balancer pricing, Polly pricing.
- Speech vendors: Deepgram pricing, Deepgram rate limits, Deepgram TTS latency, Fish Audio pricing and limits, Fish Audio enterprise, Fish Audio privacy, OpenAI pricing, ElevenLabs API pricing; Apple: Mac mini power.
- Our data: solution50_prices.csv, sizing, profile, monthly, tts, callmin, avgcurve, ec2_concurrency.csv, ec2_tts.csv, ec2_mixed_c8g4xl.csv, the model solution50.py and the cost model.
Deepgram, Nova and Aura are trademarks of Deepgram, Inc.; AWS, Amazon EC2 and Amazon Polly of Amazon.com, Inc.; Fish Audio of Hanabi AI Inc.; ElevenLabs of ElevenLabs Inc.; OpenAI of OpenAI.