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

1 次查看(过去 30 天)
How to record and save myself audio and load it as myvioce.mat file with sample frequncy 5000
  1 个评论
Mathieu NOE
Mathieu NOE 2022-12-19
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

请先登录,再进行评论。

回答(1 个)

Jan
Jan 2022-12-19
编辑:Jan 2022-12-19
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')

产品


版本

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by