Read an audio file using the dsp.AudioFileReader object. Obtain information related to the audio content of the file.
The dsp.AudioFileReader objects reads the default shipped file 'speech_dft.mp3'.
afr = dsp.AudioFileReader
afr =
dsp.AudioFileReader with properties:
Filename: '/mathworks/devel/bat/filer/batfs2566-0/Bdoc25b.2988451/build/runnable/matlab/toolbox/dsp/dsp/samples/speech_dft.mp3'
PlayCount: 1
ReadRange: [1 Inf]
SamplesPerFrame: 1024
OutputDataType: 'double'
Show all properties
The output structure displays the sample rate of the audio signal in Hz, number of bits used to encode the audio stream, and the number of audio channels.
S = info(afr)
S = struct with fields:
SampleRate: 22050
NumBits: 16
TotalSamples: 110033
Duration: 4.9902
NumChannels: 1
Information about the audio file specified in the Filename
property, returned as a structure. The number of fields in the structure
S varies depending on the audio content of the file. This table
shows some of the fields that can appear in the structure
S.
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window.
Web browsers do not support MATLAB commands.
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.