Concatenate two audio files
36 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
SBakc
el 17 de Ag. de 2019
Comentada: Walter Roberson
el 19 de Ag. de 2019
I would like to concatenate two audio files such that a new audio signal is created whereby the first audio plays and this is then immedialely followed by the second.
[y1,Fs] = audioread('sample1.wav');
y1_sample_rate = 8000;
[y2,Fs] = audioread('sample2.wav');
y3 = [y1(1:y1_sample_rate,:); y2;];
What am I doing wrong?
Thank you.
1 comentario
Walter Roberson
el 19 de Ag. de 2019
We as outside observers have no reason to expect that the two audios will be at the same rate. You should be using resample() to bring them to a common rate.
We as outside observers also have no reason to expect that the two audios will have the same number of channels.
Respuesta aceptada
Más respuestas (0)
Ver también
Categorías
Más información sobre Audio I/O and Waveform Generation en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!