Skip to content
Is there an AI for this?

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


02Recommended stack

7 components
RoleComponent
GatewaySIP trunk / telephony provider
InferenceQwen2.5-14B-Instruct (conversation)
InferenceSelf-hosted text-to-speech voice
Ingestionfaster-whisper (streaming speech to text)
OrchestrationLiveKit Agents
Orchestrationoptionaln8n for post-call actions
OrchestrationoptionalPipecat

Architecture and data flow

Architecture for Voice agent (telephony + STT + LLM + TTS)10 components in 7 layers. Trust boundaries: COMPANY NETWORK; PRIVATE CLOUD · Your cloud tenancy. External data transfer: SOME. Some data leaves the boundary drawn here.SIP trunk / telephony carrierLiveKit Agents (or Pipecat) real-time pipelineSpeech to text → conversation policy → text to speechHuman contact-centre queuePostgreSQL (calls, transcripts, outcomes)Call recordings (short retention)faster-whisper · vLLM · TTS voiceWhisper · Qwen2.5-14B-Instruct · open TTS voiceCallersPEOPLESIP trunk / telephony carrierSIP trunk / telephony c…NETWORKLiveKit Agents (or Pipecat) real-time pipelineLiveKit Agents (or Pipe…APPLICATIONSpeech to text → conversation policy → text to speechSpeech to text → conver…RETRIEVALHuman contact-centre queueHuman contact-centre qu…EXTERNAL APIPostgreSQL (calls, transcripts, outcomes)PostgreSQL (calls, tran…DATABASECall recordings (short retention)Call recordings (short …STORAGEfaster-whisper · vLLM · TTS voicefaster-whisper · vLLM ·…INFERENCE SERVERWhisper · Qwen2.5-14B-Instruct · open TTS voiceWhisper · Qwen2.5-14B-I…MODELGPU server (48 GB)HARDWARECOMPANY NETWORKPRIVATE CLOUD · Your cloud tenancyHTTPSCONFIDENTIALreverse proxyCONFIDENTIALquestion + user groupsCONFIDENTIALdocuments + permissionsCONFIDENTIALchats, users, settingsPERSONALoriginal filesCONFIDENTIALprompt + retrieved passagesCONFIDENTIALloaded weightsGPU memoryGPU memorytransferred call and transcriptPERSONALEXTERNAL DATA TRANSFER · SOME

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

7 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.

  1. 01

    Pick three intents and write the scripts

    Assessment

    Voice 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.

  2. 02

    Build a browser prototype before touching telephonyversion-sensitive

    Assessment

    LiveKit'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-python

    from the LiveKit quickstart

    uv tool install "pipecat-ai[cli]"
    pipecat init quickstart

    the Pipecat equivalent

    Source documentation

  3. 03

    Replace the hosted services with local ones, one at a timeversion-sensitive

    Assessment

    Both 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-whisper
    docker 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.6B

    from the vLLM docs — substitute the conversation model

    Source documentation

  4. 04

    Budget the latency and measure every hop

    Assessment

    Aim 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.

  5. 05

    Connect the SIP trunk

    Assessment

    Add 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.

    Source documentation

  6. 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/n8n

    for post-call actions

    Source documentation

  7. 07

    Pilot on a fraction of calls, with a way back

    Assessment

    Route 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.

    Source documentation


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

    livekit-agentspipecat

  • 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

    dify

  • 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

    faster-whisperwhisperx


10Evidence

0 of 7 fetched

Not yet in the ledger

  1. not yet fetched

  2. not yet fetched

  3. not yet fetched

  4. not yet fetched

  5. not yet fetched

  6. not yet fetched

  7. 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.