# Using RMS output of bandpass filters to determine voice gender

조회 수: 8(최근 30일)
답변: Gokul Nath S J 2022년 12월 14일
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
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')
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
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!

댓글을 달려면 로그인하십시오.

### 답변(1개)

Gokul Nath S J 2022년 12월 14일
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.

댓글을 달려면 로그인하십시오.

### 범주

Find more on Single-Rate Filters in Help Center and File Exchange

R2021b

### Community Treasure Hunt

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

Start Hunting!

Translated by