# AudioImage AudioImage is a powerful web-based tool for Audio Spectrogram Art and Digital Steganography, powered by a Flask backend and Svelte 5 frontend. It transforms audio into visual art and allows for secure, invisible file embedding. ## Features * **Process Visualizer**: A real-time, interactive visualization page that lets you watch and hear the transformation process. * **Live Waveform**: See the audio signal rendered as a glowing, real-time oscilloscope. * **Step-by-Step Reveal**: Watch the spectrogram and steganographic image being constructed layer by layer. * **YouTube Audio Encoder**: Directly download audio from YouTube videos (with length validation) and embed it into images seamlessly. * **Audio Art Generation**: Convert MP3/AAC audio files into high-resolution visual spectrograms using Python's `librosa` and `matplotlib`. * **GPU Acceleration**: Automatically uses `torchaudio` and CUDA if available for lightning-fast processing. * **Steganography Hider**: Hide secret audio or image files inside a "host" PNG image effectively using LSB (Least Significant Bit) encoding. * **Universal Decoder**: Decode any image created with AudioImage to retrieve the original hidden files. * **Secure & Private**: All processing happens locally on your server; files are cleaned up automatically. ## Requirements * Python 3.12+ * Node.js & npm (or Bun) * CUDA-enabled GPU (optional, for faster spectrogram generation) ## Installation ### Method 1: Docker (Recommended for GPU) The easiest way to run AudioImage with full GPU acceleration is using Docker. 1. **Prerequisites**: Docker Desktop + NVIDIA Container Toolkit (for GPU). 2. **Run**: ```bash docker compose up --build ``` 3. Open `http://localhost:5000`. ### Method 2: Manual Setup 1. **Backend Setup**: ```bash cd server python3 -m venv venv source venv/bin/activate pip install -r requirements.txt ``` 2. **Frontend Setup**: ```bash # Root directory npm install npm run build ``` 3. **Run**: ```bash cd server python app.py ``` ## Architecture * **Frontend**: SvelteKit (SPA mode), Svelte 5 Runes, TailwindCSS. * Uses **Server-Sent Events (SSE)** for real-time progress streaming. * **Canvas API** & **Web Audio API** for the visualizer. * **Backend**: Flask, NumPy, PIL, Librosa, PyTorch (optional). * **Integration**: Flask serves the static Svelte build for a unified deployment experience. ## Usage Notes * **Supported Audio**: MP3, AAC, WAV, FLAC. * **Supported Images**: PNG (host/stego). * **Visualizer**: Visit the `/visualizer` page or click the link in the header to see the magic happen in real-time.