CoolFace
Apppublic

dominiconwuka/audio-visualizer

sourceHugging Faceupdated 1y agoView on Hugging Face
1likes
App README

๐ŸŽต 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.