Paper Reading AI Learner

Building Enterprise Realtime Voice Agents from Scratch: A Technical Tutorial

2026-03-05 17:35:59
Jielin Qiu, Zixiang Chen, Liangwei Yang, Ming Zhu, Zhiwei Liu, Juntao Tan, Wenting Zhao, Rithesh Murthy, Roshan Ram, Akshara Prabhakar, Shelby Heinecke, Caiming Xiong, Silvio Savarese, Huan Wang

Abstract

We present a technical tutorial for building enterprise-grade realtime voice agents from first principles. While over 25 open-source speech-to-speech models and numerous voice agent frameworks exist, no single resource explains the complete pipeline from individual components to a working streaming voice agent with function calling capabilities. Through systematic investigation, we find that (1) native speech-to-speech models like Qwen2.5-Omni, while capable of high-quality audio generation, are too slow for realtime interaction ($\sim$13s time-to-first-audio); (2) the industry-standard approach uses a cascaded streaming pipeline: STT $\rightarrow$ LLM $\rightarrow$ TTS, where each component streams its output to the next; and (3) the key to ``realtime'' is not any single fast model but rather \textit{streaming and pipelining} across components. We build a complete voice agent using Deepgram (streaming STT), vLLM-served LLMs with function calling (streaming text generation), and ElevenLabs (streaming TTS), achieving a measured P50 time-to-first-audio of 947ms (best case 729ms) with cloud LLM APIs, and comparable latency with self-hosted vLLM on NVIDIA A10G GPU. We release the full codebase as a tutorial with working, tested code for every component.

Abstract (translated)

我们提供了一个从基础原理构建企业级实时语音代理的技术教程。尽管存在超过25个开源的语音到语音模型和许多语音代理框架,但没有单一资源能够解释从组件到具有功能调用能力的工作流式语音代理的完整流程。通过系统性研究,我们发现: 1. 本机语音转语音模型(如Qwen2.5-Omni)虽然能生成高质量音频,但由于处理速度过慢而不适合实时交互(约需13秒才能产生首个音频); 2. 行业标准的方法采用级联流式管道:STT → LLM → TTS,其中每个组件将其输出流传输给下一个组件;以及 3. 实现“实时”的关键不在于单一的快速模型,而在于各组件之间的\textit{流处理和流水线}技术。 我们使用Deepgram(流式语音转文本),由vLLM服务的语言模型(具有功能调用的流式文本生成)和ElevenLabs(流式文本到语音转换),构建了一个完整的语音代理。在使用云端语言模型API时,我们的方案实现了中位数为947毫秒、最佳情况为729毫秒的时间至首次音频输出,并且与自托管vLLM在NVIDIA A10G GPU上的延迟相近。 我们将整个代码库作为教程发布,包括每个组件经过测试的工作代码。

URL

https://arxiv.org/abs/2603.05413

PDF

https://arxiv.org/pdf/2603.05413.pdf


Tags
3D Action Action_Localization Action_Recognition Activity Adversarial Agent Attention Autonomous Bert Boundary_Detection Caption Chat Classification CNN Compressive_Sensing Contour Contrastive_Learning Deep_Learning Denoising Detection Dialog Diffusion Drone Dynamic_Memory_Network Edge_Detection Embedding Embodied Emotion Enhancement Face Face_Detection Face_Recognition Facial_Landmark Few-Shot Gait_Recognition GAN Gaze_Estimation Gesture Gradient_Descent Handwriting Human_Parsing Image_Caption Image_Classification Image_Compression Image_Enhancement Image_Generation Image_Matting Image_Retrieval Inference Inpainting Intelligent_Chip Knowledge Knowledge_Graph Language_Model LLM Matching Medical Memory_Networks Multi_Modal Multi_Task NAS NMT Object_Detection Object_Tracking OCR Ontology Optical_Character Optical_Flow Optimization Person_Re-identification Point_Cloud Portrait_Generation Pose Pose_Estimation Prediction QA Quantitative Quantitative_Finance Quantization Re-identification Recognition Recommendation Reconstruction Regularization Reinforcement_Learning Relation Relation_Extraction Represenation Represenation_Learning Restoration Review RNN Robot Salient Scene_Classification Scene_Generation Scene_Parsing Scene_Text Segmentation Self-Supervised Semantic_Instance_Segmentation Semantic_Segmentation Semi_Global Semi_Supervised Sence_graph Sentiment Sentiment_Classification Sketch SLAM Sparse Speech Speech_Recognition Style_Transfer Summarization Super_Resolution Surveillance Survey Text_Classification Text_Generation Time_Series Tracking Transfer_Learning Transformer Unsupervised Video_Caption Video_Classification Video_Indexing Video_Prediction Video_Retrieval Visual_Relation VQA Weakly_Supervised Zero-Shot