Cut and plot Audio Signal (.wav) in specific time

23 ビュー (過去 30 日間)
Apridho Rozaqy
Apridho Rozaqy 2019 年 5 月 21 日
編集済み: Geoff Hayes 2019 年 5 月 21 日
Hello guys, i am e newbie for using a MATLAB 2018 , So, i confused and going crazy, can somebody help me with coding for 'Sampling' or cut signal Audio (.wav) in specific period (t), and it show in plot.. please ?

回答 (1 件)

Geoff Hayes
Geoff Hayes 2019 年 5 月 21 日
編集済み: Geoff Hayes 2019 年 5 月 21 日
Apridho - you may want to use audioread to read the data from the wav file
[y,Fs] = audioread('myAudioData.wav');
Fs will be the sampling frequency (number of samples per second) and y the sampled data. If you are interested in the audio data in the interval [10,15] seconds, then you could extract that data as
cutData = y((Fs * (10 - 1)) + 1 : Fs * (15 - 1), :);
and plot it as
plot(linspace(10, 15, length(cutData)), cutData);
The above might do what you want...or at least give you an idea of what can be done.

カテゴリ

Help Center および File ExchangeAudio Processing Algorithm Design についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by