Question

In: Electrical Engineering

Design a Matlab program that records your voice for 5 seconds and then cuts off the...

Design a Matlab program that records your voice for 5 seconds and then cuts off the low frequencies. Then, have the program play the edited recording.   

Solutions

Expert Solution

clc
clear all
close all
T=input('Enter the time to speak: ');
[y,Fs]=RecordYourVoice(T);
t=0:1/Fs:(length(y)-1)/Fs; %time period
plot(t,y)
title('Time Domain Voice signal')
xlabel('Time (t) ')
ylabel('Amplitude')
[H,W]=freqz(y,1,2048,Fs); %Frequency spectrum
figure;
subplot(211)
plot(W/pi,abs(H/max(H)))
title('Frequency Spectrum')
xlabel('Frequency (Hz)')
ylabel('Ampltide')

Hd2=fdesign.highpass('N,Fc',15,500,8000); %Doesnot allow frequency below 500Hz
H2=design(Hd2);
z2=filter(H2,y);


[H1,W1]=freqz(z2,1,1024,Fs); %Frequency spectrum
subplot(2,1,2)
plot(W1/pi,abs(H1/max(H1)))
title('Frequency Spectrum of High Pass filtered signal')
xlabel('Frequency (Hz)')
ylabel('Ampltide')

soundsc(z2,Fs)

High pass filter cut off frequnecy is taken 500Hz, Order is 15.

Please leave feedback


Related Solutions

Design a Matlab program for the Brayton Cycle. The program would be for a standard air...
Design a Matlab program for the Brayton Cycle. The program would be for a standard air cycle. The program should show specific work and thermodynamic efficiency from r=1 to 50, t=1 to 5 , where r is the pressure ratio and t is the temperature ratio,
Write a matlab code to do following steps; i) Record your voice by sampling frequency 22...
Write a matlab code to do following steps; i) Record your voice by sampling frequency 22 kHz ii) Down sample the voice by 2 listen to your voice iii) Down sample the voice by 3 listen to your voice Please explain the code clearly. Thank you.
Design a comb filter in MATLAB that meets the following specifications: it eliminates 5 harmonics of...
Design a comb filter in MATLAB that meets the following specifications: it eliminates 5 harmonics of 100Hz it eliminates dc (zero frequency) |h(t)| <= 0.001 for t> 0.5
USING MatLab (Arrays) Set ASIZE to 5. Write a program that creates an array of ASIZE...
USING MatLab (Arrays) Set ASIZE to 5. Write a program that creates an array of ASIZE numeric elements. Prompt the User for ASIZE numbers and store them in the array. After storing the values, calculate the sum of all the values in the array and display the sum. Modify the program you wrote for Problem 5 such that it calculates the product of all the values instead of the sum. Modify the program you wrote in Problem 6 such that...
Design a program using Raptor Flowcharts that tests your ESP, or extrasensory perception. The program will...
Design a program using Raptor Flowcharts that tests your ESP, or extrasensory perception. The program will randomly pick a color from Red, Green, Blue, Orange, Yellow, and Purple, and you will be asked to predict the program's selection before it is revealed. The program should ask the user to enter the color the computer has selected. The program should ensure user enters only one of the six colors. After user has entered his or her guess, the program should display...
** NEED MATLAB** design a cam with harmonic and cycloidal rise and 3-4-5 polynomial fall specifications:...
** NEED MATLAB** design a cam with harmonic and cycloidal rise and 3-4-5 polynomial fall specifications: *Cycloidal rise (0◦ < θ < 80◦) from 0 mm to 20 mm *Dwell (80◦ < θ < 100◦) *Harmonic rise (100◦ < θ < 180◦) from 20 mm to 30 mm *Dwell (180◦ < θ < 210◦) *3-4-5 Polynomial fall (210◦ < θ < 300◦) from 30 mm to 0 mm *Dwell (300◦ < θ < 360◦) •the radius of the base circle...
Write an Matlab Program for Wankel Engine Gemontry. State your and assumptions and post the code
Write an Matlab Program for Wankel Engine Gemontry. State your and assumptions and post the code
Use MATLAB to create a program that answers the given problems: One of your friends has...
Use MATLAB to create a program that answers the given problems: One of your friends has an awful writing style: he almost never starts a message with a capital letter, but adds uppercase letters in random places throughout the message. It makes chatting with him very difficult for you, so you decided to write a plugin that will change each message received from your friend into a more readable form. Implement a function that will change the very first symbol...
Program Design As you design your training program, you must consider three stages: pre-training, learning event,...
Program Design As you design your training program, you must consider three stages: pre-training, learning event, and post-training. Select one stage and discuss the critical elements of that stage. What can you do as a designer to assure learning in that stage and promote transfer of learning to the workplace?
design a Quality Control Program for your retirement finance management   
design a Quality Control Program for your retirement finance management   
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT