How to divide an wav file into segments

  • Thread starter Thread starter AK2
  • Start date Start date
  • Tags Tags
    File
Click For Summary
SUMMARY

This discussion focuses on dividing a WAV file into segments using MATLAB. According to the MATLAB documentation, mono sound is imported as an m x 1 array and stereo as m x 2, where m represents the total number of samples. Users can segment the audio by manipulating these arrays and then re-saving the segments with the wavwrite function. This method provides a straightforward approach to audio segmentation in MATLAB.

PREREQUISITES
  • Understanding of MATLAB programming environment
  • Familiarity with audio file formats, specifically WAV
  • Knowledge of array manipulation in MATLAB
  • Experience with MATLAB's audio processing functions
NEXT STEPS
  • Research how to use MATLAB's wavread function for importing audio files
  • Explore MATLAB's wavwrite function for exporting audio segments
  • Learn about MATLAB's array slicing techniques for segmenting audio
  • Investigate audio processing techniques for enhancing segmented audio quality
USEFUL FOR

Audio engineers, MATLAB users, and anyone interested in audio processing and segmentation techniques.

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 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
2
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 5 ·
Replies
5
Views
3K