Clear Filters
Clear Filters

how to see live plot of my voice ?

5 views (last 30 days)
hello I want to see live plot of my voice but i cant figure how to do it , I wachted real time audio topics but still cant figure how to do it .
this is my code :
clear all;
close all;
recorder = audiorecorder( 96000 ,24,1)
disp('Start speaking.')
recordblocking(recorder, 3);
disp('End of Recording.');
myRecording = getaudiodata(recorder);
title('regular plot')
title('FFT plot')
but this code is not 'real time ' meaning that in this code i record my voice and then can only see the plot of my voice .

Accepted Answer

Jason Whitfield
Jason Whitfield on 26 Jul 2018
As the name suggests, the recordblocking method will block the execution of the rest of the script until the recording finishes. If you don't want it to block, you can use the record method instead. Here is an example script that will plot 10 seconds of audio data in real time.
recorder = audiorecorder(96000, 24, 1);
disp('Start speaking.')
while recorder.isrecording()
disp('End of Recording.');
  1 Comment
tomer polsky
tomer polsky on 27 Jul 2018
oh thank you very much my friend, now it seems logical to me .

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!