Skip to content

T-Rzeznik/AudioSaR

Repository files navigation

AudioSaR - Audio Slowed and Reverb

An automated audio processing pipeline for creating lo-fi/slowed+reverb remixes with animated waveform visualizations.

Features

  • Audio Processing: Apply pitch shifting, reverb, and normalization to create lo-fi effects
  • Batch Processing: Process multiple audio files at once
  • Waveform Visualization: Generate animated waveform videos for YouTube uploads
  • Web Interface: Easy-to-use Streamlit interface with real-time preview
  • Flexible Controls: Adjust pitch shift, reverb room size, wet level, and normalization settings
  • Multiple Formats: Support for MP3, WAV, M4A, and AAC audio files

Quick Start

Prerequisites

  1. Python 3.8+
  2. FFmpeg (required for audio/video processing)

Install FFmpeg:

Windows (Chocolatey):

choco install ffmpeg

Or download from: https://ffmpeg.org/download.html

macOS (Homebrew):

brew install ffmpeg

Linux (apt):

sudo apt-get install ffmpeg

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/AudioSaR.git
cd AudioSaR
  1. Create a virtual environment:
python -m venv venv
  1. Activate virtual environment:
# Windows
venv\Scripts\activate

# Mac/Linux
source venv/bin/activate
  1. Install dependencies:
pip install -r requirements.txt

Usage

  1. Start the Streamlit app:
streamlit run app.py
  1. Open your browser to http://localhost:8501

  2. Upload audio files (MP3, WAV, M4A, or AAC)

  3. Adjust effect parameters in the sidebar:

    • Pitch Shift: -6 to +6 semitones (default: -2 for lo-fi effect)
    • Reverb Room Size: 0.0 to 1.0 (default: 0.5)
    • Reverb Wet Level: 0.0 to 1.0 (default: 0.3)
    • Normalization: Target volume in dBFS (default: -14.0)
  4. Click Process to apply effects to individual files or Process All for batch processing

  5. Generate waveform videos for YouTube uploads (optional)

Project Structure

AudioSaR/
├── app.py                 # Streamlit web interface
├── audio_processor.py     # Audio processing module (pitch shift, reverb, normalization)
├── video_generator.py     # Video generation module (waveform visualization)
├── requirements.txt       # Python dependencies
├── input_audio/          # Upload your audio files here
├── output_audio/         # Processed audio outputs (for SoundCloud, etc.)
└── output_videos/        # Generated waveform videos (for YouTube)

Audio Processing Pipeline

  1. Load Audio: Supports MP3, WAV, M4A, AAC formats
  2. Pitch Shift: Adjust pitch using semitone shifts (negative values = lower/slower)
  3. Reverb: Apply high-quality reverb using Spotify's Pedalboard library
  4. Normalize: Consistent volume across all tracks
  5. Export: Save processed audio to output_audio/

Video Generation

Two methods available:

  • SeeWav (default): Facebook Research's waveform visualization tool
  • FFmpeg showwaves: Built-in FFmpeg filter with customizable modes

Generates animated waveform videos at 1920x1080 resolution (30 FPS) for YouTube uploads.

Dependencies

  • streamlit: Web interface
  • pydub: Audio manipulation and pitch shifting
  • pedalboard: Professional-grade audio effects (Spotify's library)
  • numpy: Numerical processing
  • seewav: Waveform visualization
  • torch/torchaudio: Deep learning framework for audio processing

File Size Limits

  • Maximum upload size: 100 MB per file
  • Recommended audio length: 2-5 minutes for optimal processing time

Troubleshooting

"FFmpeg not found" error:

  • Ensure FFmpeg is installed and available in your system PATH
  • Restart your terminal/command prompt after installation

"SeeWav not found" error:

  • Reinstall dependencies: pip install -r requirements.txt
  • Try FFmpeg video generation method instead

Processing fails:

  • Check that audio files are not corrupted
  • Ensure sufficient disk space in output directories
  • Verify FFmpeg installation: ffmpeg -version

License

MIT License - See LICENSE file for details

Contributing

Contributions welcome! Please open an issue or submit a pull request.

About

Python audio processing pipeline - generates lo-fi/slowed+reverb remixes with animated waveform visualizations via Streamlit

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages