Question

Hearing Aid Program on MATLAB Using MATLAB, take in a sound file using a level detector,...

Hearing Aid Program on MATLAB

Using MATLAB, take in a sound file using a level detector, and applying bandpass channels with compression to the sound.

Can someone help me with this problem, no special format is required when writing to code.

Homework Answers

Answer #1

Answer:

clc
clear
close all
%%
[A,fs]=audioread('1 (1).wav');
%% Sender
C=[];
A=A';
for i=512:512:numel(A)
B=dct(A(i-511:i));
C=[C, B(1:128)];
end
%% Reciever
A2=[];
for i=128:128:numel(C)
S=[C(i-127:i),zeros(1,384)];
S=idct(S);
A2=[A2,S];
end
%% Evaluation
dis=numel(A)-numel(A2);
A2=[A2,zeros(1,dis)];
PSNR=psnr(A2,A)
MSError=mse(A2,A)
SNR=snr(A2,A)
%% plot
figure,
plot(A);
hold on
plot(A2,'r')
plot((A2-A),'y')
legend('Original' , 'Recieved','Difference')
title('Audio Compression By DCT');
xlabel('Samples');
ylabel('Amp.');
grid();

Please give me thumbs up,if you like the answer .
Please let me know if you don't understand any step before giving Down rating directly :). Happy to help

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
For this homework, you will be filtering noise from a sound recording. The assignment is broken...
For this homework, you will be filtering noise from a sound recording. The assignment is broken into simple steps you can follow. Please follow instructions carefully and remember that you will only upload one workspace (*.mat) file. Make sure to name the clean_speech variable correctly. 1) Download the Matlab workspace from the link provided in Canvas. Move the downloaded file to the same folder as your script to make things simpler. 2) Load the downloaded workspace into Matlab. You can...
In MPLAB XIDE create a program using assembly to produce three different LED combinations using 4...
In MPLAB XIDE create a program using assembly to produce three different LED combinations using 4 LED lights and 4 switches that correspond to each LED. There will be 4 inputs and 4 outputs. The program includes three levels (the three LED combinations). Each level will be a random combination (i.e. red, blue, green, orange). The player will then repeat the combinations as accurately as possible. If the player repeats the led sequence correctly, the code will branch to the...
MATLAB FIR filter design. The audio file, covering the frequency range of roughly 0 to 3000...
MATLAB FIR filter design. The audio file, covering the frequency range of roughly 0 to 3000 Hz, is very badly corrupted with high?level noise. Your problem is to design a digital filter that will sufficiently attenuate the noise so that the audio speech is intelligible. (sorry but chegg doesn't allow me to attach the wav file) Here is the design template: clear, clc % clear all variables %% Read in the noisy audio signal from the file 'CapnJ.wav' using audioread...
You will write a program that loops until the user selects 0 to exit. In the...
You will write a program that loops until the user selects 0 to exit. In the loop the user interactively selects a menu choice to compress or decompress a file. There are three menu options: Option 0: allows the user to exit the program. Option 1: allows the user to compress the specified input file and store the result in an output file. Option 2: allows the user to decompress the specified input file and store the result in an...
Using python 3.5 or later, write the following program. A kidnapper kidnaps Baron Barton and writes...
Using python 3.5 or later, write the following program. A kidnapper kidnaps Baron Barton and writes a ransom note. It is not wrriten by hand to avoid having his hand writing being recognized, so the kid napper uses a magazine to create a ransom note. We need to find out, given the ransom note string and magazine string, is it possible to given ransom note. The kidnapper can use individual characters of words. Here is how your program should work...
Write a Python 3 program called “parse.py” using the template for a Python program that we...
Write a Python 3 program called “parse.py” using the template for a Python program that we covered in this module. Note: Use this mod7.txt input file. Name your output file “output.txt”. Build your program using a main function and at least one other function. Give your input and output file names as command line arguments. Your program will read the input file, and will output the following information to the output file as well as printing it to the screen:...
I've posted this question like 3 times now and I can't seem to find someone that...
I've posted this question like 3 times now and I can't seem to find someone that is able to answer it. Please can someone help me code this? Thank you!! Programming Project #4 – Programmer Jones and the Temple of Gloom Part 1 The stack data structure plays a pivotal role in the design of computer games. Any algorithm that requires the user to retrace their steps is a perfect candidate for using a stack. In this simple game you...
QUESTION: Why do governments typically take an unsupportive stance on countertrade arrangements? Article Below: The Bell...
QUESTION: Why do governments typically take an unsupportive stance on countertrade arrangements? Article Below: The Bell Boeing V-22 Program, a strategic alliance between Bell Helicopter, a Textron Company, and the Boeing Company,1,2 announced the V-22 Osprey tiltrotor will be featured at the Dubai International Air Show in the United Arab Emirates (UAE) from November 13 to 17, 2011. The Air Show, held biennially, is organized in cooperation with the government of Dubai, the Department of Civil Aviation, and Dubai International...
Case 13 ✍ It Was Really So Simple Background Information Brenda Galway leaned back in her...
Case 13 ✍ It Was Really So Simple Background Information Brenda Galway leaned back in her chair, sighed heavily, and slowly rubbed her eyes in big circular motions. “I don’t need all this aggravation,” she thought to herself. She had just finished reviewing the report she had requested from her new employee, Bill Stanley. The entire report was incorrect and would have to be redone. Brenda supervised Unit B of the Audit Department. The Unit B team had earned the...
New Wave Music New Wave Music is an international company that develops music software that is...
New Wave Music New Wave Music is an international company that develops music software that is used to compose music, play recordings in clubs, and produce albums. Founder and CEO Moritz Halbach is the company’s biggest fan. He said “I started this company from nothing, just me, my ideas, and my computer. I love music---love playing music, love writing programs for making music, love listening to music---and the money is nice, too.” Moritz says that he never wanted to work...