How to record and save myself audio and load it as myvioce.mat file with sample frequncy 5000

1 view (last 30 days)
How to record and save myself audio and load it as myvioce.mat file with sample frequncy 5000
  1 Comment
Mathieu NOE
Mathieu NOE on 19 Dec 2022
hello
you can use any audio file editor (I have GoldWave) and use your Pc microphone to record anything you want
once you have stored your wav file you can open it with audioread and then process it with matlab
use save to save the result in a mat file

Sign in to comment.

Answers (1)

Jan
Jan on 19 Dec 2022
Edited: Jan on 19 Dec 2022
Fs = 5000;
nBits = 16;
nChannels = 1;
recorder = audiorecorder(Fs, nBits, nChannels);
beep
recordblocking(recorder, 2); % Record for 2 seconds betwee the beeps
beep
signal = getaudiodata(recorder);
save('myvoice.mat', 'signal')

Products


Release

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!