filippogiruzzi/voice_activity_detection

Voice Activity Detection based on Deep Learning & TensorFlow

What it solves

This project implements a real-time Voice Activity Detection (VAD) system that distinguishes between speech and noise in an audio signal. It provides a complete pipeline for processing raw audio, training a deep learning model, and performing inference to identify segments of audio containing human voice.

How it works

The system uses a pipeline consisting of feature extraction and a classification model:

  1. Feature Extraction: Audio windows of 1024 samples (at 16 kHz) are converted into feature tensors using MFCC (Mel-frequency cepstral coefficients), MFCC deltas, MFCC delta-deltas, and RMS energy.
  2. Classification: These features are fed into a 1D-ResNet (Residual Network) implemented in PyTorch. The model uses stacked residual blocks consisting of 1D convolutions, batch normalization, and global average pooling, ending in a fully connected head that outputs a speech logit.
  3. Inference: The system supports sliding-window inference and optional post-processing smoothing to refine the results.

Who it’s for

This project is designed for developers and researchers interested in audio processing and deep learning, specifically those looking to implement or experiment with a lightweight VAD system using PyTorch.

Highlights

  • High Accuracy: Achieves 97% test accuracy on the LibriSpeech dataset.
  • Full Pipeline: Includes tools for dataset creation from raw audio, training, and inference.
  • **Docker Support: Provides CPU and GPU-enabled Docker images for consistent deployment.
  • Flexible Architecture: The 1D-ResNet model is configurable via a ModelConfig dataclass.

Related

  • Project
  • Project
  • Project
  • Project
  • Project