Time shifting(adding silence in beginning) in audio signals
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I am new to matlab and i want to know how to shift audio files in matlab. For example if a audio file is of 30 second how should i add a silent audio in the beginning. I want the user to add a number and add that much silence to the audio in the beginning. for example if user enters 8 the resulting audio will be of 38 seconds with first 8 seconds as silence
0 Kommentare
Antworten (1)
Cris LaPierre
am 8 Jan. 2021
After importing your audio signal, you could pad the beginning of the signal with zeros. Use the sample frequency to determine how many you need to add to give the desired amount of silence.
3 Kommentare
Ivana Tanasic
am 21 Jan. 2022
To clarify, I have one signal that is of the size 78001 x 2 and another of 228000 x 2 and I want to make them the same length by padding the first with 0s before it starts (I have only been able to add zeros to the end of it sofar)
Cris LaPierre
am 21 Jan. 2022
There is no one way to do it.
You could use concatenation
A = rand(3,2);
B = [zeros(4,2); A]
C = padarray(A,4,0,'pre')
Siehe auch
Kategorien
Mehr zu Audio Processing Algorithm Design finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!