A free and open source self-hostable platform for creating and deploying conversational voice-based surveys powered by OpenAI's real-time models.
- 🎙️ Real-Time Voice Conversations: Engage users with a natural, conversational AI agent for a more interactive survey experience.
- ⚙️ Configurable Survey: Easily configure survey questions, AI persona, voice models, and welcome/ending messages.
- 🔒 Secure & Self-Hostable: Full control over your data with secure admin authentication and the ability to host on your own infrastructure.
- 📊 Transcript Review: Access and review full transcripts of all completed survey sessions to analyze user feedback.
- 🏗️ Modern Tech Stack: Built with a fully type-safe, modern stack including React, Hono, tRPC, and Drizzle ORM.
- Overview & Problem Statement
- Demo
- Product Features
- Business Use Cases
- Tech Stack & Architecture
- Local Setup & Installation
Traditional web forms and text-based surveys often suffer from low engagement and completion rates. They can feel impersonal and fail to capture the nuance and detail present in natural human conversation, leading to superficial feedback.
This Voice AI Survey Tool transforms the survey experience by replacing static forms with dynamic, voice-driven conversations. An AI agent, powered by OpenAI Realtime models, engages users in a natural dialogue, asking predefined questions and capturing their spoken responses in real-time. This approach makes feedback collection more engaging, accessible, and capable of gathering richer, more detailed insights.
- Admin Dashboard
- Secure Google OAuth login with email-based admin authorization.
- Configurable admin access through environment variables - only specified email addresses can access admin features.
- Intuitive interface to configure the AI's persona, including event information, welcome/ending messages, and special instructions.
- Dynamic form to add, remove, and edit survey questions.
- Selection of different model voices and speech speed.
- Conversational Survey Interface
- Simple "Start Survey" initiation.
- Visual feedback for different states:
initializing,listening,paused,completed. - Real-time, interactive conversation with the AI agent.
- Ability to pause, resume, and end the survey at any time.
- Transcript Management
- A dedicated "Results" page in the admin dashboard.
- Chronological list of all survey sessions.
- Detailed view of each conversation, showing both user and AI messages.
- Customer Feedback: Automate post-support call surveys to gather detailed, qualitative feedback on customer satisfaction.
- Market Research: Conduct initial screening interviews or product concept testing with a consistent, unbiased AI interviewer.
- Employee Engagement: Create an anonymous voice channel for employees to provide candid feedback on workplace culture.
- Healthcare: Streamline patient intake by having an AI agent ask preliminary questions in a conversational manner.
- Accessibility Testing: Gather verbal feedback from users with disabilities on website or app usability.
- AI:
- Backend API:
- Frontend Web App:
- Tooling:
Data Flow:
- Admin: An admin logs in via Google OAuth, configures the survey settings (prompts, questions, voice) in the React dashboard, and saves them.
- End-User: A user visits the survey page, starts the session, and the frontend obtains a ephemeral key from the backend and establishes a real-time connection with the OpenAI API.
- Conversation: The AI agent powered by OpenAI's GPT Realtime Model configured with the admin's settings, initiates a conversation.
- Transcript Logging: The entire conversation transcript is saved to the database for later review by the admin.
The project is a monorepo managed by Turborepo and Bun Workspaces.
├── apps
│ ├── api # Hono backend with tRPC endpoints & Better Auth
│ └── web # React frontend application (Vite & React Router)
├── packages
│ ├── shared # Shared code (Zod schemas, constants) between backend and frontend
│ └── tsconfig # Shared TypeScript configurations
└── scripts
└── setup.ts # Automated setup script
- Git.
- Bun: v1.2.20 or later.
- OpenAI API Key.
- Google OAuth Credentials.
-
Clone the Repository
git clone https://github.com/CW-Codewalnut/voice-ai-tool.git cd voice-ai-tool -
Run the Setup Script This command will install all dependencies, copy the example
.envfiles if missing (it will NOT overwrite existing ones), and run the initial database migration & seed the DB with a sample system settings.bun setup
-
Configure Environment Variables The
bun setupscript creates.envfiles inapps/apiandapps/web. You must fill them with your credentials.Backend (
apps/api/.env)Variable Description Example APP_PORTPort for the backend server. 5000APP_URLFull public URL of the backend. http://localhost:5000ADMIN_EMAILSSemicolon-separated list of admin email addresses who can access admin features. admin@example.com;admin2@example.comCORS_ORIGINSSemicolon-separated list of allowed origins for CORS and auth trusted origins. http://localhost:3000;https://your-prod-domain.comDATABASE_URLTurso DB URL (libsql/http(s)) or local file URL for development. file:./.database/local.dbDATABASE_AUTH_TOKENOptional Turso auth token. Required for remote DB; omit for local file DB. your-turso-tokenGOOGLE_CLIENT_IDYour Google OAuth Client ID. your-google-client-id.apps.googleusercontent.comGOOGLE_CLIENT_SECRETYour Google OAuth Client Secret. your-google-client-secretAUTH_SECRETA long, random secret for signing auth tokens. Generate one with openssl rand -hex 32.a_very_long_and_random_secret_stringOPENAI_API_KEYYour OpenAI API key. sk-proj-xxxxxxxxxxxxxxxxxxxxxxxxFrontend (
apps/web/.env)Variable Description Example VITE_APP_URLThe full URL of your frontend application. http://localhost:3000VITE_API_URLThe full URL of your backend API. http://localhost:5000 -
Start the Development Servers This command uses Turborepo to start both the backend and frontend servers concurrently.
bun dev
- API will be running at
http://localhost:5000 - Web app will be running at
http://localhost:3000
- API will be running at
This project uses Drizzle ORM. You can manage the database with these commands:
bun db:studio: Opens the Drizzle Studio GUI to inspect your database.bun db:generate: Generates SQL migration files based on schema changes.bun db:migrate: Applies pending migrations to the database.