audio-cleanup

AudioClean Pro - Audio & Video Noise Removal SaaS

A professional micro SaaS application for removing noise and enhancing audio/video quality using AI-powered processing.

πŸš€ Features

πŸ› οΈ Technology Stack

πŸ“‹ Prerequisites

πŸ”§ Installation

  1. Clone the repository
    git clone <repository-url>
    cd audio-noise-cleanup-saas
    
  2. Install dependencies
    npm install
    
  3. Install FFmpeg

    macOS (using Homebrew):

    brew install ffmpeg
    

    Ubuntu/Debian:

    sudo apt update
    sudo apt install ffmpeg
    

    Windows: Download from FFmpeg official website

  4. Set up environment variables
    cp env.example .env
    

    Edit .env file and add your API keys:

    PORT=3000
    ASSEMBLYAI_API_KEY=your_assemblyai_api_key_here
    
  5. Start the application
    npm start
    

    For development with auto-restart:

    npm run dev
    
  6. Access the application Open your browser and navigate to http://localhost:3000

πŸ”‘ API Keys Setup

  1. Sign up at AssemblyAI
  2. Get your free API key from the dashboard
  3. Add it to your .env file

Free Processing (FFmpeg)

πŸ“– Usage

Web Interface

  1. Upload File: Drag and drop or click to browse
  2. Choose Settings:
    • Enhancement Level: Low, Medium, High
    • Processing Mode: Professional (AssemblyAI) or Free (FFmpeg)
  3. Process: Click β€œStart Processing”
  4. Download: Get your enhanced file

API Endpoints

Process Audio/Video

POST /api/process
Content-Type: multipart/form-data

Parameters:
- file: Audio/video file (max 100MB)
- enhancementLevel: "low" | "medium" | "high"
- useFreeProcessing: "true" | "false"

Response:

{
  "success": true,
  "message": "File processed successfully",
  "downloadUrl": "/api/download/enhanced-file.wav",
  "filename": "enhanced-file.wav",
  "processingTime": 5000,
  "originalSize": 1048576,
  "processedSize": 2097152
}

Download Processed File

GET /api/download/{filename}

Health Check

GET /api/health

πŸŽ›οΈ Processing Options

Enhancement Levels

Low Enhancement

Medium Enhancement (Default)

High Enhancement

Processing Modes

Professional (AssemblyAI)

Free (FFmpeg)

πŸ”’ Security Features

πŸ“ Project Structure

audio-noise-cleanup-saas/
β”œβ”€β”€ server.js                 # Main Express server
β”œβ”€β”€ package.json             # Dependencies and scripts
β”œβ”€β”€ env.example              # Environment variables template
β”œβ”€β”€ README.md               # This file
β”œβ”€β”€ services/
β”‚   β”œβ”€β”€ audioProcessor.js   # Audio processing logic
β”‚   └── videoProcessor.js   # Video processing logic
β”œβ”€β”€ public/
β”‚   β”œβ”€β”€ index.html          # Main web interface
β”‚   β”œβ”€β”€ styles.css          # Styling
β”‚   └── script.js           # Frontend JavaScript
β”œβ”€β”€ uploads/                # Temporary upload directory
└── processed/              # Temporary processed files

πŸš€ Deployment

Heroku

  1. Create a Heroku app
  2. Add FFmpeg buildpack:
    heroku buildpacks:add https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest.git
    
  3. Set environment variables
  4. Deploy

Docker

FROM node:16-alpine
RUN apk add --no-cache ffmpeg
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
EXPOSE 3000
CMD ["npm", "start"]

VPS/Cloud

  1. Install Node.js and FFmpeg
  2. Clone repository
  3. Set up environment variables
  4. Use PM2 for process management:
    npm install -g pm2
    pm2 start server.js --name "audioclean"
    

πŸ’° Pricing & Costs

AssemblyAI Costs

Free Processing

πŸ”§ Configuration

Environment Variables

Variable Description Default
PORT Server port 3000
ASSEMBLYAI_API_KEY AssemblyAI API key -
NODE_ENV Environment mode development

Rate Limiting

// In server.js
const limiter = rateLimit({
  windowMs: 15 * 60 * 1000, // 15 minutes
  max: 10 // 10 requests per window
});

File Upload Limits

// In server.js
const upload = multer({
  limits: {
    fileSize: 100 * 1024 * 1024 // 100MB
  }
});

πŸ› Troubleshooting

Common Issues

  1. FFmpeg not found
    # Check if FFmpeg is installed
    ffmpeg -version
    
  2. AssemblyAI API errors
    • Verify API key is correct
    • Check API quota/limits
    • Ensure internet connection
  3. File upload fails
    • Check file size (max 100MB)
    • Verify file type is supported
    • Ensure upload directory has write permissions
  4. Processing fails
    • Check server logs
    • Verify FFmpeg installation
    • Ensure sufficient disk space

Logs

Enable debug logging by setting:

LOG_LEVEL=debug

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

πŸ“ž Support

For support and questions:


Made with ❀️ for audio enthusiasts and content creators