dominiconwuka/audio-visualizer
1
๐ต Audio-Reactive Bass Bump Visualizer
This is a demo of an audio-reactive video generator. Upload any audio file (MP3, WAV, etc.) and the application will create a video with a waveform that visually "bumps" in sync with the bass hits in the music.
How It Works
The backend pipeline uses several Python libraries to achieve this effect:
- `librosa`: For advanced audio analysis, including STFT, RMS, and bass energy calculation. It adaptively detects peaks in the bass frequency range to identify kick drums and bass notes.
- `numpy`: For all numerical operations and data manipulation.
- `opencv-python`: To render each frame of the video, including the background gradient, the waveform, and the scaling "bump" effect.
- `ffmpeg`: For encoding the rendered frames and the original audio into a final MP4 video file.
- `gradio`: To create the simple and interactive web interface you see here.
Tips for Use
- The free CPU provided by Hugging Face Spaces is great but has limits. For the fastest generation time, use the default settings: 1280x720 resolution and the `ultrafast` preset.
- Generating a full 1080p video with a high-quality preset will be significantly slower.
