Self-hosted
Voice agent (telephony + STT + LLM + TTS)
LiveKit Agents or Pipecat as the real-time orchestrator, a SIP trunk for telephony, faster-whisper for speech to text, a local model for the conversation, and a self-hosted TTS voice. Every hop counts against a latency budget of roughly a second.
- Source
- Editorial recipe — no step evidence has been fetched yet
- Verified
- Evidence not verified
- Confidence
- Low
01Objective
Answer or place telephone calls with an agent that understands speech, answers from your own information, and hands over to a person when it should.
- use caseAI customer-support agentAn assistant that answers customer questions from your help content and account systems, resolves what it can, and hands the rest to a person with context attached. Deflection rate matters less than what happens on the cases it cannot close.
- use caseCall transcriptionTranscribing telephone calls — support lines, sales calls, advice sessions — usually from a contact-centre or telephony platform rather than a meeting app. Narrow-band audio and regulated recording rules make it a distinct problem.
- use caseVoice agentA system that answers or places phone calls and holds a spoken conversation — booking, triage, reminders, first-line support. The hardest stack in this ontology: telephony, speech recognition, a model, speech synthesis and interruption handling, all under a latency budget.
02Recommended stack
| Role | Component |
|---|---|
| Gateway | SIP trunk / telephony provider |
| Inference | Qwen2.5-14B-Instruct (conversation) |
| Inference | Self-hosted text-to-speech voice |
| Ingestion | faster-whisper (streaming speech to text) |
| Orchestration | LiveKit Agents |
| Orchestrationoptional | n8n for post-call actions |
| Orchestrationoptional | Pipecat |
Architecture and data flow
Components
- Callers — people
- SIP trunk / telephony carrier — network
- LiveKit Agents (or Pipecat) real-time pipeline — application
- Speech to text → conversation policy → text to speech — retrieval
- Human contact-centre queue — external api
- PostgreSQL (calls, transcripts, outcomes) — database
- Call recordings (short retention) — storage
- faster-whisper · vLLM · TTS voice — inference server
- Whisper · Qwen2.5-14B-Instruct · open TTS voice — model
- GPU server (48 GB) — hardware
Connections
- Callers to SIP trunk / telephony carrier — HTTPS (confidential data)
- SIP trunk / telephony carrier to LiveKit Agents (or Pipecat) real-time pipeline — reverse proxy (confidential data)
- LiveKit Agents (or Pipecat) real-time pipeline to Speech to text → conversation policy → text to speech — question + user groups (confidential data)
- Speech to text → conversation policy → text to speech to PostgreSQL (calls, transcripts, outcomes) — documents + permissions (confidential data)
- LiveKit Agents (or Pipecat) real-time pipeline to PostgreSQL (calls, transcripts, outcomes) — chats, users, settings (personal data)
- Speech to text → conversation policy → text to speech to Call recordings (short retention) — original files (confidential data)
- Speech to text → conversation policy → text to speech to faster-whisper · vLLM · TTS voice — prompt + retrieved passages (confidential data)
- faster-whisper · vLLM · TTS voice to Whisper · Qwen2.5-14B-Instruct · open TTS voice — loaded weights
- Whisper · Qwen2.5-14B-Instruct · open TTS voice to GPU server (48 GB) — GPU memory
- faster-whisper · vLLM · TTS voice to GPU server (48 GB) — GPU memory
- LiveKit Agents (or Pipecat) real-time pipeline to Human contact-centre queue — transferred call and transcript (personal data)
External data transfer · SOME
- personal data leaves your premises for your own cloud tenancy ("Human contact-centre queue"). You keep control of the account; the provider is a processor, so a DPA and a documented region apply.
- Speech recognition, the conversation model and speech synthesis all run on your own GPU: the audio and the transcript stay inside.
- The telephony carrier necessarily handles the call itself. If you use a hosted real-time media service rather than self-hosting one, it handles the audio too — that is a processor relationship and belongs in the compliance mapping.
03Suitable for
- Organisation size
- 20–5000 employees
- Data classes
- personal, confidential
- Constraints
- high, repetitive call volume with a narrow set of intents; a SIP trunk or a telephony provider that offers one; recording consent and call-handling rules settled in advance; a 48 GB GPU or better; speech and language models compete for the same card; an engineering team — this is a build, not a configuration exercise
- Industries
- Telecommunications, Retail, Logistics, Healthcare, Hospitality
- Jurisdictions
- any
04Hardware
On-premise single 48 GB GPU server
- GPU
- NVIDIA L40S 48 GB (rack) or NVIDIA RTX 6000 Ada 48 GB (office workstation)
- VRAM
- 48 GB
- System RAM
- 128 GB
- Storage
- 4000 GB
- CPU
- 24–32-core x86 server CPU (AMD EPYC or Intel Xeon Scalable)
- Form factor
- Rack server
Indicative costUS$12,000 – US$22,000
indicative build cost for the complete machine, USD, Aug 2026 — verify with a local supplier
The step up when answer quality matters more than price: a 32B model at 4-bit with generous KV cache, or a 14B model at fp16 with a long context. ECC memory and a standard 2U chassis mean it belongs in a rack or comms room rather than under a desk.
Cloud GPU instance — 1–2 × NVIDIA A100 80 GB
- GPU
- NVIDIA A100 80 GB (AWS P4d, Azure NDasr A100 v4, GCP A2)
- VRAM
- 80 GB
- System RAM
- 256 GB
- Storage
- 2000 GB
- CPU
- 24–48 vCPU
- Form factor
- Cloud instance
Indicative costUS$2 – US$12
indicative on-demand rental, USD per hour, Aug 2026 — verify against the provider price list for your region
For 32B models with long context, or 70B-class models on two cards. The band covers one to two GPUs and the gap between committed-use and on-demand rates. Check that the GPU family you need exists in the region you are required to stay in before committing to a design.
Indicative costUSD · one-off plus monthly
- Software licences
- All components are open source and self-installed. Check each licence for use limits.
- US$0
- Model usage
- Open weights served locally: no per-token charge. The GPU cost sits under infrastructure.
- US$0
- GPU server (48 GB class)
- Hardware profile onprem-medium-48gb — indicative build cost, Aug 2026, verify locally. Speech, language and voice models share the card; concurrency is limited by all three.
- US$12,000 – US$22,000
- Telephony (numbers, minutes, SIP trunk)
- Not estimated: per-minute and per-number pricing varies by country and carrier, and we have not fetched a rate card. Get a quote for your expected minutes.
- Not estimated
- Implementation (15–40 FDE-days)
- 15–40 FDE-days at US$760–1940 per day, converted from the HK$6,000–15,000 band at the HKMA Linked Exchange Rate band of HK$7.75–7.85 to one US dollar. One-off; excludes internal staff time.
- US$11,400 – US$77,600
- Three intents, one language, one inbound number, a pilot at a fraction of call volume.
- The implementation band is the widest in this set for a reason: the difference between a demo and something callers will tolerate is mostly latency and dialogue work, and it is hard to predict before the prototype exists.
- Excludes the contact-centre changes, training and the consent process.
- Every figure is an assessment from the inputs listed, not a quotation.
05Difficulty
5 / 5
A sustained engineering programme
06Skills
- API integrationapi-integration
- development
- Compliance and governancecompliance-governance
- compliance
- Dockerdocker
- infrastructure
- Linuxlinux
- operations
- LLM evaluationllm-evaluation
- ml
- LLM inferencellm-inference
- ml
- Networkingnetworking
- networking
- Pythonpython
- development
- Speech to textspeech-to-text
- ml
- Telephonytelephony
- networking
07Deployment steps
Commands are copied from each project’s own documentation, and the page they came from is linked under the step. 0 of 7 steps currently open an evidence record. The rest are linked to their source; §10 says which of those documents were fetched and which were fetched without their anchor being found — two different states, named differently there.
- 01
Pick three intents and write the scripts
AssessmentVoice agents fail by trying to hold a conversation. Choose the three highest-volume calls with a deterministic shape — booking confirmation, delivery status, opening hours — and write the dialogue including the failure lines. Anything else is transferred immediately.
- 02
Build a browser prototype before touching telephonyversion-sensitive
AssessmentLiveKit's quickstart takes you from nothing to "a voice assistant that you can speak to in your terminal, browser, telephone, or native app" — start in the browser, where iteration is fast and there is no carrier in the loop. Pipecat's CLI scaffold does the same job.
lk agent init my-agent --template agent-starter-pythonfrom the LiveKit quickstart
uv tool install "pipecat-ai[cli]" pipecat init quickstartthe Pipecat equivalent
- 03
Replace the hosted services with local ones, one at a timeversion-sensitive
AssessmentBoth frameworks ship with hosted STT, LLM and TTS wired in. Swap them individually and measure after each change: local speech to text first, then the model, then the voice. Doing all three at once makes a latency regression impossible to attribute.
pip install faster-whisperdocker run --runtime nvidia --gpus all \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=$HF_TOKEN" \ -p 8000:8000 \ --ipc=host \ vllm/vllm-openai:latest \ --model Qwen/Qwen3-0.6Bfrom the vLLM docs — substitute the conversation model
- 04
Budget the latency and measure every hop
AssessmentAim for under a second from end of speech to start of audio. Measure each hop separately: endpointing, transcription, time to first token, first audio chunk. Streaming everywhere is what makes this achievable; any component that waits for a complete result will eat the entire budget on its own.
- 05
Connect the SIP trunk
AssessmentAdd the phone number, inbound routing and a transfer path to a human queue that works on the first attempt. Test from real mobile networks, not only from a softphone — codec and packet loss on a mobile call change transcription accuracy noticeably.
- 06
Make transfer the easy path
Assessment"Let me put you through" must work on any signal of confusion: a repeated question, silence, a raised voice, or the word "agent". Pass the transcript and the caller id so the person does not start from nothing. Callers forgive a limited agent; they do not forgive a loop they cannot escape.
docker volume create n8n_data docker run -it --rm \ --name n8n \ -p 5678:5678 \ -e GENERIC_TIMEZONE="<YOUR_TIMEZONE>" \ -e TZ="<YOUR_TIMEZONE>" \ -e N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true \ -e N8N_RUNNERS_ENABLED=true \ -v n8n_data:/home/node/.n8n \ docker.n8n.io/n8nio/n8nfor post-call actions
- 07
Pilot on a fraction of calls, with a way back
AssessmentRoute five per cent of one intent to the agent, out of hours first. Watch containment, transfer rate and call abandonment together, and keep a switch that sends everything back to the queue. Transcribe every call for review — with consent handled as below.
08Compliance considerations
Structured issue-spotting to support your own review — not legal advice. Verify against the cited primary sources and your counsel.
Applies everywhere
Consent · Transparencyhigh
Callers must be told they are speaking to an automated system, and recording requires notice and often consent. Both rules differ by jurisdiction and both apply from the first pilot call, not from launch.
Personal data · Sensitive data · Retentionhigh
Voice is personal data, and voice prints may be biometric data with a higher bar in several jurisdictions. Keep audio only as long as it is needed for review, and set the retention period before the first recording exists.
Human oversight · Automated decision-makinghigh
An agent may inform and collect; it should not decide anything with a legal or financial effect. Transfer must always be available on request.
Bias and fairnesshigh
Speech recognition accuracy varies by accent, dialect and speech difference, so a voice agent can serve some callers materially worse than others. Measure by caller group before launch and keep the human path obvious for everyone.
Vendor jurisdiction · Subprocessorsmedium
Even with every model self-hosted, the telephony carrier and — if you use it — the hosted real-time media service handle call data. Include them in the processor mapping.
09Alternatives
A hosted voice-agent platform
Using the managed versions of these frameworks with hosted speech and model services removes most of the latency engineering and all of the GPU work.
- — Materially faster to a working agent, and usually better voice quality
- — Call audio and transcripts go to processors — consent, retention and residency questions
- — Per-minute pricing that grows with call volume
Deflect to messaging instead
A chat assistant with a clean handoff solves much of the same demand at a fraction of the difficulty, because text has no latency budget and no consent problem.
- — Far simpler and quicker
- — Does not serve callers who will only use the phone
Transcribe and summarise calls without answering them
Much of the value people expect from a voice agent is really call notes. That recipe is two difficulty points easier and carries far less risk.
- — No real-time constraint at all
- — Does not reduce call volume
- Self-hostedMeeting and call transcription to CRM notesfaster-whisper or WhisperX transcribes and separates speakers on your own GPU, a local model writes the summary and the action items against a fixed schema, and n8n files the result against the right CRM record with a person approving before it is saved.
- Self-hostedCustomer-support agent with knowledge base and handoffDify self-hosted as the agent builder and knowledge base, a local model on vLLM behind it, pgvector or Qdrant for retrieval, and n8n for the handoff into your helpdesk. Scoped deliberately: a defined topic list, a refusal path, and a human queue.
10Evidence
Not yet in the ledger
not yet fetched
not yet fetched
not yet fetched
not yet fetched
not yet fetched
not yet fetched
not yet fetched
11Community
Deployed this stack, or hit something this page does not cover? Corrections, sources and implementation reports are what keep a recipe worth reading.
Improve this page
Sign in to contribute
From the field
0 deployments · 0 questions
Nobody has reported deploying this here yet, and no question has been opened against this page. Both appear once a reviewer accepts them.
12Hire an FDE
If you would rather not build it, we can introduce a forward-deployed engineer who has deployed this stack before. The enquiry form starts from this recipe.