How to divide an wav file into segments

  • Thread starter Thread starter AK2
  • Start date Start date
  • Tags Tags
    File
AI Thread Summary
MATLAB imports audio files with mono sound as an m x 1 array and stereo sound as an m x 2 array, where m represents the total number of samples. Users can segment these audio files into shorter clips by manipulating the array dimensions. After segmenting, the shorter audio clips can be saved using the wavwrite function, which allows for easy re-exporting of the modified audio data. For detailed guidance, refer to the MATLAB documentation on importing and exporting audio files.
AK2
Messages
39
Reaction score
0
Does anybody know how to do this in matlab?
 
Physics news on Phys.org
According to the MATLAB documentation, MATLAB imports mono sound as an m x 1 and stereo as m x 2, where m is the total number of samples in the file:
http://www.mathworks.com/help/techdoc/import_export/f5-132080.html#bsdufi0

Based on that information, you should be able to chop these up into shorter segments, and then re-save the resultant shorter segments using wavwrite:
http://www.mathworks.com/help/techdoc/ref/wavwrite.html
 
Last edited by a moderator:

Similar threads

Replies
1
Views
2K
Replies
4
Views
1K
Replies
5
Views
2K
Replies
3
Views
2K
Back
Top