Skip to content

Vladimir-Dimitrov-Ngu/analyzer-wav

Repository files navigation

WAV analyzer with Noise Detection Neural Network

Project Structure

├── data
│   ├── example.wav
│   ├── denoising
│   │   ├── Pink (denoised audio files with pink noise)
│   │   └── White (denoised audio files with white noise)
│   ├── noise
│   │   ├── Pink (audio files with pink noise)
│   │   └── White (audio files with white noise)
│   └── sliced
│       └── example
├── mel-spectrogram
│   ├── example
│   │   ├── Pink_Noise (mel spectrograms of audio with pink noise)
│   │   ├── True (mel spectrograms of original audio)
│   │   └── White_Noise (mel spectrograms of audio with white noise)
│   ├── test
│   │   ├── Pink_Noise (mel spectrograms of test set with pink noise)
│   │   ├── True (mel spectrograms of test set original audio)
│   │   └── White_Noise (mel spectrograms of test set with white noise)
│   └── train
│       ├── Noise (mel spectrograms of training set with noise)
│       ├── Pink (mel spectrograms of training set with pink noise)
│       └── True (mel spectrograms of training set original audio)
├── ml
│   ├── cnn.ipynb (Jupyter notebook for CNN model)
│   └── noise_classifier_architecture.pdf (PDF file with noise classifier architecture)
├── scripts
│   ├── add_noise.py (script to add noise to audio files)
│   ├── create_dataset.py (script to create dataset)
│   ├── denoising.py (script for denoising audio files)
│   ├── generate_noise.py (script to generate noise)
│   ├── mel_spectorgram.py (script to generate mel spectrograms)
│   ├── split_wav.py (script to split audio files)
│   └── wav_to_mel.py (script to convert wav to mel spectrogram)
├── poetry.lock (Poetry lock file)
├── process_audio.sh (Bash script to run the analysis)
├── pyproject.toml (Poetry project file)
├── input_variables.txt (file to specify input parameters)
├── .dockerignore (Docker ignore file)
├── .flake8 (Flake8 configuration file)
├── .pre-commit-config.yaml (Pre-commit configuration file)
├── Dockerfile (Docker file)
├── LICENSE (License file)
├── README.md (Project README file)
└── contributing.md (Contributing guidelines)

Contents

File Preparation

Place your WAV file in the following directory:

/data

Setting Parameters

Specify the necessary arguments in the file

input_variables.txt.

Running the Analysis

Open the terminal and execute the command:

bash process_audio.sh

Docker

Build docker image:

docker build --build-arg ENVIRONMENT=<your_environment> -t <image_name>:latest .

Run docker container:

docker run -it <image_name>

Interactive format:

docker run -it <image_name> bash    

Functionality

  • Audio File Splitting. The file will be divided into required segments for analysis.
  • Noise Type Specification. Choose between pink or white noise.
  • Dataset Creation. Analysis results will be utilized to generate a dataset.
  • Noise Detection Neural Network. Utilizes a trained neural network capable of accurately detecting various types of noise within the audio file.
  • Denoising. Remove noise from the wav. I used open source solution and created 2 architecture for solve this task.

Denoising

Generative Adversarial Networks (GANs)

The generator will be trained to generate "clean" audio samples from noisy data. The discriminator will be trained to distinguish between real "clean" audio samples and those generated by the generator. During training, the generator and discriminator will compete, allowing the generator to improve its denoising performance.

Convolutional Neural Networks (CNNs)

An encoder-decoder architecture based on CNNs will be built. The encoder will compress the input noisy data into a compact feature representation. The decoder will then reconstruct the "clean" audio signal from this representation.

Stack

  1. Programming Languages: Bash scripting for automation.
  2. Neural Network Framework: Python with PyTorch for implementing and training the neural network.
  3. File Handling: Utilizes standard file handling libraries in Python.
  4. Audio Libraries: Audio processing libraries like Librosa.

Contributing

Copy of the contributing.md.

Authors

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published