A modern, full-stack conversational AI voice assistant web application built with React and Node.js.
- π€ Voice Input: Web Speech API integration for voice-to-text conversion
- π Text-to-Speech: Murf AI integration for natural-sounding voice output
- π§ Multiple AI Providers: Support for OpenAI GPT-4 and Google Gemini 1.5 Pro
- π Multi-language Support: English, Hindi, Spanish, French, and German
- π Dark/Light Mode: Toggle between themes with smooth animations
- π± Responsive Design: Optimized for both desktop and mobile devices
- π¬ Real-time Chat: Smooth chat interface with typing indicators
- π¨ Modern UI: Built with Tailwind CSS and Framer Motion animations
- π Secure: Environment-based API key management
- React 18 - User interface library
- Tailwind CSS - Utility-first CSS framework
- Framer Motion - Animation library
- Axios - HTTP client
- Lucide React - Icon library
- Node.js - Runtime environment
- Express.js - Web framework
- Helmet - Security middleware
- CORS - Cross-origin resource sharing
- Rate Limiting - API protection
- OpenAI GPT-4 - Conversational AI
- Google Gemini 1.5 Pro - Advanced AI model
- Murf AI - Text-to-speech synthesis
vocamate/
βββ backend/ # Node.js backend server
β βββ config/ # Configuration files
β β βββ config.js # App configuration
β βββ routes/ # API routes
β β βββ chat.js # Chat endpoints
β β βββ speech.js # Speech endpoints
β βββ services/ # Service layers
β β βββ openaiService.js # OpenAI integration
β β βββ geminiService.js # Gemini integration
β β βββ murfService.js # Murf AI integration
β βββ server.js # Main server file
β βββ package.json # Dependencies
β βββ .env # Environment variables
βββ frontend/ # React frontend app
β βββ public/ # Static files
β β βββ index.html # HTML template
β β βββ manifest.json # PWA manifest
β βββ src/ # Source code
β β βββ components/ # React components
β β β βββ Header.jsx
β β β βββ ChatContainer.jsx
β β β βββ ChatMessage.jsx
β β β βββ ChatInput.jsx
β β β βββ TypingIndicator.jsx
β β β βββ ErrorBoundary.jsx
β β β βββ LoadingScreen.jsx
β β βββ App.jsx # Main app component
β β βββ api.js # API client
β β βββ index.js # App entry point
β β βββ index.css # Global styles
β βββ package.json # Dependencies
β βββ tailwind.config.js # Tailwind configuration
β βββ postcss.config.js # PostCSS configuration
β βββ .env # Environment variables
βββ README.md # This file
- Node.js 16+ and npm
- API Keys for:
- OpenAI (optional)
- Google Gemini (optional)
- Murf AI (recommended)
git clone https://github.com/your-username/vocamate.git
cd vocamatecd backend
npm installCreate .env file in the backend directory:
# Server Configuration
PORT=5000
NODE_ENV=development
# AI Service API Keys
OPENAI_API_KEY=your_openai_api_key_here
GEMINI_API_KEY=your_gemini_api_key_here
# Text-to-Speech API Key
MURF_API_KEY=your_murf_api_key_here
MURF_PROJECT_ID=your_murf_project_id_here
# CORS Configuration
FRONTEND_URL=http://localhost:3000Start the backend server:
npm startThe backend will be running on http://localhost:5000
Open a new terminal:
cd frontend
npm installCreate .env file in the frontend directory:
# Backend API Configuration
REACT_APP_API_BASE_URL=http://localhost:5000/api
# App Configuration
REACT_APP_NAME=VocaMate
REACT_APP_VERSION=1.0.0
REACT_APP_DEFAULT_LANGUAGE=en
REACT_APP_DEFAULT_AI_PROVIDER=geminiStart the frontend development server:
npm startThe frontend will be running on http://localhost:3000
- Visit OpenAI Platform
- Create a new API key
- Add it to your backend
.envfile
- Visit Google AI Studio
- Create a new API key
- Add it to your backend
.envfile
- Visit Murf AI
- Sign up for an account
- Get your API key from the dashboard
- Add it to your backend
.envfile
- English (en) - Default
- Hindi (hi) - ΰ€Ήΰ€Ώΰ€ΰ€¦ΰ₯
- Spanish (es) - EspaΓ±ol
- French (fr) - FranΓ§ais
- German (de) - Deutsch
- Text Chat: Type your message in the input box and press Enter
- Voice Input: Click the microphone button to speak your message
- Voice Output: AI responses are automatically converted to speech
- Language Switch: Use the language dropdown to change conversation language
- AI Provider: Switch between OpenAI and Gemini models
- Dark Mode: Toggle between light and dark themes
Backend:
cd backend
npm run dev # Uses nodemon for auto-restartFrontend:
cd frontend
npm start # Hot reload enabledFrontend:
cd frontend
npm run build-
Backend Connection Failed
- Ensure backend server is running on port 5000
- Check if CORS is configured correctly
- Verify API keys are set in environment variables
-
Speech Recognition Not Working
- Use HTTPS or localhost (required for Web Speech API)
- Check browser compatibility (Chrome/Edge recommended)
- Ensure microphone permissions are granted
-
Text-to-Speech Issues
- Verify Murf AI API key is valid
- Check internet connection
- In development mode, mock audio will be used
-
AI Responses Not Working
- Ensure at least one AI provider API key is configured
- Check API key validity and quota
- Monitor browser console for error messages
- Chrome 80+ β (Recommended)
- Edge 80+ β
- Firefox 75+
β οΈ (Limited speech features) - Safari 14+
β οΈ (Limited speech features)
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenAI for GPT-4 API
- Google for Gemini API
- Murf AI for text-to-speech services
- Tailwind CSS for styling
- Framer Motion for animations
If you encounter any issues or have questions, please:
- Check the troubleshooting section
- Search existing GitHub issues
- Create a new issue with detailed information
Made with β€οΈ by [Your Name]
π If you found this project helpful, please give it a star!