Merging two wav files different lengths

How can I make the length number of two wav files the same, so the wav files can be merged?
[y1,fs1] = audioread('happy.wav');
[y2,fs2] = audioread('sad.wav');
S1=length(y1);
S2=length(y2);

回答 (1 件)

Adam
Adam 2016 年 12 月 14 日
編集済み: Adam 2016 年 12 月 14 日

0 投票

doc interp1
if you need them the same length, but still covering the same time span. If you gave Signal Processing Toolbox then
doc resample
probably works fine too.

カテゴリ

質問済み:

2016 年 12 月 14 日

編集済み:

2016 年 12 月 14 日

Community Treasure Hunt

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

Start Hunting!

Translated by