Audio Write

The samples from an array can be converted and saved as an audio file using the built-in function: audiowrite.

The basic syntax for using the function is the following:

audiowrite(filename,y,Fs) 

Input Variables:

filename – a string containing the name of the file. Example: ‘testSignal.wav’ 

y – an array containing the samples of the audio signal.

Fs – a scalar of the sound file’s sampling rate.

Continue on to see how we can get info about an audio signal with the audioinfo function.

Further documentation for the function is available here.

Links to other related functions: audioread, soundaudioinfo