메뉴
HN
Hacker News 26일 전

OpenAI의 대규모 초저지연 음성 AI 구현법

IMP
8/10
핵심 요약

OpenAI가 9억 명 이상의 주간 활성 사용자를 위해 대규모 실시간 음성 AI 서비스를 제공하는 방법을 설명하는 기술 블로그 글입니다. 자연스러운 대화를 방해하는 네트워크 지연을 해결하기 위해 기존 WebRTC 스택을 전면 재설계한 배경과 과정을 다룹니다. 표준 WebRTC의 장점을 살리면서도 OpenAI 인프라에 맞춘 새로운 '분할 릴레이 및 트랜시버(Split relay plus transceiver) 아키텍처'를 도입한 기술적 핵심을 공유합니다.

번역된 본문

2026년 5월 4일 엔지니어링

OpenAI는 어떻게 대규모로 저지연 음성 AI를 제공하는가 작성: 이 장(Yi Zhang) 및 윌리엄 맥도날드(William McDonald), 기술 스태프

공유하기

음성 AI는 대화가 말의 속도로 진행될 때만 자연스럽게 느껴집니다. 네트워크가 이를 방해하면 사람들은 즉시 그 어색함을 느끼며, 이는 어색한 침묵, 끊기는 듯한 말실수, 혹은 늦게 처리되는 끼어들기(barge-in) 등으로 나타납니다. 이는 ChatGPT 음성 기능, Realtime API를 활용해 개발하는 개발자들, 대화형 워크플로우에서 작동하는 에이전트, 그리고 사용자가 말을 하고 있는 동안에도 오디오를 처리해야 하는 모델에게 매우 중요한 문제입니다.

OpenAI의 규모에서 이는 세 가지 구체적인 요구 사항으로 변환됩니다:

  • 9억 명 이상의 주간 활성 사용자를 아우르는 글로벌 도달 범위
  • 사용자가 세션이 시작되자마자 말을 시작할 수 있도록 하는 빠른 연결 설정
  • 순조로운 대화 템포를 위해 낮고 안정적인 미디어 왕복 시간(RTT), 지터 및 패킷 손실 최소화

실시간 AI 상호작용을 담당하는 OpenAI 팀은 최근 규모가 확장되면서 충돌하기 시작한 세 가지 제약 조건을 해결하기 위해 WebRTC 스택을 재설계했습니다: 세션당 1포트 미디어 종료(termination) 방식은 OpenAI 인프라에 적합하지 않으며, 상태 저장형(Stateful) ICE(Interactive Connectivity Establishment) 및 DTLS(Datagram Transport Layer Security) 세션은 안정적인 소유권을 필요로 하고, 글로벌 라우팅은 첫 번째 홉(first-hop) 지연 시간을 낮게 유지해야 한다는 것입니다.

이 글에서는 클라이언트에 대한 표준 WebRTC 동작은 유지하면서 OpenAI 인프라 내부에서 패킷이 라우팅되는 방식을 변경하기 위해 구축한 '분할 릴레이 및 트랜시버(split relay plus transceiver) 아키텍처'를 자세히 살펴보겠습니다.

WebRTC를 통해 실시간 AI 제품 구축 WebRTC는 브라우저, 모바일 앱 및 서버 간에 저지연 오디오, 비디오 및 데이터를 전송하기 위한 개방형 표준입니다. 주로 P2P(피어 투 피어) 통화와 연관되지만, 대화형 미디어의 까다로운 부분을 표준화하기 때문에 클라이언트-서버 실시간 시스템의 실용적인 기반이 되기도 합니다. 연결 설정 및 NAT(Network Address Translation) 통과를 위한 ICE, 암호화된 전송을 위한 DTLS 및 SRTP(Secure Real-time Transport Protocol), 오디오 압축 및 디코딩을 위한 코덱 협상, 품질 제어를 위한 RTCP(Real-time Transport Control Protocol), 반향 제거 및 지터 버퍼링과 같은 클라이언트 측 기능 등이 여기에 포함됩니다.

