📞 Voice Assistants
Xây dựng voice assistants cho phone bots và voice interfaces.
Voice Assistant Use Cases
Phone-Based
Text
1- Customer support hotlines2- Appointment scheduling3- Order status inquiries4- Surveys and feedback5- Outbound calling6- IVR replacementVoice Interface
Text
1- Smart speakers2- In-app voice3- Hands-free devices4- Accessibility features5- Voice searchPhone Bot Platforms
Platform Comparison
Text
1┌─────────────┬────────────┬────────────┬───────────┐2│ Platform │ Complexity │ Cost │ Best For │3├─────────────┼────────────┼────────────┼───────────┤4│ Bland.ai │ Low │ Per minute │ Quick MVP │5│ Retell.ai │ Medium │ Per minute │ Custom │6│ Vapi │ Medium │ Per minute │ Flexible │7│ Twilio + AI │ High │ Components │ Full ctrl │8└─────────────┴────────────┴────────────┴───────────┘Bland.ai
Text
1All-in-one phone AI:2✅ No coding required3✅ Handles STT/TTS/Agent4✅ Outbound & inbound5✅ Easy setup6 7Workflow:81. Sign up92. Define agent personality103. Set up phone number114. Configure conversation125. Go liveRetell.ai
Text
1Customizable phone agents:2✅ Custom voices3✅ LLM integration4✅ Real-time responses5✅ Analytics6 7Best for:8- Custom experiences9- Brand voice requirements10- Complex conversationsVapi
Text
1Developer-friendly:2✅ API-first design3✅ Flexible configuration4✅ Multiple LLM options5✅ Webhook integrations6 7Best for:8- Developers9- Custom integrations10- Complex logicBuilding Phone Bot with Bland.ai
Step 1: Setup
Text
11. Create Bland.ai account22. Get API key33. Claim phone number44. Configure in dashboardStep 2: Define Agent
Text
1Agent configuration:2{3 "name": "Support Assistant",4 "task": "Handle customer inquiries about orders",5 "voice": "natural_female",6 "model": "gpt-4o-mini",7 "first_sentence": "Hi, thanks for calling! How can I help?",8 "wait_for_greeting": false9}Step 3: Conversation Prompts
Text
1System prompt:2"You are a customer support agent for ABC Store.3 4Handle:5- Order status inquiries6- Return requests7- General questions8 9Rules:10- Be friendly and concise11- Ask for order number to check status12- Transfer to human for complaints13- Never give refunds directly"Step 4: Tools/Actions
Text
1Define what agent can do:2 3{4 "tools": [5 {6 "name": "check_order",7 "description": "Check order status",8 "parameters": {9 "order_number": "string"10 },11 "webhook": "https://api.store.com/orders"12 },13 {14 "name": "transfer_to_human",15 "description": "Transfer to human agent"16 }17 ]18}Step 5: Test & Deploy
Text
1Testing:21. Use test call feature32. Check conversation flow43. Verify tool calls54. Test edge cases6 7Deploy:8- Assign phone number9- Configure business hours10- Set up voicemail11- Enable call recordingBuilding with Retell.ai
Setup Flow
Text
11. Create account22. Create agent33. Configure:4 - Voice selection5 - LLM settings6 - Prompts7 - Functions84. Get phone number95. Test and deployAgent Configuration
Text
1{2 "llm_websocket_url": "wss://api.retellai.com/llm",3 "voice_id": "11labs-Rachel",4 "agent_name": "Support Agent",5 "response_engine": {6 "type": "retell-llm",7 "llm_id": "your_llm_id"8 },9 "boosted_keywords": ["order", "refund", "tracking"],10 "ambient_sound": "coffee-shop"11}Custom Functions
Text
1When agent needs to take action:2 3{4 "name": "schedule_appointment",5 "description": "Schedule appointment for customer",6 "parameters": {7 "date": {"type": "string"},8 "time": {"type": "string"},9 "service": {"type": "string"}10 }11}12 13Agent says:14"Let me schedule that for you..."15Triggers webhook → Book in calendar16"Done! You're booked for Tuesday at 2pm."Conversation Design
Opening
Text
1Good opening:2"Thanks for calling ABC Company! 3I'm your AI assistant. 4How can I help you today?"5 6Elements:7- Company name8- Set expectations (AI)9- Open-ended questionMain Flow
Text
1Structure:21. Understand request32. Gather needed info43. Take action or provide info54. Confirm completion65. Ask if anything else7 8Example:9User: "I want to check my order"10Agent: "I'd be happy to help! 11 What's your order number?"12User: "12345"13Agent: [checks API]14 "Your order #12345 shipped yesterday.15 Tracking number is ABC123.16 Is there anything else?"Closing
Text
1Good closing:2"Thanks for calling ABC Company!3Have a great day!"4 5Include:6- Thank user7- Summarize if needed8- Friendly goodbyeVoice-Specific Considerations
Pacing
Voice Pacing
Text
1Optimize for listening:2- Short sentences3- Natural pauses4- Clear pronunciation5- Moderate speed6 7Avoid:8- Long paragraphs9- Complex sentences10- Too much info at onceConfirmation
Text
1Always confirm critical info:2 3"Just to make sure I have this right,4your order number is 1-2-3-4-5?"5 6"You want to reschedule to Tuesday at 2pm,7is that correct?"Barge-In
Text
1Allow users to interrupt:2- User speaks over agent3- Agent stops and listens4- More natural conversation5 6Configure in platform settingsHandling Difficult Calls
Caller Frustration
Text
1Detect frustration:2- Raised voice3- Negative words4- Repeated requests5 6Response:7"I understand this is frustrating.8Let me transfer you to someone 9who can help immediately."No Response
Text
1Handle silence:2After 5 seconds:3"Are you still there?"4 5After 10 seconds:6"I haven't heard from you.7Please say something or 8I'll need to end the call."Background Noise
Text
1Can't understand:2"I'm having trouble hearing you.3Could you move somewhere quieter?4Or I can send information via text."Integration with Workflows
Make/Zapier Integration
Text
1Webhook when call ends:2 3{4 "call_id": "123",5 "duration": 180,6 "status": "completed",7 "transcript": "...",8 "call_summary": "Customer checked order status",9 "actions_taken": ["check_order"],10 "sentiment": "positive"11}12 13Workflows:14- Log to CRM15- Send follow-up email16- Create ticket if needed17- Update databaseReal-Time Actions
Text
1During call, agent can:2- Query databases3- Update records4- Send SMS5- Create tickets6- Book appointments7 8Via webhook integrationsAnalytics
Track Metrics
Text
1Key metrics:2- Call volume3- Average duration4- Resolution rate5- Transfer rate6- Sentiment score7- Top intentsImprovement Cycle
Text
11. Review call transcripts22. Identify failures33. Update prompts/flows44. Monitor improvement55. RepeatCost Optimization
Manage Costs
Text
1Voice AI costs:2- Per minute charges3- Phone number fees4- API calls5 6Optimize:7- Keep calls concise8- Route appropriately9- Use IVR for simple tasks10- Set call limitsTesting Checklist
Test Your Phone Bot
Text
1☐ Clear greeting2☐ Correct understanding3☐ Tool/action calls work4☐ Handles "I don't know"5☐ Transfer works6☐ Graceful silence handling7☐ Natural conversation flow8☐ Correct closing9☐ Webhook integrations10☐ Analytics trackingBài Tập
Practice
Build Phone Support Bot:
- Sign up for Bland.ai or similar
- Create customer support agent
- Configure prompts & personality
- Add order lookup tool
- Set up human handoff
- Test with real calls
- Review transcripts
Tiếp theo: Bài 7 - Multi-Channel Agents
