Cut a .wav audiofile to 30 sec by different data lenght

1 回表示 (過去 30 日間)
Nik Rocky
Nik Rocky 2020 年 6 月 4 日
コメント済み: Nik Rocky 2020 年 6 月 4 日
Hello,
I found lot of answers, how to cut last 10 sec, oder first 2 sec.
But I do a opposite - I have multiple of .wav-Files 35,36,31,...sec long
I want just to "reshape" a files and have first 30sec.
How it is possible?
I tryed:
[y,fs] = audioread(filename);
filename = '20200605_004200.wav';
y(:,30*fs:end) = [];
wavFileName = '20200605_004200.wav';
audiowrite(wavFileName, y,fs);
But it does not working =)
Thank you in advise!
  1 件のコメント
Nik Rocky
Nik Rocky 2020 年 6 月 4 日
Or better to cut from t1 to t2

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeAudio and Video Data についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by