Skip to main content

Voice Platform Decision — March 25, 2026

Status: DECIDED Decision: Migrate from Cartesia LINE managed hosting to Pipecat Cloud + Twilio + Cartesia TTS Timeline: 2-3 weeks for migration, begin immediately


Why We're Moving

Cartesia LINE is the wrong layer for phone infrastructure:

  • 40% call failure rate when Twilio <Dial> forwards to Cartesia numbers
  • No Twilio BYOT support ("on our short-term roadmap" with no ETA)
  • No Canadian phone numbers (US auto-assigned only)
  • SDK 0.2.3 is pre-1.0 with breaking changes (0.2.4 broke all calls)
  • Managed cloud had a 5-day outage (wrapper crash + SDK breaking change)
  • Status page showed 100% during actual outage
  • Churches will print phone numbers on bulletins, websites, Google Business profiles — numbers must be stable and owned by us

What We Keep

  • Cartesia Sonic TTS — Best voice quality in the market. Stays as our TTS provider.
  • Cartesia Ink STT — Stays as our STT provider (or swap to Deepgram if needed).
  • All agent code — Prompts, tools, HEAR protocol, crisis detection, RAG, multi-tenant routing, demo handoffs. 80% ports directly to Pipecat.
  • All Twilio numbers — Toll-free, US demo, CA demo. They stay in Twilio where we own them.

Target Architecture

Caller
→ Twilio number (we own it — US, Canadian, toll-free)
→ Twilio Media Streams (WebSocket audio)
→ Pipecat Cloud (our voice server)
├── Agent orchestration (our Python code)
├── Cartesia Sonic TTS (voice generation)
├── Cartesia Ink STT (speech recognition)
├── Gemini 2.5 Flash / Claude Haiku (LLM)
├── Supabase (church data, call logs, tools)
└── Turn processing (moderation, barge-in, crisis)
→ Twilio Media Streams (audio back to caller)
→ Caller hears response

Key difference from today: Twilio is the phone platform. Cartesia is just the voice. Pipecat orchestrates. We control everything.

Why Pipecat

CriteriaCartesia LINEVapiRetellPipecat Cloud
Twilio nativeNo (BYOT "on roadmap")Yes (SIP)Yes (SIP)Yes (Media Streams)
Canadian numbersNoVia TwilioVia TwilioVia Twilio
Our code runs asPython on their cloudWebhooks (rewrite)WebSocket (rewrite)Python native (port)
Cartesia voicesBuilt-inSupportedSupportedPlugin available
Migration effortAlready built8-12 weeks6-8 weeks2-3 weeks
Cost at scale$0.06/min$0.15-0.33/min$0.13-0.31/min$0.06-0.10/min
Reliability55+ incidents/8mo63 incidents/90d99.99% claimedDaily.co backed
Multi-agent handoffNativeSquadsNot nativePython native
Code portabilityN/A~20%~30%~80%

What Changes

ComponentCurrent (Cartesia LINE)Target (Pipecat)
Phone numbersCartesia auto-assignedTwilio owned (US + CA)
Audio transportCartesia internalTwilio Media Streams
Agent frameworkLINE SDK VoiceAgentAppPipecat Pipeline
TTSCartesia Sonic (built-in)Cartesia Sonic (plugin)
STTCartesia Ink (built-in)Cartesia Ink or Deepgram (plugin)
HostingRailway + cartesia connectPipecat Cloud
Deploygit push + cartesia connectgit push to Pipecat Cloud
Barge-inLINE SDK handlesPipecat VAD + transport handles
Turn processingOur TurnProcessor classPorts to Pipecat event pipeline
Tool calling@loopback_tool decoratorPipecat tool/function pattern
Call routingsession.py PHONE_REGISTRYSame logic, Twilio webhook layer

What Ports Directly (~80%)

  • All prompts (sales, church, care, demo) — text, no framework dependency
  • All tool implementations (prayer, callback, visitor, giving, Cal.com, PCO)
  • Product knowledge loading (session.py)
  • Church data loading (supabase_church.py)
  • Phone registry routing (session.py)
  • Crisis detection and moderation logic
  • HEAR protocol
  • Demo church handoffs
  • Repeat caller history
  • Datetime context builder
  • SMS link sending
  • Email notifications

What Needs Rewriting (~20%)

  • main.py → Pipecat pipeline setup (replaces VoiceAgentApp)
  • turn_processor.py → Pipecat event handlers (replaces LINE event loop)
  • Agent handoff mechanism → Pipecat's transfer pattern
  • Audio barge-in handling → Pipecat VAD configuration
  • Dockerfile → Pipecat Cloud deploy config
  • Health check endpoint → Pipecat Cloud health

Cost Comparison

At Launch (10 churches, ~1,500 min/month)

Current (LINE + Railway)Target (Pipecat Cloud)
Platform$299 (Cartesia Scale) + $30 (Railway)~$15 (Pipecat hosting)
Cartesia TTS/STTIncluded~$50 (API credits)
LLM~$30~$30
Twilio~$20~$20
Total~$380/mo~$115/mo

At Scale (500 churches, ~75K min/month)

CurrentTarget
Platform$299 + $50~$500
Cartesia TTS/STTIncluded in $299~$2,400
LLM~$1,500~$1,500
Twilio~$640~$640
Total~$5,500/mo~$5,040/mo

Migration Plan

Week 1: Foundation

  • Set up Pipecat Cloud account
  • Build Pipecat pipeline equivalent of main.py
  • Port session.py (routing, caching, Supabase)
  • Port TurnProcessor to Pipecat event handlers
  • Configure Cartesia Sonic TTS + Ink STT plugins
  • Test basic call flow: Twilio → Pipecat → Cartesia voice → response

Week 2: Agent Logic

  • Port all agent builders (Sales, Demo Router, Coordinator, Care)
  • Port all 46 tools
  • Port multi-agent handoff (Sales→Demo, Coordinator→Care)
  • Port product knowledge + RAG injection
  • Test all demo churches (Grace Community, St. Joseph)

Week 3: Production

  • Port crisis detection + moderation
  • Port notification system (email, SMS)
  • Test with all Twilio numbers (toll-free, US demo, CA demo)
  • Run full test suite (600 Python tests adapted)
  • Parallel run: old system + new system
  • Cut over

Immediate Next Steps

  1. Save this decision document
  2. Send Cartesia support ticket (reliability issue documentation)
  3. Sign up for Pipecat Cloud
  4. Read Pipecat docs + examples (especially Twilio Media Streams + Cartesia plugins)
  5. Begin Week 1 migration

The Strategic Principle

Own your phone numbers. Own your routing. Own your business logic. Rent your voices.

Cartesia makes beautiful voices. Let them do that. Don't let them own your church phone numbers, your call routing, or your uptime.