Real Time Voice Activity Detection by Spectral Energy by MATLAB

Tutorial #4

Jarvus
Audio Processing by MATLAB
Apr 8, 2019

--

Download Source Code

  • (Free P code) Download for MATLAB
  • (M file based on spectrum) Donate 30 USD
  • (Python based on log energy) Donate 30 USD

Description

  1. Plot signal wave in time or frequency domain
  2. Choose x-axis as time or samples
  3. Remove spectral energy under a value when show the spectrogram

Function

sys = vadRealTime_YW(fs, screen, th)
  • Required Input Parameters
fs          Sampling frequency (Hz). Default is 16k.
screen Screen width to show signal (sec). Default is 2 sec.
th Threshold energy for removal. Default is 100.

Example

Start the system by sample rate 16k and show 2 seconds signal.

sys = realTime_YW(16000, 2, 100);

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);

πŸ‘‰ Tutorial Outline πŸ‘ˆ

--

--

Jarvus
Audio Processing by MATLAB

A diverse software developer, focus on Audio Processing, Deep learning and Blockchain.