算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
ai-voice-bots【设计与创意】Builds production voice bots and IVR with Python STT/TTS pipelines. Use when designing telephony, streaming audio, latency budgets, or voice quality monitoring.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this skill to build, ship, and tune voice bots — phone IVR, real-time speech agents, and voice-first customer interactions — using pure Python frameworks.
This skill owns the voice-specific pipeline: STT, TTS, telephony platforms, latency engineering, and voice quality. For conversation design, persona, and escalation patterns, use ../ai-bot-builder/SKILL.md.
Default to a streaming STT→LLM→TTS pipeline when text inspection, redaction, or deterministic call state is required. Choose Pipecat for custom transports and LiveKit Agents for LiveKit room or SIP integration. Test speech-to-speech (S2S) against the same target calls when latency or multimodal behavior may justify a different pipeline; see references/s2s-and-native-voice-apis.md.
| Need | Route to |
|---|---|
| Bot conversation design, persona, escalation | ../ai-bot-builder/SKILL.md |
| Text-only bot architecture | ../ai-bot-builder/SKILL.md |
| General agent architecture | ../ai-agents/SKILL.md |
| WebSocket/SSE infrastructure (non-voice) | ../software-realtime/SKILL.md |
| Voice/multimodal reference material | ../ai-agents/references/voice-multimodal-agents.md |
| Need | Default | Notes |
|---|---|---|
| Choose telephony platform | references/telephony-platform-selection.md | Twilio, Vapi, Bland.ai, Retell, Telnyx, Vonage |
| Design voice pipeline | references/voice-pipeline-architecture.md | STT→LLM→TTS streaming, codec selection |
| Build with Pipecat | references/pipecat-patterns.md | Processors, transports, production deployment |
| Build with LiveKit Agents | references/livekit-agents-patterns.md | AgentSession, rooms, plugins |
| Optimize latency | references/latency-engineering.md | Component budgets, edge deployment, caching |
| Monitor voice quality | references/voice-quality-metrics.md | MOS, WER, dashboards, alerting |
| Design IVR flows | references/ivr-design.md | DTMF, menu trees, hybrid voice+keypad |
| Voice compliance | references/voice-safety-compliance.md | Recording consent, PCI, TCPA, GDPR |
| Deploy voice bot to 24/7 production | references/production-deployment.md | Concurrent-call capacity, SIP/PSTN HA, autoscaling, drain, recording compliance, cost model |
| Pick a hosting platform (LiveKit Cloud + Fly.io, Pipecat Cloud, etc.) | ../software-paas-hosting/references/agent-hosting-matrix.md | Voice stacks BV1–BV3 + what does NOT host voice |
ai-bot-builder patterns for the LLM "brain."Phone/WebRTC → Transport → STT → LLM → TTS → Transport → Phone/WebRTC
│ │ │ │ │
│ │ │ │ └── Audio codec encoding
│ │ │ └── Text-to-speech streaming
│ │ └── Conversation logic (ai-bot-builder)
│ └── Speech-to-text streaming
└── WebSocket / WebRTC / SIP
Pipeline budget: Measure each component and the end-to-end first-audio time before setting numerical targets. Streaming stages overlap, so summing component durations does not necessarily equal perceived turn latency.
| Component | Measure |
|---|---|
| VAD or turn detector | End-of-speech to end-of-turn decision |
| STT | Audio to stable transcript, including partials |
| LLM | Request to first usable output token |
| TTS | Text availability to first playable audio |
| Transport | Caller network and SIP/WebRTC delivery |
Full depth → references/voice-pipeline-architecture.md
Default to the telephony provider already approved for the target geography and call type. Compare its current number/SIP availability, recording controls, transfer behavior, concurrent-call limits, and pricing against the official provider documentation before changing platforms.
Full comparison → references/telephony-platform-selection.md
| Framework | Best for | Transport | S2S support | Ecosystem |
|---|---|---|---|---|
| Pipecat (default) | Custom voice pipelines, multi-transport | WebSocket, Twilio, Daily, WebRTC | Yes (OpenAI Realtime, Gemini Live) | Deepgram, ElevenLabs, Cartesia, Anthropic, OpenAI |
| LiveKit Agents | Room-based voice, recording, multi-party | LiveKit (WebRTC) | Yes (OpenAI Realtime) | LiveKit Cloud, STT/TTS plugins |
| Vocode | Simple voice bots, telephony focus | Twilio, Vonage, WebSocket | No | Deepgram, Azure, ElevenLabs |
Default: Pipecat — strongest Python ecosystem, composable pipeline processors, multi-transport support, and broadest S2S provider coverage.
Use LiveKit Agents when: multi-participant calls, built-in recording, or already using LiveKit infrastructure.
If an inline text gate must block unsafe output before the caller hears it, use the cascading pipeline. If that gate is not required and a same-call-set test shows S2S improves the chosen latency or experience metric, use S2S. A parallel transcript can help audit after the fact but cannot block already-spoken audio. Check the current model, regional availability and price in the provider docs before selection.
Full S2S reference → references/s2s-and-native-voice-apis.md
Decompose the budget before optimizing. Attribute delay to VAD, STT, LLM first token, TTS first audio, and network. The bottleneck can be turn detection or a cold TTS connection even when the LLM is fast. Full instrumentation → latency-engineering.md; queueing effects → queueing-theory-applied.md.
Barge-in is a cancellation path. A user talking over the bot must stop the in-flight audio and pending generation promptly. Measure time to actual audio stop, false interruptions and recovery separately from end-of-turn latency. See queueing-theory-applied.md (P3, A3).
Recompare S2S and cascading when changing models or providers. Use the same target-region calls to measure first audio, task success, tool safety and transcript needs; see s2s-and-native-voice-apis.md.
Test the target languages, accents, codecs, handset networks, background noise, silence, barge-in, DTMF, transfer, provider timeout, and reconnect paths with real or replayed call audio. Report end-of-turn and first-audio latency percentiles, interruption success, task completion, false transfer, hang-up, and consent-capture rates by scenario. Launch only when every blocking scenario has a deterministic fallback and the concurrent-call test meets the same bounds. A provider connection or synthetic clean-audio demo is not launch evidence.
references/s2s-and-native-voice-apis.md for the full session management pattern.References
Assets
Scripts
python3 scripts/voice_latency_audit.py --input pipeline_logs.jsonl — Pipeline latency breakdownpython3 scripts/call_quality_scorer.py --input calls.jsonl — Call quality scoringData
When prior decisions or pitfalls are relevant, consult learnings.consolidated.md if present; use learnings.md only for needed history or as the available fallback. Otherwise skip both.
After applying it, if you encountered a pattern worth remembering, a mistake worth preventing, or a domain fact that surprised you, append one dated bullet to learnings.md via agents-skills-feedback-loop/scripts/append_learning.py. Do not modify SKILL.md itself.