Using RMS output of bandpass filters to determine voice gender

10 Ansichten (letzte 30 Tage)
Muhammad Taimoor
Muhammad Taimoor am 9 Dez. 2022
Beantwortet: Gokul Nath S J am 14 Dez. 2022
I am currently working on a project of a "Signals and Systems" undergraduate course, where I have to convert a male voice to a female voice and vice versa. For this to work, I first need to identify if the given voice is a male voice or a female voice.
To do this, I followed the following steps:
  1. Design bandpass filters for characteristic male and female voices using "filterDesigner".
  2. Pass the input signal through both the bandpass filters.
  3. Calculate the RMS value of both the outputs.
Now I am confused regarding how to use the RMS values to determine the gender. I shall be grateful if someone here can tell me how to do it.
My code is given below:
% "Sample.wav" is a recording of a male voice
info=audioinfo('Sample.wav'); %Provides us info about the .wav file
[y,Fs] = audioread('Sample.wav'); %Will read the audio data from .wav file
t = 0:seconds(1/Fs):seconds(info.Duration);
t = t(1:end-1); %Time axis along which original signal will be plotted
%Plot the signal
%subplot(3,1,1);
figure
plot(t,y) %Plots the original speech signal
xlabel('Time')
ylabel('Audio Signal')
F=load('MaleBandpass.mat');
C=struct2cell(F);
A=cell2mat(C);
figure
c=conv(y,A); %Plot the signal after it is passed through the male bandpass filter
rms(c) %RMS value of male bandpassed signal
plot(c);
title('male-pass filtered ')
figure
F=load('FemaleBandpass.mat');
C=struct2cell(F);
A=cell2mat(C);
figure
c=conv(y,A); %Plot the signal after it is passed through the female bandpass filter
rms(c) %RMS value of female bandpassed signal
plot(c);
title('female-pass filtered')
Both of my bandpass filters are also attached. Thank you in advance for your help!
P.S: My 'Sample.wav' file can be found on this link: https://drive.google.com/file/d/12EUvFqIu35FGOQzCPpy9hsYSqOdi3xSC/view?usp=sharing

Antworten (1)

Gokul Nath S J
Gokul Nath S J am 14 Dez. 2022
Hi Muhammad Taimoor,
As per my understanding, you need to distinguish whether the given voice is male or female. As per the steps, it’s evident that you might need to design a bandpass filter for characteristic male and female voices.
In the next step, you passed the input signal through a bandpass filter (both). In frequency domain, this operation is equivalent to multiplying the signal with a bandpass filter. This operation filters away all the other frequency component except the one at ω and
Case 1
Male Voice + Male Bandpass filter
Say male bandpass filter is extending from while the male voice range in frequency domain is within this bandpass filter level. Once you multiply it and takes the RMS value of the resulting signal, one will get a considerable value.
Case 2
Male Voice + Female Bandpass filter
Say male bandpass filter is extending from while the male voice range in frequency domain is not within this bandpass filter level. Once you multiply it and takes the RMS value of the resulting signal, one will get a value less than the one obtained in case 1.
To put it together, the voice characteristics are determined by the RMS value. The RMS value corresponding to the characteristic bandpass filter having the higher RMS value can be assigned male/female status accordingly.

Produkte


Version

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by