how to quantize the audio file?

10 ビュー (過去 30 日間)
YULIM KANG
YULIM KANG 2020 年 10 月 30 日
編集済み: Walter Roberson 2020 年 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.

回答 (1 件)

Walter Roberson
Walter Roberson 2020 年 10 月 30 日
編集済み: Walter Roberson 2020 年 10 月 30 日
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()

カテゴリ

Help Center および File ExchangeSimulation, Tuning, and Visualization についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by