voice-ai-integration
Skill0 starsChanged 3 months agoMITView on GitHub
Build voice AI training platforms with Hume EVI, Twilio, and tRPC. Use when creating roleplay systems, voice call integrations, phone-based training apps, or conversational AI platforms with emotional intelligence. Apply automatically when the request matches; the user does not need to mention this skill.
- Reads credentials
- Installs packages
1 other project uses a version of this.
Adopted by
Most recently taken up by
- Shengwang-Community/skillstheir own version, first seen Feb 28, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- Shengwang-Community/skills★ 14same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository76 other files it gives its agents.
- app-store-submission-packagerSkill
- digital-product-inventorSkill
- ios-testflight-github-actionsSkill
- meta-ads-analyzerSkill
- get-to-know-a-clientSkill
- investigate-before-recommendSkill
- production-system-auditSkill
- similarweb-analyticsSkill
- stock-analysisSkill
- system-architectSkill
- autonomous-github-syncSkill
- autonomous-sync-scriptSkill
- github-gem-seekerSkill
- organize-github-reposSkill
- using-git-worktreesSkill
- brainstorm-logosSkill
- brand-driven-ux-overhaulSkill
- canvas-designSkill
- excel-generatorSkill
- frontend-designSkill
- inspirational-music-video-productionSkill
- theme-factorySkill
- video-generatorSkill
- multiplayer-game-builderSkill
- promo-code-systemSkill
- realistic-ai-persona-builderSkill
- role-based-access-controlSkill
- serverless-debuggingSkill
- vertical-expansion-blueprintSkill
- manus-mcp-configuratorSkill
- mcp-auto-recoverySkill
- mcp-builderSkill
- mcp-connector-testerSkill
- mcp-ecosystem-optimizerSkill
- api-endpoint-builderSkill
- database-schema-generatorSkill
- testing-frameworkSkill
- deployment-automationSkill
- error-monitoring-setupSkill
- github-workflow-automationSkill
- analytics-dashboardSkill
- email-system-builderSkill
- feature-flag-systemSkill
- user-authentication-systemSkill
- cron-job-schedulerSkill
- file-upload-systemSkill
- notification-systemSkill
- payment-integrationSkill
- search-implementationSkill
- debug-mining-engineSkill
- doc-coauthoringSkill
- docxSkill
- internet-skill-finderSkill
- pdfSkill
- pptxSkill
- project-handoff-ingestionSkill
- serverless-debuggingSkill
- skill-arsenal-builderSkill
- skill-creatorSkill
- skill-demo-builderSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
17 rules. About 0 are common, 13 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Use this skill when the request matches its description.
- Very specific: line 48
Use webdev_request_secrets to add:
- Distinctive: line 259
Start/end call buttons
- Very specific: line 304
Call method (web/phone-in/phone-out)
- Distinctive: line 371
Start session → Connect to Hume → Have conversation → End session → View history
- Very specific: line 437
Verify HUME_API_KEY and HUME_SECRET_KEY are correct
- Distinctive: line 438
Check access token generation function
- Distinctive: line 441
Verify phone number is in E.164 format (+15551234567)
- Very specific: line 442
Check TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN
- Distinctive: line 443
Ensure Twilio account has sufficient balance
- Distinctive: line 444
Test with Twilio console first
- Distinctive: line 447
Check CORS settings for Hume WebSocket
- Distinctive: line 448
Verify access token is valid and not expired
- Distinctive: line 449
Ensure browser supports WebRTC/MediaRecorder
- Distinctive: line 452
Check microphone permissions in browser
- Distinctive: line 453
Verify audio devices are working
- Distinctive: line 454
Test with simple WebRTC example first
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Overview
Build voice AI training platforms with Hume EVI, Twilio, and tRPC. Use when creating roleplay systems, voice call integrations, phone-based training apps, or conversational AI platforms with emotional intelligence. Apply automatically when the request matches; the user does not need to mention this skill.
This skill should apply automatically when the request matches; the user does not need to mention this skill.
Usage
Use this skill when the request matches its description. The skill is discovered automatically; the user does not need to mention the skill explicitly.
Voice AI Integration Skill
Build production-ready voice AI training platforms with Hume EVI (Empathic Voice Interface), Twilio phone integration, and modern web stack (React + tRPC + Drizzle ORM).
When to Use This Skill
- Building voice-based roleplay or training systems
- Integrating Hume AI for emotionally intelligent conversations
- Adding phone calling capabilities (inbound/outbound) to web apps
- Creating practice/training platforms with conversation tracking
- Implementing multi-modal voice interfaces (web + phone)
Core Architecture Pattern
Frontend (React + tRPC)
↓
Backend (Express + tRPC + Drizzle)
↓
Voice AI (Hume EVI) + Phone (Twilio)
↓
Database (MySQL/TiDB) - Session & conversation trackingImplementation Workflow
Phase 1: Environment Setup
1. Add Hume AI Credentials
Use webdev_request_secrets to add:
HUME_API_KEY- API key from Hume dashboardHUME_SECRET_KEY- Secret key for access token generationHUME_FEMALE_CONFIG_ID- Female voice configuration UUIDHUME_MALE_CONFIG_ID- Male voice configuration UUIDHUME_WEBHOOK_URL- Webhook endpoint for call events (optional)
2. Add Twilio Credentials (if phone integration needed)
TWILIO_ACCOUNT_SID- Account SID from Twilio consoleTWILIO_AUTH_TOKEN- Auth token from Twilio consoleTWILIO_PHONE_NUMBER- Purchased phone number in E.164 format (+15551234567)
3. Update server environment config
Add to server/_core/env.ts:
export const ENV = {
// ... existing vars
humeApiKey: process.env.HUME_API_KEY!,
humeSecretKey: process.env.HUME_SECRET_KEY!,
humeFemaleConfigId: process.env.HUME_FEMALE_CONFIG_ID!,
humeMaleConfigId: process.env.HUME_MALE_CONFIG_ID!,
humeWebhookUrl: process.env.HUME_WEBHOOK_URL,
twilioAccountSid: process.env.TWILIO_ACCOUNT_SID,
twilioAuthToken: process.env.TWILIO_AUTH_TOKEN,
twilioPhoneNumber: process.env.TWILIO_PHONE_NUMBER,
};Phase 2: Database Schema
Core tables needed:
- Sessions table - Practice/training sessions
- userId, status, archetype/scenario, difficulty, mode
- voiceGender, roleplayMode (standard/reverse)
- callType (web/phone_inbound/phone_outbound)
- userPhoneNumber, twilioCallSid
- score, feedback, duration
- userCode (for tracking individual users)
- Conversation turns table - Message-by-message tracking
- sessionId, speaker (user/ai), message, timestamp
- emotions (JSON - from Hume), confidence
- User progress table - Aggregate stats
- userId, totalSessions, avgScore
- Scenario-specific completion counters
- Scripts table (if using predefined content)
- userId, name, content, fileUrl
Example schema (Drizzle ORM):
export const practiceSessions = mysqlTable('practice_sessions', {
id: int('id').primaryKey().autoincrement(),
userId: int('user_id').notNull(),
userCode: varchar('user_code', { length: 50 }),
archetype: varchar('archetype', { length: 50 }).notNull(),
difficulty: varchar('difficulty', { length: 50 }).notNull(),
practiceMode: varchar('practice_mode', { length: 50 }).notNull(),
voiceGender: varchar('voice_gender', { length: 10 }).notNull(),
roleplayMode: varchar('roleplay_mode', { length: 20 }).default('standard'),
callType: varchar('call_type', { length: 20 }).default('web'),
userPhoneNumber: varchar('user_phone_number', { length: 20 }),
twilioCallSid: varchar('twilio_call_sid', { length: 100 }),
status: varchar('status', { length: 20 }).notNull(),
score: int('score'),
feedback: text('feedback'),
duration: int('duration'),
createdAt: timestamp('created_at').defaultNow(),
});Phase 3: Hume Service Layer
Install Hume SDK:
pnpm add humeCreate server/hume-service.ts:
Key functions:
getHumeAccessToken()- Generate access token for clientgenerateSystemPrompt()- Dynamic prompt based on scenario/difficulty/modeprepareHumeSession()- Return configId + systemPromptgetConfigId()- Select male/female voice config
System prompt pattern:
function generateSystemPrompt(params: {
archetype: string;
difficulty: string;
practiceMode: string;
roleplayMode: 'standard' | 'reverse';
scriptContent?: string;
}): string {
if (params.roleplayMode === 'reverse') {
// AI plays expert sales rep, user plays homeowner
return `You are an expert door-to-door fiber sales representative...`;
}
// Standard: AI plays homeowner, user plays sales rep
return `You are a ${params.archetype} homeowner. ${getPersonalityTraits(params.archetype)}...`;
}Phase 4: Twilio Service Layer (Optional)
Install Twilio SDK:
pnpm add twilioCreate server/twilio-service.ts:
Key functions:
getTwilioPhoneNumber()- Return configured phone numberinitiateOutboundCall()- Call user's phone number with Hume config
Outbound call pattern:
export async function initiateOutboundCall(params: {
toNumber: string;
configId: string;
apiKey: string;
}): Promise<{ success: boolean; callSid?: string; error?: string }> {
const client = twilio(ENV.twilioAccountSid, ENV.twilioAuthToken);
const call = await client.calls.create({
to: params.toNumber,
from: ENV.twilioPhoneNumber,
twiml: `<Response><Connect><Stream url="wss://api.hume.ai/v0/evi/chat?config_id=${params.configId}&api_key=${params.apiKey}" /></Connect></Response>`,
});
return { success: true, callSid: call.sid };
}Phase 5: tRPC Router
Create server/practice-router.ts (or similar):
Essential endpoints:
startSession- Create session, return sessionIdgetHumeToken- Get access token for web voice callsprepareHumeSession- Get configId + systemPromptgetTwilioPhoneNumber- Return phone number for call-ininitiatePhoneCall- Trigger outbound callupdateSession- Update score/feedback/durationgetMySessions- List user's sessionsgetSession- Get single session detailsgetConversation- Get message-by-message transcript
Key pattern - session creation:
startSession: protectedProcedure
.input(z.object({
scriptId: z.number().optional(),
userCode: z.string().optional(),
archetype: z.enum(['type1', 'type2', 'type3']),
difficulty: z.enum(['easy', 'medium', 'hard']),
practiceMode: z.enum(['mode1', 'mode2']),
voiceGender: z.enum(['male', 'female']),
}))
.mutation(async ({ ctx, input }) => {
const result = await createPracticeSession({
userId: ctx.user.id,
...input,
status: 'in_progress',
});
return { sessionId: result.insertId };
})Phase 6: Frontend React Hooks
Create client/src/hooks/useHumeVoice.ts:
Manages WebSocket connection to Hume EVI:
- Connect/disconnect
- Send/receive audio
- Handle messages with emotional data
- Track connection status
Pattern:
export function useHumeVoice(sessionId: number | null) {
const [status, setStatus] = useState<'idle' | 'connecting' | 'connected' | 'disconnected'>('idle');
const [messages, setMessages] = useState<Message[]>([]);
const connect = async () => {
const token = await trpc.practice.getHumeToken.query();
const config = await trpc.practice.prepareHumeSession.query({ sessionId });
// WebSocket connection to Hume EVI
const ws = new WebSocket(`wss://api.hume.ai/v0/evi/chat?access_token=${token}&config_id=${config.configId}`);
// ... handle audio streaming
};
return { status, messages, connect, disconnect };
}Phase 7: Voice Call UI Component
Create client/src/components/VoiceCall.tsx:
Features:
- Start/end call buttons
- Mute/unmute toggle
- Real-time transcript display
- Call duration timer
- Visual status indicators
Integration with useHumeVoice hook:
export function VoiceCall({ sessionId }: { sessionId: number }) {
const { status, messages, connect, disconnect } = useHumeVoice(sessionId);
return (
<Card>
<CardHeader>
<CardTitle>Practice Session</CardTitle>
<Badge>{status}</Badge>
</CardHeader>
<CardContent>
<div className="space-y-4">
{messages.map((msg, i) => (
<div key={i} className={msg.speaker === 'user' ? 'text-right' : 'text-left'}>
<p>{msg.content}</p>
</div>
))}
</div>
<Button onClick={status === 'connected' ? disconnect : connect}>
{status === 'connected' ? 'End Call' : 'Start Call'}
</Button>
</CardContent>
</Card>
);
}Phase 8: Practice Configuration UI
Create client/src/pages/Practice.tsx:
Configuration sections:
- Script selection (optional)
- User code input (for tracking)
- Scenario/archetype selection
- Difficulty level
- Practice mode (full/partial)
- Roleplay mode (standard/reverse)
- Call method (web/phone-in/phone-out)
- Voice gender
Phone integration UI:
// Call method selection
<RadioGroup value={callMethod} onValueChange={setCallMethod}>
<RadioGroupItem value="web">Web Browser</RadioGroupItem>
<RadioGroupItem value="phone_inbound">
Call In: {twilioPhone?.phoneNumber}
</RadioGroupItem>
<RadioGroupItem value="phone_outbound">
Receive Call
</RadioGroupItem>
</RadioGroup>
// Phone number input (for outbound)
{callMethod === 'phone_outbound' && (
<Input
placeholder="+15551234567"
value={userPhoneNumber}
onChange={(e) => setUserPhoneNumber(e.target.value)}
/>
)}Phase 9: History & Analytics
Create client/src/pages/History.tsx:
Display:
- Session list with filters
- Session details dialog
- Full conversation transcript
- Performance metrics
- Progress by scenario/difficulty
Create client/src/pages/Analytics.tsx:
Aggregate stats:
- Total sessions
- Average score
- Completion rates by scenario
- Difficulty progression
- Time-series charts
Testing Strategy
1. Credential validation tests:
// server/hume.credentials.test.ts
test('Hume credentials are valid', async () => {
const token = await getHumeAccessToken();
expect(token).toBeTruthy();
});2. Integration tests:
// server/phone-integration.test.ts
test('System prompt includes roleplay mode', () => {
const prompt = generateSystemPrompt({ roleplayMode: 'reverse', ... });
expect(prompt).toContain('expert sales representative');
});3. End-to-end flow:
- Start session → Connect to Hume → Have conversation → End session → View history
Common Patterns
Reverse Roleplay Mode
Allow users to practice by playing the "customer" role while AI demonstrates expert responses:
if (roleplayMode === 'reverse') {
systemPrompt = `You are an expert ${profession}. The user will play the role of ${customerType} and present objections or scenarios. Demonstrate how to handle them professionally...`;
} else {
systemPrompt = `You are a ${customerType}. The user is a ${profession} trying to ${goal}...`;
}User Code Tracking
Enable managers to track individual users without requiring login:
// Auto-fill from profile or manual entry
const repCode = user?.repCode || manualRepCode || undefined;
// Store with session
await createPracticeSession({
userId: ctx.user.id,
userCode: repCode,
...otherParams
});
// Filter in manager dashboard
const sessions = await getUserSessions({ userCode: 'REP-1234' });Dynamic System Prompts
Adjust AI behavior based on difficulty:
const difficultyModifiers = {
rookie: 'Be friendly and receptive. Show clear buying signals.',
intermediate: 'Be neutral. Require some persuasion.',
expert: 'Be skeptical. Present common objections.',
nightmare: 'Be hostile and dismissive. Maximum difficulty.',
};
systemPrompt += ` ${difficultyModifiers[difficulty]}`;Deployment Checklist
- All credentials added via
webdev_request_secrets - Database migrations applied (
pnpm db:push) - Hume credentials validated (run credential tests)
- Twilio phone number configured (if using phone)
- Webhook endpoints secured (if using webhooks)
- Test web voice calls end-to-end
- Test phone calls (inbound + outbound)
- Verify conversation tracking in database
- Check analytics/history pages display correctly
Troubleshooting
Hume 401 errors:
- Regenerate API keys from Hume dashboard
- Verify
HUME_API_KEYandHUME_SECRET_KEYare correct - Check access token generation function
Twilio call failures:
- Verify phone number is in E.164 format (+15551234567)
- Check
TWILIO_ACCOUNT_SIDandTWILIO_AUTH_TOKEN - Ensure Twilio account has sufficient balance
- Test with Twilio console first
WebSocket connection issues:
- Check CORS settings for Hume WebSocket
- Verify access token is valid and not expired
- Ensure browser supports WebRTC/MediaRecorder
No audio in calls:
- Check microphone permissions in browser
- Verify audio devices are working
- Test with simple WebRTC example first
References
- Hume EVI Documentation: https://dev.hume.ai/docs/empathic-voice-interface-evi/overview
- Twilio Voice API: https://www.twilio.com/docs/voice
- tRPC Documentation: https://trpc.io/docs
- Drizzle ORM: https://orm.drizzle.team/docs/overview
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

