Real time plot audio wave by speaking to the microphone by MATLAB
Tutorial #2
Published in
Mar 31, 2019
Download Source Code (Time domain)
Download Source Code (Spectrogram)
- Real time show spectrogram through microphone
- (M file) Donate 20 USD
Description
- Use our microphone to record speech
- Real time plot the signal in the figure
Function
sys = realTime_YW(fs, screen)
- Required Input Parameters
fs Sampling frequency (Hz). Default is 16k.
screen Screen width to show signal (sec). Default is 5 sec.
Example
Start the system by sample rate 16k and show 5 seconds signal.
sys = realTime_YW(16000,5);
Stop the system.
stop(sys.clock);
stop(sys.recorder);
Get the record speech, plot and play it.
s = getaudiodata(sys.recorder);
figure;
plot(s);
sound(s,16000);