Skip to content

AAB-69/RealTime-Gender-Classification-MATLAB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎙️ Real-Time Gender Classification of Voice Signals Using DSP Techniques in MATLAB

🧠 Overview

This project demonstrates a real-time voice gender classification system developed entirely with Digital Signal Processing (DSP) techniques in MATLAB.
It uses pitch-based feature extraction to classify the speaker’s gender without relying on any machine learning or pre-trained models.

The goal is to highlight the power of classical DSP — filtering, energy analysis, and acoustic feature extraction — in solving real-world problems like speech-based classification.


⚙️ Features

  • Real-time recording and analysis of speech input
  • FIR band-pass filtering (80–300 Hz) for pitch isolation
  • Silence removal using short-term energy thresholds
  • Pitch extraction via MATLAB’s built-in pitch() function
  • Threshold-based gender decision logic
  • Interactive MATLAB GUI for recording and displaying results

🧩 Project Workflow

  1. Audio Recording — Captures 5 seconds of voice input using MATLAB’s audiorecorder().
  2. Filtering — Applies a FIR band-pass filter (80–300 Hz) to remove irrelevant frequencies.
  3. Silence Removal — Uses frame-wise energy detection to exclude low-energy (silent) segments.
  4. Feature Extraction — Extracts pitch using the Normalized Cross Correlation (NCF) method.
  5. Classification — Determines gender based on average pitch:
    • Pitch < 190 Hz → Male
    • Pitch ≥ 190 Hz → Female
  6. Visualization — GUI displays waveform, average pitch, and classification result.

🖥️ MATLAB GUI Overview

The GUI (built with App Designer) includes:

  • Duration control (1–60 seconds)
  • “Record & Classify” button with indicator lamp
  • Live waveform plot
  • Display of extracted pitch and classification output

🧪 Results

  • The system successfully classified male and female voices in controlled environments.
  • Pitch-based thresholds showed strong alignment with expected ranges:
    • Male: typically < 190 Hz
    • Female: typically > 190 Hz
  • GUI provided immediate visual and textual feedback.

⚡ Challenges

  • Background noise affecting pitch estimation
  • Preserving soft speech segments during silence removal
  • Avoiding phase distortion (solved via zero-phase filtering with filtfilt)

🧠 Learning Outcomes

  • Implementation of classical DSP techniques in real-time applications
  • Design and testing of FIR filters and signal preprocessing routines
  • Practical understanding of acoustic feature extraction
  • GUI development using MATLAB App Designer
  • Improved understanding of speech processing pipelines

📂 Repository Contents

Folder Description
/code MATLAB source files (.m and .mlapp)
/docs Full report (PDF) with explanation and system design
README.md Documentation and usage overview
LICENSE License information (MIT recommended)

🪪 License

This project is open-sourced under the MIT License, allowing use, modification, and distribution with attribution.


🌟 Star this repository if you find it helpful for your DSP, MATLAB, or signal processing projects!

About

A MATLAB-based real-time voice gender classifier built entirely with Digital Signal Processing concepts. Includes FIR filter design, silence removal, pitch feature extraction, and GUI visualization, so no machine learning required.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages