본문으로 건너뛰기
김신건의 로그

[Voice AI] Pipecat vs LiveKit Agents: 프레임워크 비교

· 수정 · 📖 약 1분 · 515자/단어 #pipecat #livekit #voice-framework #agent #sfu
Pipecat, LiveKit Agents, Vapi, Retell, voice agent framework, voice pipeline, Frame processor, build vs buy

정의

2026 시점 voice agent 프레임워크 4가지 선택지:

PipecatLiveKit AgentsVapi / Retell자체 구축
카테고리OSS frameworkOSS SFU + frameworkManaged직접
운영self-hostself-host 또는 LiveKit Cloud호스팅self
학습 곡선중간중간낮음높음
비용인프라만인프라만 (LK Cloud 옵션)비쌈 ($0.13-0.30/min)인프라
유연성높음높음낮음 (블랙박스)최고
시간1-2주1-2주1-2일1-3개월

Pipecat

flowchart LR
    Frame[Frame] --> P1["Input Processor (mic)"]
    P1 --> P2[VAD Processor]
    P2 --> P3[STT Processor]
    P3 --> P4[LLM Processor]
    P4 --> P5[Aggregator]
    P5 --> P6[TTS Processor]
    P6 --> P7["Output Processor (speaker)"]

Frame 이 processor 파이프라인을 흐름. Linux pipe 의 기능적 추상. 컴포넌트 한 줄 교체.

from pipecat.pipeline.pipeline import Pipeline
from pipecat.services.deepgram import DeepgramSTTService
from pipecat.services.openai import OpenAILLMService
from pipecat.services.cartesia import CartesiaTTSService
from pipecat.transports.services.daily import DailyTransport
from pipecat.vad.silero import SileroVADAnalyzer

transport = DailyTransport(room_url, token, "Bot", DailyParams(
    audio_in_enabled=True,
    audio_out_enabled=True,
    vad_analyzer=SileroVADAnalyzer(),
))

pipeline = Pipeline([
    transport.input(),
    DeepgramSTTService(api_key="..."),
    OpenAILLMService(api_key="...", model="gpt-4o-mini"),
    CartesiaTTSService(api_key="...", voice_id="..."),
    transport.output(),
])

runner = PipelineRunner()
await runner.run(PipelineTask(pipeline))

Pipecat 의 Frame 종류

Frame의미
AudioRawFrame오디오 청크
TextFrame텍스트
TranscriptionFrame전사
LLMResponseStartFrame / EndFrameLLM 응답 경계
TTSStartFrame / EndFrameTTS 시작/종료
UserStartedSpeakingFrame사용자 발화 시작
UserStoppedSpeakingFrame종료
InterruptionFrame끼어들기

Frame 종류 추가 = 새 processor 추가. 확장이 깔끔.

LiveKit Agents

flowchart TB
    User1["사용자 1"] -->|WebRTC| SFU[LiveKit SFU]
    User2["사용자 2"] -->|WebRTC| SFU
    SFU -->|Room API| Agent["Voice Agent<br/>(headless participant)"]
    Agent --> STT
    Agent --> LLM
    Agent --> TTS

LiveKit SFUWebRTC + room 인프라. Agent 가 room 에 headless participant 로 합류 → 다중 사용자 회의 / 룸 기반 voice agent 자연스러움.

from livekit.agents import VoiceAssistant, AutoSubscribe, JobContext, WorkerOptions, cli
from livekit.agents.llm import ChatContext
from livekit.plugins import openai, silero, deepgram, cartesia

async def entrypoint(ctx: JobContext):
    await ctx.connect(auto_subscribe=AutoSubscribe.AUDIO_ONLY)

    initial_ctx = ChatContext().append(
        role="system",
        text="당신은 친절한 한국어 음성 어시스턴트입니다. 짧게 답하세요."
    )

    assistant = VoiceAssistant(
        vad=silero.VAD.load(),
        stt=deepgram.STT(language="ko"),
        llm=openai.LLM(model="gpt-4o-mini"),
        tts=cartesia.TTS(voice="...", language="ko"),
        chat_ctx=initial_ctx,
        min_endpointing_delay=0.5,
        allow_interruptions=True,
    )

    assistant.start(ctx.room)
    await assistant.aclose()

Pipecat vs LiveKit Agents 결정

flowchart TD
    Q1{시나리오}
    Q1 -->|1:1 콜봇, 전화| Pipecat
    Q1 -->|다중 사용자 방, WebRTC 우선| LK[LiveKit Agents]
    Q1 -->|화상 회의 + AI 참여자| LK
    Q1 -->|복잡한 frame 변환| Pipecat
    Q1 -->|이미 LiveKit SFU 운영| LK
