twilio-voice
БесплатноЗапускает вложенные скриптыНе проверенComprehensive Twilio Voice API assistance with AI integration patterns
Об этом скилле
Twilio Voice Skill
Comprehensive assistance for building voice applications with Twilio Voice API, including AI-powered voice assistants, ConversationRelay integrations, and production-ready implementation patterns.
When to Use This Skill
This skill should be triggered when:
Core Voice Development:
- Implementing Twilio Voice API integrations
- Building interactive voice response (IVR) systems
- Debugging Twilio voice applications
- Working with TwiML (Twilio Markup Language)
- Setting up voice webhooks and call routing
AI-Powered Voice Applications:
- Building conversational AI voice assistants
- Integrating Twilio with LLMs (OpenAI, Langflow, etc.)
- Implementing real-time bidirectional voice streaming with OpenAI Realtime API
- Creating voice-based customer service automation
- Developing natural language phone interactions
- Building function-calling voice agents with tool invocation
- Implementing low-latency streaming responses (~1 second)
- Managing conversation context and multi-turn dialogues
Advanced Features:
- Working with ConversationRelay for real-time AI conversations
- Implementing voice streaming with low latency
- Building voice applications with function calling
- Managing conversation context and memory
- Handling interruptions and turn-taking in voice conversations
Conversational Intelligence & Analytics:
- Analyzing call transcripts for business insights
- Implementing sentiment analysis and intent detection
- Building compliance monitoring systems
- Tracking AI agent performance metrics
- Creating custom language operators for business logic
- Extracting structured data from voice conversations
- Monitoring lead generation and customer satisfaction
Quick Reference
Common Patterns
1. ConversationRelay Integration
// Real-time AI voice conversation setup
app.post('/voice', (req, res) => {
const twiml = new VoiceResponse();
const connect = twiml.connect();
connect.conversationRelay({
url: 'wss://your-app.ngrok.io/ws',
voice: 'Polly.Joanna',
language: 'en-US'
});
res.type('text/xml');
res.send(twiml.toString());
});
2. Langflow + Twilio Integration
// Forward transcriptions to Langflow for AI processing
conversationRelay.on('transcription', async (data) => {
const response = await fetch(`${LANGFLOW_URL}/api/v1/run/${FLOW_ID}`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${LANGFLOW_API_KEY}`
},
body: JSON.stringify({
message: data.text,
session_id: data.callSid
})
});
const aiResponse = await response.json();
conversationRelay.say(aiResponse.message);
});
3. Voice-Optimized Prompts
// Best practices for AI voice responses
const systemPrompt = `
You are a helpful voice assistant. Follow these guidelines:
- Answer carefully and concisely (2-3 sentences max)
- Spell out ALL numbers (say "twenty-three" not "23")
- NO emojis, bullet points, or special symbols
- Use natural conversational language
- Avoid markdown or formatting
- Keep responses under 30 seconds when spoken
`;
4. Webhook Configuration
// Basic Twilio webhook handler
app.post('/twiml', (req, res) => {
const twiml = new VoiceResponse();
twiml.say({
voice: 'Polly.Joanna'
}, 'Hello! How can I help you today?');
twiml.gather({
input: 'speech',
action: '/process-speech',
timeout: 3
});
res.type('text/xml');
res.send(twiml.toString());
});
5. Development Setup with ngrok
# Expose local server for Twilio webhooks
ngrok http 3000
# Configure Twilio phone number webhook URL:
# https://your-subdomain.ngrok.io/voice
6. Conversational Intelligence Analysis
# Analyze call recordings with Conversational Intelligence
from twilio.rest import Client
client = Client(account_sid, auth_token)
# Create Intelligence Service (one-time setup)
service = client.intelligence.v2.services.create(
auto_transcribe=True,
unique_name='customer-service-analysis'
)
# Create transcript from call recording
transcript = client.intelligence.v2.transcripts.create(
service_sid=service.sid,
channel={
'media_properties': {
'source_sid': 'REXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' # Recording SID
}
}
)
# Attach language operators for business insights
sentiment_op = client.intelligence.v2 \
.services(service.sid) \
.operators.create(
operator_type='sentiment-analysis',
config={'language_code': 'en-US'}
)
# Retrieve analyzed results
results = client.intelligence.v2 \
.transcripts(transcript.sid) \
.operator_results.list()
for result in results:
print(f"Operator: {result.operator_type}")
print(f"Results: {result.extract_match}")
7. Real-Time Conversation Monitoring
# Monitor ConversationRelay AI agents in real-time
from twilio.rest import Client
Установить twilio-voice в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл twilio-voice?
Comprehensive Twilio Voice API assistance with AI integration patterns
Как установить скилл twilio-voice?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл twilio-voice запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic