A simple full-stack application for recording high-quality audio from the browser in real-time.
- Frontend: React application (port 3000)
- Backend: NestJS API with WebSocket support (port 3000)
- Audio Transcription: Python Flask service (port 5555)
- Database: MySQL (port 3306)
- Cache: Redis (port 6379)
- Reverse Proxy: Nginx (port 80)
- Docker
- Docker Compose
git clone <repository-url>
cd live-audio-recording
mkdir -p data/audio
mkdir data/redis
mkdir data/db
mkdir data/frontend
mkdir data/nats# Edit .env with your settings if neededdocker-compose up --buildThis will start:
- Backend API on
http://localhost:5000 - Frontend on
http://localhost:3000 - Audio Transcriber on
http://localhost:5555 - MySQL Database on
localhost:3306 - Redis on
localhost:6379
- Frontend: http://localhost
- Backend API: http://localhost:5000
# Only backend
docker-compose up backend
# Only frontend
docker-compose up frontend
# Only database
docker-compose up db redis
# Only audio transcriber
docker-compose up audio-transcriberdocker-compose downdocker-compose down -v- Handles WebSocket connections for real-time audio streaming
- Manages API endpoints
- Communicates with database and Redis
- Coordinates with audio transcription service
- Records audio from browser microphone
- Streams audio to backend via WebSocket
- Displays real-time status
- Processes audio files
- Integrates with speech-to-text models
- Stores results in database
- Stores recorded audio metadata
- Stores transcription results
- Stores user data
- Session management
- Real-time data caching
- WebSocket message queue
See .env.example for all available options:
REDIS_HOST=redis # Redis service name
REDIS_PORT=6379 # Redis port
DB_HOST=db # Database service name
DB_PORT=3306 # Database port
DB_USER=root # Database username
DB_PASSWORD=root123 # Database password
DB_NAME=audio_db # Database name
NODE_ENV=development # Environment mode
PORT=3000 # Backend port- Check if all containers are running:
docker-compose ps - Check logs:
docker-compose logs <service-name> - Verify network connectivity:
docker network inspect audio-network
# Restart database service
docker-compose restart dbIf ports are already in use, modify the port mappings in docker-compose.yml
docker-compose down -v
docker system prune
docker-compose up --build.
├── backend/ # NestJS API
│ ├── src/ # Source code
│ └── Dockerfile # Backend container config
├── frontend/ # React application
│ ├── src/ # React components
│ └── Dockerfile # Frontend container config
├── audio-transcription/ # Python service
│ ├── app/ # Flask application
│ └── Dockerfile # Transcription container config
├── nginx/ # Reverse proxy config
├── docker-compose.yml # Service orchestration
└── .env.example # Environment template
for testing with ipsecures origins, you may need to enable the following flag in Chrome: chrome://flags/#unsafely-treat-insecure-origin-as-secure