PipecatLiveKit Agents
TransportDaily, Twilio, Plivo, FastAPI 등 다양LiveKit SFU 중심
추상 단위Frame + ProcessorFunction 기반
회의 / 룸단순강력 (Multi-participant)
Python우선Python + Node + Go
학습약간 가파름친절한 docs

Managed (Vapi, Retell)

flowchart LR
    You[당신] -->|시스템 프롬프트만| Vapi[Vapi / Retell]
    Vapi -->|호스팅 파이프라인| Tel[Twilio 전화]
    Vapi -->|기본 STT/LLM/TTS| Pipeline
장점단점
Vapi5분 만에 PoC블랙박스, $0.13-0.30/min
Retell빠른 시작, 음성 좋음동일, latency 가시성 낮음

Build vs Buy 기준 (Hamming AI 가이드)

flowchart TD
    Q{기준}
    Q -->|"월 < 10K 분"| Buy[Vapi / Retell]
    Q -->|"월 10-50K 분"| Mid["Pipecat / LiveKit (자체)"]
    Q -->|"월 > 50K 분"| Build[자체 + 깊은 최적화]
    Q -->|"엄격한 컴플라이언스 (HIPAA, FINRA)"| Build
    Q -->|"500ms 미만 지연 필수"| Build
    Q -->|"기존 system 깊은 통합"| Build
    Build --> Save["최대 80% 비용 절감 가능"]

IMPORTANT

PoC = Vapi/Retell. 확장 시 → Pipecat/LiveKit 마이그레이션 흐름이 일반.

복원력 설계

flowchart TB
    Q[복원력 요소]
    Q --> Fail[Independent failure points: STT, LLM, TTS]
    Q --> Strat[전략]
    Strat --> Retry[Retry + backoff]
    Strat --> Fallback["Fallback (다른 vendor)"]
    Strat --> Graceful["Graceful: #quot;잠시 후 다시#quot;"]
    Strat --> Health["Health check + circuit breaker"]

각 단계 독립 실패 → 우아하게 처리. 자세한 건 retry-with-backoff / circuit-breaker.

흔한 함정

WARNING

  1. Managed 만 사용 = 비용 폭증 + 가시성 0. 1000분+ 면 self-host.
  2. Pipecat 의 Frame 무시 = 직접 콜백으로 짜다가 경합 / 순서 문제. Frame 모델 활용.
  3. LiveKit 의 transcription frame = STT 결과가 partial vs final 분리 안 보임. 명시 처리.
  4. 자체 구축 시 turn detection = VAD 만으로 한계. 시맨틱 모델 필요. Pipecat / LK 가 내장한 이유.

관련 위키

이 글의 용어 (6개)
[Concurrency] Circuit Breaker: cascade failure 방어concurrency
정의 Circuit Breaker = 전기 회로의 차단기처럼, 백엔드 다운 / 느림 시 호출 자체를 차단 → 빠른 실패 + 백엔드 회복 시간. 3가지 상태 | 상태 | 의미 | …
[Concurrency] Retry + Exponential Backoff + Jitterconcurrency
정의 Retry with Exponential Backoff + Jitter = 실패 시 점점 긴 간격으로 재시도, 랜덤 분산. 분산 시스템의 thundering herd / r…
[Voice AI] 음성 에이전트 아키텍처: Cascading / Streaming / S2S + Latency Budgetai
정의 실시간 음성 AI 의 3가지 패턴. 각자 지연 vs 유연성 vs 비용 트레이드오프. 3 패턴 비교 | | Cascading | Streaming | S2S | |---|--…
[Voice AI] Turn Detection + Barge-in + AEC: 자연스러운 대화voice
정의 자연스러운 음성 대화의 3 요소: 1. Turn Detection - 사용자가 말끝났는지 정확히 판단 2. Barge-in - 에이전트가 말하는 중에 사용자가 끼어들 수 있…
[Voice AI] VAD: Silero, 에너지 기반, endpointing 임계값voice
정의 VAD (Voice Activity Detection) = 오디오 스트림에서 음성 vs 비음성 (침묵, 노이즈) 구분. 음성 에이전트의 발화 시작 / 종료 감지에 필수. 종…
[Voice AI] WebRTC: PeerConnection, ICE, STUN/TURN, SFUnetwork
정의 WebRTC = 브라우저 / 모바일 P2P 실시간 미디어 + 데이터 표준. 음성, 비디오, 데이터 채널. 2026 시점 voice agent + 영상 통화 + 화면 공유 의…

💬 댓글

사이트 검색 / 명령어

검색

스크롤 = 확대/축소 · 드래그 = 이동 · 0 = 원래 크기 · ESC = 닫기