Pipecat voice assistant

From findscripter/everything-skills · View interactive version

Pipecat voice assistant is an AI agent skill from the GitHub repository findscripter/everything-skills. 当需要用 Pipecat 搭建实时对话式语音 Agent、把多家服务商(OpenAI STT/TTS、Google Gemini LLM)串成一条低延迟语音流水线时使用;做基于 Mic→VAD→STT→LLM→TTS→Speaker 的本地语音助手并产出可运行 Python 脚本与配置;不适用于端到端 speech-to-speech 一体模型、电话/WebRTC 远程接入或非 Pipecat 框架。触发词:Pipecat、语音助手、低延迟语音流水线

How to use this skill

Skill file

何时使用

不该用的边界:

步骤

1. 安装依赖

pip install pipecat-ai[openai,google,silero] python-dotenv

silero 提供本地 VAD(语音活动检测),openai/google 为对应服务商扩展。

2. 配置环境变量

新建 .env:

OPENAI_API_KEY=your_openai_key
GOOGLE_API_KEY=your_google_key

3. 运行 Agent

python scripts/friday_agent.py

指令

组装一条线性流水线:Mic -> VAD -> STT -> LLM -> TTS -> Speaker。各级推荐配置:

Gemini 兼容垫片(关键约束): Gemini 的消息格式与 Pipecat 聚合器默认期望的 OpenAI 标准不同,脚本须提供 GoogleSafeContext 与 GoogleSafeMessage 两个类,把 OpenAI 风格的 dict 翻译成 Gemini 的 schema,否则会报「Validation error」。

示例

战术风系统提示与开场白(数据密集、零寒暄,便于压低延迟):

要点:响应要短、信息密度高,省去礼貌性填充语,直接压缩端到端延迟。

注意事项

互见


采编自 sickn33/antigravity-awesome-skills(MIT)。

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.