how to quantize the audio file?
조회 수: 10 (최근 30일)
이전 댓글 표시
[y,fs]=audioread('handel.wav');
ft = y(:,1);
sigLength = length(ft); %length
t=(0:sigLength-1)/fs;
figure;
plot(t(1:200), ft(1:200)),grid;
xlabel('Time(s)');
ylabel('Amplitude');
then use a uniform quantizer to quantize the first 200 sampling points by 4 bits (L=16 levels).
Plot the Input wave and quantized output.
댓글 수: 0
답변 (1개)
Walter Roberson
2020년 10월 30일
편집: Walter Roberson
2020년 10월 30일
https://www.mathworks.com/help/comm/ref/quantiz.html -- signal processing toolbox
https://www.mathworks.com/help/matlab/ref/double.discretize.html -- general numeric
If you use discretize then you get out bin numbers, which you can use to index the edge vector that you passed in, in order to get out the value of the "beginning" of the edge.
Another hint I would give is to use the 'native' option for audioread()
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Simulation, Tuning, and Visualization에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!