Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

Write a speech encoder using the LPC algorithm. You must implement your own LPC code. You must not use any MATLAB toolboxes – use the ‘which’ command in MATLAB to check if a function is built-in or...

4 answer below »
Write a speech encoder using the LPC algorithm. You must implement your own LPC code. You must not use any MATLAB toolboxes – use the ‘which’ command in MATLAB to check if a function is built-in or contained in a toolbox. Use the following parameters: 1. A frame size of 200 samples; 2. 10th order prediction; 3. Single-pulse excitation at the start of the frame; 4. RMS energy normalization. Include a listing of the code and an explanation (in your own words) of each stage of the encoding. Comment on the audio quality of the reconstructed speech in terms of intelligibility and naturalness using a male speaker and a female speaker. Then encode the music data using the coder and comment on the result. Algorithm & Code 40 Discussion 40 Total 80 Question 2 — 20 Marks Vary the frame size over what you consider to be a “reasonable” range and comment on the audio quality of the reconstructed speech using male and female speakers. For each frame size and speaker, tabulate the bit rate in bits per second (bps) required using 8-bit scalar quantization for the RMS energy parameter and each of the ten LPC coefficients. Results 10 Discussion 10 Total 20 Question 3 — 20 Marks For the optimal frame size found above, vary the number of LPC parameters. Is 10 a reasonable choice? Results 10 Discussion 10 Total 20 Question 4 — 80 Marks Enhance the coder using pitch information, as follows. For each frame, calculate the pitch using autocorrelation. Then generate the excitation using impulses spaced at the pitch . . . / 5 Advanced Digital Communications Speech Compression Page 5 interval. Test using male and female speakers, and comment on any improvements you notice over single-pulse excitation. Note that you may need to buffer one or more previous frames in order to calculate the correlation, and that the placement of the pitch impulses in the current frame depends on the location of the last pitch pulse in the previous frame. Include a listing of the code and an explanation (in your own words) of each stage of the encoding. Comment on the perceived quality of the LPC coder with pitch excitation as compared to single-pulse excitation.
Answered Same Day Dec 24, 2021

Solution

David answered on Dec 24 2021
122 Votes
GEO100L
clear all
% close all
clc
for M=3:100,
% INITIALIZATION:
inpfilenm = 's1ofwb.wav';
[x, fs]=wavread(inpfilenm);%"t_16k_2s.wav" is the file I used. Change according
%to your case.
% length(x)
=3841; %index no. of starting data point of cu
ent frame
fsize = 30e-3; %frame size
frame_length = round(fs .* fsize); %=number of data points in each framesize
%of "x"
N= frame_length - 1; %N+1 = frame length = number of data points in
%each frame
sk=0; %initializing summartion term "sk"
a=[zeros(M+1);zeros(M+1)]; %defining a matrix of zeros for "a" for init.
%FRAME SEGMENTATION:
y1=x(b:b+N); %"b+N" denotes the end point of cu
ent frame.
%"y" denotes an a
ay of the data points of the cu
ent
%frame
y = filter([1 -.9378], 1, y1); %pre-emphasis filtering
%MAIN BODY OF THIS PROGRAM STARTS FROM HERE

z=xco
(y);
%finding a
ay of R[l]
R=z( ( (length(z)+1) ./2 ) : length(z)); %R=a
ay of "R[l]", where l=0,1,2,
%...(b+N)-1
%R(1)=R[lag=0], R(2)=R[lag=1], ...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here