Is Discrete Wavelet Transform error or Audio Write error for data clipping?

조회 수: 18 (최근 30일)
SuLatt Sandi
SuLatt Sandi 2019년 2월 19일
댓글: SuLatt Sandi 2019년 2월 20일
I'm studying the scrambling method using DWT domain. Now, I'm facing 'data clip' problem when writing the audio. I tested 2 ways to know what the error is.
Firstly, read the audio, decompose the audio using DWT and reconstruct the audio without doing anything and then write the audio. At that time, I found data clip error in some songs. Maximum double value of the audio is '+1'. So, I thought this is because of that "+1", I learned that the valid range of the data have to be -1.0 ≤ y ≤ +1.0 in audio write. But, the sample value of the original audio and saved audio after reconstruction is same, so I assmued there's no data loss.
Secondly, read the same audio then write that audio without doing anything. At that time, no data clip error is occur. I check the maximum double value of that audio is '+1' but audio write function can work successfully without data clipping. Also, the sample value of the original audio and saved audio is same.
So, I have no idea that data clip error is because of DWT or Audio Write. Please kindly give me an answer for this matter, thanks.
audio1=audioread('S1.wav');
>> [c,l]=wavedec(audio1,4,'db1');
>> reconstruct=waverec(c,l,'db1');
>> max(audio1)
ans =
1.0000
>> max(reconstruct)
ans =
1.0000
>> audiowrite('reconstruct.wav',reconstruct,44100);
Warning: Data clipped when writing file.
> In audiowrite>clipInputData (line 396)
In audiowrite (line 176)
>> audio2=audioread('S1.wav');
>> max(audio2)
ans =
1.0000
>> audiowrite('audio.wav',audio2,44100);
  댓글 수: 2
Walter Roberson
Walter Roberson 2019년 2월 19일
what shows up for
max(reconstruct)-1
I suspect some values become 1 within roundoff error but slightly greater than 1
SuLatt Sandi
SuLatt Sandi 2019년 2월 20일
Yes Sir, my research is to control audio quality using scrambling method in DWT Domain. The problem is if I made scrambling the audio without using audio write and then make descrambling that audio, at that time descrambling process is successful and I got original quality of the audio. But, if I write audio after scrambling and then make descrambling that saved audio, at that time I can't get original quality and still get scrambling quality. That's why I confuse, is it the error of DWT or audio write.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Audio Processing Algorithm Design에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by