Local QQ Voice Bot Build with NapCat and GPT-SoVITS
A first-person technical build record describes a local QQ voice chatbot using NapCat, AstrBot, an OpenAI-compatible model service and GPT-SoVITS. It covers a four-layer pipeline, reverse WebSocket setup, SILK v3 conversion through ffmpeg, zero-shot voice cloning with 3–10 seconds of clean reference audio, private and group memory, proactive-reply controls, latency tuning and layered troubleshooting. The report also says third-party protocol clients that use simulated login carry platform-rule, risk-control and possible account-ban risks. Its deployment experience and troubleshooting observations are not independently verified.
The record provides a concrete architecture and ordered validation method for a multi-component voice chatbot, showing where message delivery, model replies, speech synthesis, audio encoding, startup timing and speaking behavior can fail.
引子
文字聊天机器人已经很不稀奇了,但如果你想让自己的人设角色在群里用特定的声音说话,链路会突然长出一大截:协议端、机器人框架、大模型、语音合成,少一环都不行。
最近「大肥鱼」人设和「鲸鱼娘」桌宠在 DeepSeek 生态里火了一把,很多人第一次意识到:这些角色如果只会打字,乐趣少一半;真让它们用自己的声音在群里接话,才算「活过来」。
这篇文章是完整的一次搭建实录:从技术选型、端口规划,到语音编码绕不开的坑,再到把默认 TTS 换成支持零样本音色克隆的 GPT-SoVITS;最后还包括跑起来之后的那些问题——消息上下文怎么隔离、群消息历史留多少条、怎么让它主动接话又不招人烦、以及延迟该从哪一层下手。全程本地部署,不依赖任何商业语音服务。
一、先把架构拆成四层
语音聊天机器人不是「接个 LLM 就行了」,它是一条四段式的流水线:
#NapCat#AstrBot#GPT-SoVITS#DeepSeek#Edge-TTS#ffmpeg#OneBot 11