Building a Streaming Voice-Agent Pipeline with ASR, LLM, and TTS
A tutorial presents a browser-to-server voice-agent pipeline that records audio, converts it to text with Tencent Cloud ASR, streams LLM responses over SSE, and sends synthesized audio over WebSocket. It explains why text and binary audio use different transports and provides NestJS-oriented implementation guidance, code, and troubleshooting notes. The author notes that the recording page calls a /speech/asr endpoint that is still missing from the controller, so the complete chain has not been demonstrated end to end.
The tutorial provides a practical implementation pattern for combining speech recognition, streamed LLM output, and text-to-speech, while explicitly identifying the missing NestJS ASR endpoint that prevents full end-to-end verification.
目标读者:写过一点 Node/前端,想让自己的 Agent 能“听懂人话、张嘴说话”的中级开发者。 读完你会拿到一条能跑的链路:浏览器录音 → 服务端转文字 → 大模型流式回答 → SSE 推字 + WebSocket 推音频。
一、为什么 Agent 一定要有语音
先讲场景,别讲技术。
用户在地铁上、在开车、在厨房手上都是油。这时候他不想打字,他想说一句:
“帮我看看今天还有哪些待办没做完。”
#NestJS#Tencent Cloud#Qwen#Tencent Cloud Streaming TTS#Tencent Cloud One-sentence ASR