이러한 표준화는 AI 제품에 매우 중요합니다. WebRTC가 없다면 모든 클라이언트는 NAT를 통과하는 연결을 설정하고, 미디어를 암호화하며, 코덱(전송 및 압축 해제를 위해 선택된 인코더-디코더)을 협상하고, 변화하는 네트워크 상태에 적응하는 방법을 각기 다르게 해결해야 할 것입니다. WebRTC를 사용하면 이미 브라우저와 모바일 플랫폼에 구현된 프로토콜 스택을 기반으로 구축할 수 있으며, 우리는 실시간 미디어를 모델에 연결하는 인프라에만 집중할 수 있습니다.

또한 성숙한 오픈 소스 구현과 브라우저, 모바일 앱 및 서버 간의 상호 운용성을 유지하는 표준 작업을 포함하여 WebRTC 생태계 자체를 기반으로 구축합니다. 저스틴 우베르티(Justin Uberti, WebRTC의 원래 설계자 중 한 명)와 션 듀부아(Sean DuBois, Pion의 창시자이자 유지보수자)의 기초적인 작업 덕분에 우리 같은 팀은 저수준 전송, 암호화 및 혼잡 제어 동작을 처음부터 새로 만들 필요 없이, 이미 검증된 미디어 인프라를 기반으로 구축할 수 있었습니다. 다행히 저스틴과 션은 현재 OpenAI의 동료로서 WebRTC와 실시간 AI를 더 긴밀하게 결합하는 방법을 안내하고 있습니다.

AI에게 가장 중요한 특성은 오디오가 지속적인 스트림으로 도착한다는 것입니다. 음성 에이전트는 전체 오디오 업로드가 끝날 때까지 기다리는 대신, 사용자가 여전히 말을 하고 있는 동안 전사, 추론, 도구 호출 또는 음성 생성을 시작할 수 있습니다. 이것이 자연스러운 대화형 시스템과 PTT(Push-to-Talk) 방식처럼 느껴지는 시스템을 구분 짓는 차이점입니다.

미디어 아키텍처 선택 WebRTC를 선택한 후의 다음 질문은 이를 어디에서 종료(termination)할 것인가(예: 엣지에서 WebRTC 연결을 수락하고 관리할 위치), 그리고 해당 세션을 추론 백엔드에 어떻게 연결할 것인가였습니다. 종료 위치가 중요한 이유는 이것이 실시간 세션 상태, 미디어 전송, 라우팅, 지연 시간 및 장애 격리를 처리하는 방법을 결정하기 때문입니다.

SFU(선택적 전달 유닛, Selective Forwarding Unit) 또는...

