谁在用
Who一位开发语音智能体的工程师。
遇到什么问题
Challenge电话 AI 反应慢会让通话很别扭,现成平台的延迟难以优化。
怎么用 AI 解决
Solution- 用 FastAPI 服务器通过 WebSocket 接收 Twilio 音频,交给 Deepgram 转写并判断说话轮次。
- 轮次结束后把文字交给大模型,生成的内容流式送进 ElevenLabs 语音合成,再直接回传 Twilio。
- 用户插话时取消生成并清空缓冲;语音合成连接保持预热。
结果如何
Results据原作者自述- 本地运行延迟约 1.7 秒,部署到欧洲后约 790 毫秒,略优于 Vapi 的约 840 毫秒
- 换用 Groq 的 llama-3.3-70b 后约 400 毫秒;搭建约一天,花费约 100 美元 API 额度
以上内容均由原作者自行报告,未经独立核实,也不代表造物云产品的效果。
提示词
Prompt参考提示词(由 agentusecases.ai 整理为模板,非原帖原文)
中文
帮我用【语言,例如 Python】为【用途,例如牙科诊所接听电话】做一个电话语音智能体,采用流式语音转文字、大模型和流式文字转语音,目标是 500 毫秒内响应,并能顺畅处理插话。先搭好框架。
ENGLISH
Help me build a phone voice agent in [language, e.g. Python] for [use case, e.g. answering calls for a dental office] using streaming speech-to-text, an LLM, and streaming text-to-speech, with the goal of responding in under 500ms and handling interruptions cleanly. Scaffold the project, wire up [providers, e.g. Deepgram, an LLM API, ElevenLabs, Twilio], and add latency logging. Finish when a test call works and the log shows average latency; ask before making any real phone calls or purchasing numbers.