MATLAB Answers

De-quantization Audio Signal

6 views (last 30 days)
Ibnu Darajat
Ibnu Darajat on 8 Jul 2019
Answered: Pavel Zaviska on 15 Apr 2021
This my audio record code and quantization code :
%record code
Fs = 1000;
nBits = 8;
nChannels = 1;
t = 3;
recObj = audiorecorder(Fs,nBits,nChannels);
set(handles.edit4,'String','Start Record');
recordblocking(recObj,t);
set(handles.edit4,'String','Finish');
myRecording = getaudiodata(recObj);
axes(handles.axes1)
plot(myRecording);
grid on;
title('Record Signal')
set(gca, 'YLim', [-2 2])
legend('Audio Signal');
handles.Fs = Fs;
handles.myRecording = myRecording;
guidata(hObject,handles);
soundsc(myRecording, Fs);
%quantization code
normal_sound = (myRecording - min(myRecording))./(max(myRecording)-min(myRecording));
level = 255;
range = 1/level;
quantized_sound = floor(normal_sound ./ range);
My question is how to do de-quantization based on my quantization code? Thanks before

Answers (1)

Pavel Zaviska
Pavel Zaviska on 15 Apr 2021
Hi, several algorithms for Audio dequantization based on signal sparsity have been proposed in the paper "Audio Dequantization Using (Co)Sparse (Non)Convex Methods". The MATLAB source codes are freely available on Github: https://github.com/zawi01/audio_dequantization
Even though the quantization scheme used in the paper is slightly different (standard Mid-riser quantizer), the codes can be easily edited (especially the projection functions) to work for arbitrary quantization scheme, assuming that quantization levels are known.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!