Given the echo.mat( https://drive.google.com/open?id=0B5l9S8ID7TjTRHUyV1ZlTWFzQj
ID: 2085206 • Letter: G
Question
Given the echo.mat( https://drive.google.com/open?id=0B5l9S8ID7TjTRHUyV1ZlTWFzQjg ) file, do the following:
Plot the speech waveform, as a function of time (not sample value). Convert the sample values to their time values using the sampling frequency. Make sure you label all plots. (You may use the plot function for this, and not the stem function, since you are converting the x-axis to be time instead of sample values). Submit the resulting plot only for this problem!
A. Amplify speech signal by a factor of 5.
B. Attenuate speech signal 50%.
C. Shrink (compress) the speech signal by a factor of 2.
D. Expand original speech signal by a factor of 3.
Submit the manipulated code for each challenge in problem number 2 above.
In this part, you need to create an echo effect which is known as digital delay. You must create a function that can accept four arguments.
Input signal
Time delay (in seconds)
Attenuation factor of the echo
Sampling frequency of the input signal.
You must submit the function used to generate the effect and the code used to call the function and also the electric form to verify its’ operation in Matlab.
Explanation / Answer
d = load('Echo.mat');
sgnl = d.Audio_sgnl;
Fs = 44.1E+3; % Sampling Frequency
nBits = 16;
Audio_sgnl = audioplayer(sgnl, Fs, nBits); % Create ‘audioplayer’ Object
audiowrite('Echo_new.wav', sgnl, Fs, 'BitsPerSample',nBits, 'Comment','Australian pied butcherbird song - sgnl');
play(Audio_sgnl) % to play the file
S = load('Echo.mat');
plot(S.times,S.counts); % to Plot the file
Audio_sgnl1 = Audio_sgnl.*5;
Audio_sgnl2 = Audio_sgnl.*5;
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.