MATLAB Audio Functions

Download sample files.

Microsoft Windows has a Sound Recorder utililty. Using Sound Recorder, you can record, mix, play, and edit sounds. You can also link or insert sounds into another document. Windows Media Player can play a variety of digital media files.

See sound cards for basic information about recording audio in a Windows environment.

MATLAB has a variety of methods to create, manipulate, and play audio signals.

General Functions

soundConvert vector into sound
soundscScale data and play as sound

Microsoft WAVE Sound Functions

wavfinfoInformation about Microsoft WAVE (.wav) sound file
wavplayPlay recorded sound on PC-based audio output device
wavreadRead Microsoft WAVE (.wav) sound file
wavrecordRecord sound using PC-based audio input device
wavwriteWrite Microsoft WAVE (.wav) sound file

See example of these functions.


The following software objects are available:

audioplayer   Create audio player object
audiorecorder   Create audio recorder object

Data Acquisition Toolbox

MATLAB supports all Windows-compatible sound devices. Additional sound acquisition and generation capability is available in the Data Acquisition Toolbox. The toolbox functionality includes the ability to buffer the acquisition so that you can analyze the data as it is being acquired. See the examples sound acquisition and sound generation.

Maintained by John Loomis, last updated 19 January 2009