Skip to content

Repository files navigation

Audio Signal Processing Tool

This Python script processes a WAV audio file to analyze and visualize its signal. It includes functionality to identify and plot peaks (S1 and S2 sounds), create a spectrogram, and print various details about the audio signal.

Features

• Open File Dialog: Allows the user to select a WAV file from their file system.

• Audio Signal Processing:

o	Reads the WAV file.
o	Handles both mono and stereo audio files by averaging stereo channels.
o	Normalizes the audio signal.
o	Extracts and plots a segment of the audio signal.

• Peak Detection: Identifies and plots peaks (S1 sounds) and valleys (S2 sounds) in the audio signal.

• Spectrogram Creation: Generates and displays a spectrogram of the audio signal.

• Signal Details: Prints detailed information about the audio signal, including frequency sampling, maximum and minimum amplitude, signal shape, data type, and duration.

Requirements

• Python 3.x

• numpy

• matplotlib

• scipy

• tkinter

Run the script

A file dialog will appear. Select a WAV file to process.

Outputs:

image

image

image

image

Max Amplitude: 48782.7578125

Min Amplitude: -37955.46484375

Signal shape: 57600

Audio Signal count: (57600,)

Signal duration: 1.2 seconds

About

Visualising heartbeat S1,S2 from selected wave files

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages