Name of file to read, specified as a character vector or string scalar
that includes the file extension.
Depending on the location of your file, filename
can
take on one of these forms.
Current folder | Specify the name of the file in
filename . Example:
'sample_audio.wav' |
Other folders | If the file is not in the current folder or in
a folder on the MATLAB® path, then specify the full or
relative path name in
filename . Example:
'C:\myFolder\myFile.sample_audio.wav' Example:
'myFolder\sample_audio.mp3' |
Remote Location | If the file is stored at a remote location,
then filename must contain the
full path of the file specified as a uniform
resource locator (URL) of the
form: scheme_name ://path_to_file /my_file.ext
Based on your
remote location,
scheme_name can be one
of the values in this table.
Remote Location | scheme_name |
---|
Amazon S3™ | s3 | Windows Azure® Blob Storage | wasb ,
wasbs | HDFS™ | hdfs |
For more information, see Work with Remote Data. Example:
's3://bucketname/path_to_file/sample_audio.mp3' |
Example: 'myFile.mp3'
Example: '../myFile.mp3'
Example: 'C:\temp\myFile.mp3'
audioread
supports the following file formats.
Platform Support | File Format |
---|
All platforms | WAVE (.wav ) |
OGG (.ogg ) |
FLAC (.flac ) |
AU (.au ) |
AIFF (.aiff , .aif ) |
AIFC (.aifc ) |
Windows® 7 (or later), Macintosh, and Linux® | MP3 (.mp3 ) |
MPEG-4 AAC (.m4a , .mp4 ) |
On Windows platforms prior to
Windows 7,
audioread
does not read WAVE files with MP3 encoded
data.
On Windows 7 (or later) platforms, audioread
might
also read any files supported by Windows Media® Foundation.
On Linux platforms, audioread
might also read any
files supported by GStreamer.
audioread
can extract audio from MPEG-4
(.mp4
, .m4v
) video files on
Windows 7 or later, Macintosh, and Linux, and from Windows Media Video (.wmv
) and AVI
(.avi
) files on Windows 7 (or later) and Linux platforms.
Data Types: char
| string