Is Discrete Wavelet Transform error or Audio Write error for data clipping?
조회 수: 18 (최근 30일)
이전 댓글 표시
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
2019년 2월 19일
what shows up for
max(reconstruct)-1
I suspect some values become 1 within roundoff error but slightly greater than 1
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Audio Processing Algorithm Design에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!