Create a recording using the audiorecorder object and then get the audio signal as a numeric array of different data types.
Create an audiorecorder object and record a five second audio clip from your microphone.
recObj = audiorecorder;
disp('Start speaking.')
Start speaking.
recordblocking(recObj,5);
disp('End of Recording.');
End of Recording.
Get the audio signal as a double array and plot the data.
doubleArray = getaudiodata(recObj);
plot(doubleArray);
title('Audio Signal (double)');
Get the audio signal as an int8 array and plot the data. Based on the data type specified, the same audio signal is returned with a different range of values . In this case, the values in the int8 array can span between -128 and 127.
int8Array = getaudiodata(recObj,'int8');
plot(int8Array);
title('Audio Signal (int8)');
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.
Website auswählen
Wählen Sie eine Website aus, um übersetzte Inhalte (sofern verfügbar) sowie lokale Veranstaltungen und Angebote anzuzeigen. Auf der Grundlage Ihres Standorts empfehlen wir Ihnen die folgende Auswahl: .
Sie können auch eine Website aus der folgenden Liste auswählen:
So erhalten Sie die bestmögliche Leistung auf der Website
Wählen Sie für die bestmögliche Website-Leistung die Website für China (auf Chinesisch oder Englisch). Andere landesspezifische Websites von MathWorks sind für Besuche von Ihrem Standort aus nicht optimiert.