원문 보기
원문 보기 (영어)
May 4, 2026 Engineering How OpenAI delivers low-latency voice AI at scale By Yi Zhang and William McDonald, Members of Technical Staff Share Voice AI only feels natural if conversation moves at the speed of speech. When the network gets in the way, people hear it immediately as awkward pauses, clipped interruptions, or delayed barge-in. That matters for ChatGPT voice, for developers building with the Realtime API, for agents working in interactive workflows, and for models that need to process audio while a user is still talking. At OpenAI’s scale, that translates into three concrete requirements: Global reach for more than 900 million weekly active users Fast connection setup so a user can start speaking as soon as a session begins Low and stable media round-trip time, with low jitter and packet loss, so turn-taking feels crisp The team at OpenAI responsible for real-time AI interactions recently rearchitected our WebRTC stack to address three constraints that started to collide at scale: one-port-per-session media termination does not fit OpenAI infrastructure well, stateful ICE (Interactive Connectivity Establishment) and DTLS (Datagram Transport Layer Security) sessions need stable ownership, and global routing has to keep first-hop latency low. In this post, we walk through the split relay plus transceiver architecture we built to preserve standard WebRTC behavior for clients while changing how packets are routed inside OpenAI’s infrastructure. WebRTC lets us make real-time AI products WebRTC is an open standard for sending low-latency audio, video, and data between browsers, mobile apps, and servers. It’s often associated with peer-to-peer calling, but it’s also a practical foundation for client-to-server real-time systems because it standardizes the hard parts of interactive media: ICE for connectivity establishment and NAT (Network Address Translation) traversal, DTLS and SRTP (Secure Real-time Transport Protocol) for encrypted transport, codec negotiation for compressing and decoding audio, RTCP (Real-time Transport Control Protocol) for quality control, and client-side features such as echo cancellation and jitter buffering. That standardization matters for AI products. Without WebRTC, every client would need a different answer for how to establish connectivity across NATs, encrypt media, negotiate codecs (the coder-decoders selected for transmission and decompression) and adapt to changing network conditions. With WebRTC, we can build on a protocol stack that’s already implemented across browsers and mobile platforms, focusing our own work on the infrastructure that connects real-time media to models. We also build on the WebRTC ecosystem itself, including mature open-source implementations and the standard work that keeps browsers, mobile apps, and servers interoperable. Foundational work by Justin Uberti (one of WebRTC’s original architects) and Sean DuBois (creator and maintainer of Pion) made it possible for teams like ours to build on battle-tested media infrastructure rather than reinvent low-level transport, encryption, and congestion-control behavior. We’re fortunate that both Justin and Sean are now colleagues here at OpenAI, helping guide how we bring WebRTC and real-time AI closer together. For AI, the most important property is that audio arrives as a continuous stream. A spoken agent can begin transcribing, reasoning, calling tools, or generating speech while the user is still talking, instead of waiting for a full upload. That’s the difference between a system that feels conversational and one that feels like push-to-talk. Choosing a media architecture Once we chose WebRTC, the next question was where to terminate it (where we’d accept and own the WebRTC connection—for example, at the edge) and how to connect those sessions to the inference backend. Termination matters because it determines how we handle real-time session state, media transport, routing, latency, and failure isolation. An SFU , or selective forwarding unit, is a media server that receives one WebRTC stream from each participant and selectively forwards streams to the others. In this model, the SFU terminates a separate WebRTC connection for every participant, and the AI joins as another participant in the session. That can be a good fit for products that are inherently multiparty, such as group calls, classrooms, or collaborative meetings. It keeps audio codecs, RTCP messages, data channels, recording, and per-stream policy in one place. 1 Even in client-to-AI products, an SFU is often the default starting point because it lets teams reuse one proven system for signaling, media routing, recording, observability, and future extensions such as human handoff or adding more participants. Our workload is different. Most sessions are 1:1—one user talking to one model, or one application talking to one real-time agent—with latency sensitivity on every turn. For that shape of traffic, we chose a transceiver model: a WebRTC edge service terminates the client connection and then converts media and events into simpler internal protocols for model inference, transcription, speech generation, tool use, and orchestration. In this design, the transceiver is the only service that owns the WebRTC session state, including ICE connectivity checks, the DTLS handshake, SRTP encryption keys, and session lifecycle. “Termination” here means the transceiver is the endpoint that completes those handshakes and encrypts or decrypts the media. Keeping that state in one place made session ownership easier to reason about, and it let backend services scale like ordinary services instead of acting as WebRTC peers themselves. The core deployment problem: WebRTC meets Kubernetes After choosing the transceiver model, our first implementation was a single Go service built on Pion that handled both signaling and media termination. It powers ChatGPT voice, the Realtime API’s WebRTC endpoint, and a number of research projects. Operationally, the transceiver service does two jobs: Signaling: SDP negotiation, codec selection, ICE credentials, and session setup Media: Terminating downstream WebRTC connections and maintaining upstream connections to backend services for inference and orchestration We wanted the service to run like the rest of our infrastructure: on Kubernetes, where workloads can scale up and down, and move across hosts as demand changes. But the conventional one-port-per-session WebRTC model fits that environment poorly, because it depends on large public UDP port ranges that are difficult to expose, secure, and preserve as pods are added, removed, or rescheduled. 2 Port exhaustion The first problem was the one-port-per-session model itself. At high concurrency, that means exposing and managing very large UDP port ranges. Cloud load balancers and Kubernetes services are not designed around tens of thousands of public UDP ports per service. Each additional range adds operational complexity in load balancer config, health checking, firewall policy, and rollout safety. 3 Large UDP port ranges are hard to secure because they expand the externally reachable surface area and make network policy harder to audit. They’re also a poor fit for autoscaling. Pods are constantly added, removed, and rescheduled in Kubernetes. Requiring each pod to reserve and advertise a large stable port range makes that elasticity brittle. 4 This is why many WebRTC systems move toward a single UDP port per server, with application-level demultiplexing behind that port. 5 State stickiness Single-port-per-server designs solve port count, but they introduce a second problem: preserving ownership of each session across a fleet. ICE and DTLS are stateful protocols. The process that created a session needs to keep receiving that session’s packets so it can validate connectivity checks, complete the DTLS handshake, decrypt SRTP, and process later session changes such as ICE restarts. If packets for the same session la
관련 소식