Need help with MATLAB code 2. In one of the earlier labs, you would have recorde
ID: 1766224 • Letter: N
Question
Need help with MATLAB code
2. In one of the earlier labs, you would have recorded a few seconds of your voice. Load your recorded data and information in MATLAB using "getaudiodata" command; and then play 07 your voice using "sound (x,Fs)". Adjust the volume of your speaker and listen. You should hear your singing clearly. Note: Fs is the sampling rate. Nbits is the number of bits per data. is the digital signal that you will process. Type "help getaudiodata" to see the instruction for the function.Explanation / Answer
clc
clear all
close all
myVoice=audiorecorder(8000,8,1); % Audiorecorder is activated
% Now start Recording your voice
disp('Start Speaking')
recordblocking(myVoice,2)%It stops recording after 10seconds
disp('Stop Speaking. Audio got recorded')
%--------------------------------------------------------------------------%
dataPlay=getaudiodata(myVoice); % stores recorded audio in dataPlay array
disp('Playing your voice')
sound(dataPlay,8000) % Plays your voice
Record data with sampling rate and number of bits. Then play the voice.