This guide will help you set up and run the enhanced voice assistant that uses OpenAI's Realtime model with LiveKit for natural conversation-based job posting creation.
You already have the necessary environment variables:
OPENAI_API_KEY=<Your OpenAI API Key>
LIVEKIT_API_KEY=<your API Key>
LIVEKIT_API_SECRET=<your API Secret>
LIVEKIT_URL=wss://hirehub-epnu8ba6.livekit.cloudpip install \
"livekit-agents[openai]~=1.0" \
"livekit-plugins-noise-cancellation~=0.2" \
"python-dotenv" \
"httpx>=0.25.0"python job-posting-agent.py download-filesMake sure your Next.js application is running on port 3000:
npm run devThe voice assistant needs to connect to your /api/jobs endpoint to create job postings.
python job-posting-agent.py consolepython job-posting-agent.py startThe voice assistant will guide you through creating a job posting by asking about:
- Job Title - "What position are you hiring for?"
- Job Description - Role responsibilities and what makes it exciting
- Requirements - Education, experience, qualifications needed
- Job Type - Full-time, Part-time, Contract, Freelance, Internship
- Experience Level - Entry, Mid, Senior, or Executive level
- Location - Where is it based? Remote work allowed?
- Salary Range - Optional but helpful for candidates
- Required Skills - Essential technical skills/technologies
- Preferred Skills - Nice-to-have skills
- Review & Submit - Confirms everything before posting
- Natural Language Processing: Understands job types, experience levels, salary ranges
- Context Awareness: Tracks conversation progress and missing information
- Flexible Order: You can provide information in any order
- Error Handling: Graceful handling of API connection issues
- Real-time Feedback: Shows completion percentage as you talk
Assistant: Hi there! I'm your AI voice assistant. I'll help you create a comprehensive
job posting through natural conversation. What position would you like to post today?
You: "I need to hire a senior software engineer"