Skip to content

🎧✨ See 🎢 waves 🌊, decode πŸ”Š amplitude πŸ“ˆ, frequency 🎹, & dB πŸ” with Python 🐍! πŸš€πŸ“Š

Notifications You must be signed in to change notification settings

TorresjDev/Python-Sound-Wave-Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

19 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎢 Sound Wave Analysis Project 🌊

This project brings sound waves to life through visualizations and decibel analysis using Python! Perfect for exploring the physics of sound and understanding amplitude, frequency, and dB levels. Dive into the world of audio signals with interactive graphs and insightful data. 🌟


πŸ› οΈ Project Features

  • 🎧 Waveform Visualization: See the amplitude of your audio over time.
  • πŸ“ˆ Frequency Spectrum: Explore the spectrogram and uncover hidden frequencies.
  • πŸ”Š Decibel Analysis:
    • Calculate peak and minimum dB values.
    • Compare relative levels with dBFS (Decibels Full Scale).
    • Understand sound intensity using RMS dB.

πŸš€ How to Use

1️⃣ Setup

  1. Install Python and required libraries:
    pip install numpy matplotlib
  2. Replace the sample .wav file with your own in the sounds/ folder.

2️⃣ Run the Code

  • Terminal:
    python sound_analysis.py
  • Jupyter Notebook:
    • Install Jupyter if not already:
      pip install notebook
    • Open the notebook:
      jupyter notebook sound-wave-analysis.ipynb
    • Run the cells for step-by-step visualization.

3️⃣ Switch Audio Files

🎡 Want to analyze new sounds? Replace "sounds/decibel-10s.wav" in the code with your .wav file. Make sure it’s in the same folder!


πŸ“– Key Concepts

  • Waveform: Shows amplitude vs. time.
  • Amplitude: The height of the wave, representing loudness.
  • Frequency: Measured in Hz, determines the pitch.
  • dBFS: Relative sound levels in decibels.
  • Spectrogram: Visualizes frequency over time.

πŸ“‚ Folder Structure

/project-folder
β”‚
β”œβ”€β”€ sounds/                  # 🎡 Audio files
β”œβ”€β”€ sound_analysis.py        # πŸ“Š Main script
β”œβ”€β”€ sound_tools.py           # πŸ› οΈ Helper functions
β”œβ”€β”€ sound_visualization.py   # 🎨 Plotting tools
β”œβ”€β”€ sound-wave-analysis.ipynb # πŸ’» Jupyter Notebook
└── README.md                # πŸ“œ Documentation

🌟 How It Works

  1. The program reads a .wav file to extract amplitude and frequency data.
  2. Decibel calculations provide insights into sound intensity.
  3. Visualizations are created:
    • Waveform: Shows how amplitude changes over time.
    • Spectrogram: Displays the frequency spectrum with intensity.

πŸ–₯️ Tips

  • πŸ’‘ Adjust the spectrogram settings (vmin, vmax, etc.) for clearer visuals.
  • 🎨 Use different .wav files to explore varying sound characteristics!

πŸ“š References

  • Python Libraries: Wave, NumPy, Matplotlib
  • Sound Physics Resources: Wikipedia - Sound

Happy Coding & Visualizing! ✨

About

🎧✨ See 🎢 waves 🌊, decode πŸ”Š amplitude πŸ“ˆ, frequency 🎹, & dB πŸ” with Python 🐍! πŸš€πŸ“Š

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published