A web-based audio recording application with PostgreSQL database storage. Record, save, download, and manage audio files directly from your browser.
- 🎤 Real-time audio recording from your microphone
- 💾 Save recordings to PostgreSQL database
- 📝 Add descriptions to your recordings
- ⏱️ Track recording duration
- 📥 Download recorded audio files
- 📋 View all saved recordings
- 🗑️ Delete recordings
- 📊 File size tracking
- Node.js (v14 or higher)
- Docker and Docker Compose
- Modern web browser with microphone support
docker-compose up -dThis will start a PostgreSQL container with the following credentials:
- User: postgres
- Password: postgres
- Database: voice_recordings
- Port: 5432
Verify the container is running:
docker psnpm installFor development:
npm run devFor production:
npm startThe server will start on http://localhost:3000
Open your browser and navigate to:
http://localhost:3000
VoiceRecording/
├── server.js # Express server and API routes
├── package.json # Dependencies
├── .env # Environment variables
├── docker-compose.yml # PostgreSQL Docker configuration
├── public/
│ ├── index.html # Frontend UI
│ └── app.js # Frontend JavaScript logic
├── uploads/ # Audio file storage (created automatically)
└── README.md # This file
The application automatically creates a recordings table with the following structure:
CREATE TABLE recordings (
id SERIAL PRIMARY KEY,
filename VARCHAR(255) NOT NULL,
file_size INTEGER NOT NULL,
duration FLOAT,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
description TEXT
);GET /api/recordings
GET /api/recordings/:id
POST /api/recordings
Content-Type: multipart/form-data
Body:
- audio: WAV file
- duration: Recording duration in seconds (optional)
- description: Recording description (optional)
GET /api/download/:filename
DELETE /api/recordings/:id
GET /api/health
Edit .env file to customize settings:
PORT=3000
DB_USER=postgres
DB_PASSWORD=postgres
DB_HOST=localhost
DB_PORT=5432
DB_NAME=voice_recordings- Ensure your browser has permission to access the microphone
- Check browser settings and allow microphone access for localhost
- Some browsers require HTTPS for getUserMedia (except localhost)
- Verify PostgreSQL container is running:
docker ps - Check container logs:
docker logs voice_recordings_db - Ensure credentials in
.envmatch docker-compose.yml
- Change the port in docker-compose.yml:
"5433:5432" - Update DB_PORT in .env to match
Stop the server:
# Press Ctrl+C in the terminalStop the database:
docker-compose downTo also remove the database volume:
docker-compose down -v- Chrome 49+
- Firefox 25+
- Safari 14.1+
- Edge 79+
- Audio files are stored in the
uploads/directory and referenced in the database - Each recording is automatically assigned a unique filename
- The application provides a responsive design for mobile devices
- All recordings are timestamped for easy tracking
- Audio format conversion (MP3, OGG, etc.)
- Recording playback visualization
- Advanced search and filtering
- Recording tags/categories
- Batch operations
- Cloud storage integration
MIT