Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The audio signal is a vector in R 1 0 0 0 . You will convert it into the coordinate system given by the DCT

The audio signal is a vector in R1000. You will convert it into the coordinate system given by the DCT basis. In
this coordinate system, each basis element corresponds to a cosine function of a different frequency. Thus, the
coordinate vector with respect to the DCT basis tells you how the signal can be written as a linear combination
of cosine waves of different frequencies. To eliminate noise, you replace all entries with absolute value smaller
than 1 in the coordinate vector by 0. Essentially, you suppress certain frequencies by setting them to 0(a
process from signal processing called filtering). Finally, you transfer the new coordinate vector back into the
coordinate system given by the standard basis.
The audio recording is given to you as a 1D-numpy array stored in audio_signal.
Compute the coordinate vector audio_signal with respect to the DCT-basis of R1000. Store the coordinate
vector as a 1D-numpy array in coordinates.
Create a new vector obtained from coordinates by replacing all entries with absolute value smaller than 1 by
0. Store this new vector as a 1D-numpy array in coordinates_filtered.
Compute the vector in R1000 whose coordinate vector in the DCT basis is coordinates_filtered. Store this
vector as a 1D-numpy array in denoised.
The setup code provides the helper function create_dct_basis(n) that creates an nn matrix whose columns
make up the n-dimensional DCT basis.
The setup code gives the following variable:
Your code snippet should define the following variable:
user_code.py
import numpy as np
import matplotif.pyplot as plt
# Write your code to calculate denoised audio signal
coordinates =dots.
coordinates_filtered =dots.
denoised =...
# Uncorment below to plot
Hfig, ax= plt.subplots()
lip1t.plot(audio_signa1)
ilplt.plot(denoised)
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 2 Lncs 13427

Authors: Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

3031124251, 978-3031124259

More Books

Students also viewed these Databases questions

Question

7. Identify six intercultural communication dialectics.

Answered: 1 week ago