Skip to content

This project is a Sound file analyzer that processes audio files and provides detailed visualizations of their frequency spectrum and waveform characteristics. It was developed as part of a Digital Signal Processing (DSP) course at Georgia Tech, with the goal of gaining a deeper understanding of Fourier Transform concepts. Now it's my new toy.

Notifications You must be signed in to change notification settings

darrrgghh/WAV-File-Analyzer

Repository files navigation

🎵 Sound Analyzer

This project is a Sound file analyzer that processes .wav, .mp3, .m4a, .ogg, .flac and .aiff files, and provides detailed visualizations of their frequency spectrum and waveform characteristics. It was developed as part of a Digital Signal Processing (DSP) course at Georgia Tech, with the goal of gaining a deeper understanding of Fourier Transform concepts, including the Fast Fourier Transform (FFT) and the Discrete Fourier Transform (DFT).

The analyzer is designed to help users explore audio signals in both the time domain (waveform) and the frequency domain (spectrum). It provides a user-friendly interface for loading audio files, analyzing their properties, and visualizing the data in various ways, including waveforms, spectrograms, and 3D spectrograms.

Whether you're a student learning about DSP, a musician analyzing audio files, or just someone curious about sound, this tool offers an intuitive way to explore the intricacies of audio signals.

It's version 0.3 now.

Features

  • Uses NumPy, SciPy, and Matplotlib to process and visualize audio signals.
  • Supports .wav, .mp3, .m4a, .ogg, .flac and .aiff file input.
  • Implements both:
    • Fast Fourier Transform (FFT) for frequency domain analysis.
    • Discrete Fourier Transform (DFT) manually for educational purposes.
  • Displays multiple visualizations:
    • Waveform (amplitude over time)
    • Spectrogram (frequency changes over time)
    • DFT Spectrum (frequency domain representation)
    • 3D Spectrogram (frequency changes over time in 3D)
  • Audio playback
  • Includes a GUI built with Tkinter for easy file selection, visualization, volume and playback controls.

Installation

  1. Clone the repository:
    git clone https://github.com/darrrgghh/WAV-File-Analyzer.git
    cd WAV-File-Analyzer
  2. Create and activate virtual environment:
  • For Windows:
python -m venv .venv
.\.venv\Scripts\activate
  • For MacOS/ Linux:
python -m venv .venv
source .venv/bin/activate

Install dependencies:

pip install -r requirements.txt

How to use

  1. Run the wav file analyzer script:
python wav_analyzer.py
  1. Select an audio file using the file dialog.
  2. The program will display the following information about the audio file:
  • File path
  • Number of channels
  • Sample rate
  • Bit depth
  • Duration
  • Min, Max, Mean, and RMS values of the audio signal
  1. Visualize the audio data using the provided buttons:
  • Show Waveform: Displays the amplitude of the audio signal over time.
  • Show Spectrogram: Displays a 2D spectrogram showing frequency content over time.
  • Show DFT Spectrum: Displays the frequency spectrum computed using the Discrete Fourier Transform.
  • Show 3D Spectrogram: Displays a 3D spectrogram showing frequency content over time.

Building Executable Files

  • To distribute this application as a single executable (without an attached console) that includes all required resources, use PyInstaller. 2. Build using the provided popularity.spec file (recommended):
pyinstaller wav_analyzer.spec

Alternatively, you can build manually like this:

  • For Windows:
pyinstaller --onefile --windowed --icon=1.ico --add-data "loading.gif;." --add-data "logo.png;." --add-data "1.ico;." --add-data "placeholder.png;." wav_analyzer.py
  • For macOS
pyinstaller --onefile --windowed --icon=1.icns --add-data "loading.gif:." --add-data "logo.png:." --add-data "1.icns:." --add-data "placeholder.png:." wav_analyzer.py
  • Important! Make sure that the files loading.gif, logo.png, and the icon files (1.ico or 1.icns) are located in the root directory of your project. The resource_path() function in the code ensures that the application can locate these files whether it is running in development mode or from the built executable. You can also use your logos and animations.

Future Improvements

  • Add real-time audio analysis
  • Improve the GUI with more customization options.
  • Make my program look nice

License

This project is licensed under the MIT License.

About

This project is a Sound file analyzer that processes audio files and provides detailed visualizations of their frequency spectrum and waveform characteristics. It was developed as part of a Digital Signal Processing (DSP) course at Georgia Tech, with the goal of gaining a deeper understanding of Fourier Transform concepts. Now it's my new toy.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages