Main Content

Speech Command Recognition Code Generation with Intel MKL-DNN

This example shows how to deploy feature extraction and a convolutional neural network (CNN) for speech command recognition on Intel® processors. To generate the feature extraction and network code, you use MATLAB Coder and the Intel Math Kernel Library for Deep Neural Networks (MKL-DNN). In this example, the generated code is a MATLAB executable (MEX) function, which is called by a MATLAB script that displays the predicted speech command along with the time domain signal and auditory spectrogram. For details about audio preprocessing and network training, see Speech Command Recognition Using Deep Learning (Audio Toolbox).

Prerequisites

  • The MATLAB Coder Interface for Deep Learning Support Package

  • Xeon processor with support for Intel Advanced Vector Extensions 2 (Intel AVX2)

  • Intel Math Kernel Library for Deep Neural Networks (MKL-DNN)

  • Environment variables for Intel MKL-DNN

For supported versions of libraries and for information about setting up environment variables, see Prerequisites for Deep Learning with MATLAB Coder (MATLAB Coder).

Streaming Demonstration in MATLAB

Use the same parameters for the feature extraction pipeline and classification as developed in Speech Command Recognition Using Deep Learning (Audio Toolbox).

Define the same sample rate the network was trained on (16 kHz). Define the classification rate and the number of audio samples input per frame. The feature input to the network is a Bark spectrogram that corresponds to 1 second of audio data. The Bark spectrogram is calculated for 25 ms windows with 10 ms hops.

fs = 16000; 
classificationRate = 20;
samplesPerCapture = fs/classificationRate;

segmentDuration = 1;
segmentSamples = round(segmentDuration*fs);

frameDuration = 0.025;
frameSamples = round(frameDuration*fs);

hopDuration = 0.010;
hopSamples = round(hopDuration*fs);

Create an audioFeatureExtractor (Audio Toolbox) object to extract 50-band Bark spectrograms without window normalization.

afe = audioFeatureExtractor( ...
    'SampleRate',fs, ...
    'FFTLength',512, ...
    'Window',hann(frameSamples,'periodic'), ...
    'OverlapLength',frameSamples - hopSamples, ...
    'barkSpectrum',true);

numBands = 50;
setExtractorParams(afe,'barkSpectrum','NumBands',numBands,'WindowNormalization',false);

Load the pretrained convolutional neural network and labels.

load('commandNet.mat')
labels = trainedNet.Layers(end).Classes;
numLabels = numel(labels);
backgroundIdx = find(labels == 'background'); 

Define buffers and decision thresholds to post process network predictions.

probBuffer = single(zeros([numLabels,classificationRate/2]));
YBuffer = single(numLabels * ones(1, classificationRate/2)); 

countThreshold = ceil(classificationRate*0.2);
probThreshold = single(0.7);

Create an audioDeviceReader (Audio Toolbox) object to read audio from your device. Create a dsp.AsyncBuffer (DSP System Toolbox) object to buffer the audio into chunks.

adr = audioDeviceReader('SampleRate',fs,'SamplesPerFrame',samplesPerCapture,'OutputDataType','single');
audioBuffer = dsp.AsyncBuffer(fs);

Create a dsp.MatrixViewer (DSP System Toolbox) object and a timescope (DSP System Toolbox) object to display the results.

matrixViewer = dsp.MatrixViewer("ColorBarLabel","Power per band (dB/Band)", ...
    "XLabel","Frames", ...
    "YLabel","Bark Bands", ...
    "Position",[400 100 600 250], ...
    "ColorLimits",[-4 2.6445], ...
    "AxisOrigin",'Lower left corner', ...
    "Name","Speech Command Recognition Using Deep Learning");

timeScope = timescope('SampleRate', fs, ...
    'YLimits',[-1 1], 'Position', [400 380 600 250], ...
    'Name','Speech Command Recognition Using Deep Learning', ...
    'TimeSpanSource','Property', ...
    'TimeSpan',1, ...
    'BufferLength',fs);

timeScope.YLabel = 'Amplitude';
timeScope.ShowGrid = true;

Show the time scope and matrix viewer. Detect commands as long as both the time scope and matrix viewer are open or until the time limit is reached. To stop the live detection before the time limit is reached, close the time scope window or matrix viewer window.

show(timeScope)
show(matrixViewer)
timeLimit = 10;

tic
while isVisible(timeScope) && isVisible(matrixViewer) && toc < timeLimit
    %% Capture Audio
    x = adr();
    write(audioBuffer,x);
    y = read(audioBuffer,fs,fs-samplesPerCapture);
    
    % Compute auditory features
    features = extract(afe,y);
    auditory_features = log10(features + 1e-6);
    
    % Transpose to get the auditory spectrum
    auditorySpectrum = auditory_features';
    
    % Perform prediction
    probs = predict(trainedNet, auditory_features);      
    [~, YPredicted] = max(probs);
    
    % Perform statistical post processing
    YBuffer = [YBuffer(2:end),YPredicted];
    probBuffer = [probBuffer(:,2:end),probs(:)];

    [YMode_idx, count] = mode(YBuffer);
    count = single(count);
    maxProb = max(probBuffer(YMode_idx,:));

    if (YMode_idx == single(backgroundIdx) || count < countThreshold || maxProb < probThreshold)
        speechCommandIdx = backgroundIdx;
    else
        speechCommandIdx = YMode_idx;
    end
    
    % Update plots
    matrixViewer(auditorySpectrum);
    timeScope(x);

    if (speechCommandIdx == backgroundIdx)
        timeScope.Title = ' ';
    else
        timeScope.Title = char(labels(speechCommandIdx));
    end
    drawnow
end 

Hide the scopes.

hide(matrixViewer)
hide(timeScope)

Prepare MATLAB Code for Deployment

To create a function to perform feature extraction compatible with code generation, call generateMATLABFunction (Audio Toolbox) on the audioFeatureExtractor object. The generateMATLABFunction object function creates a standalone function that performs equivalent feature extraction and is compatible with code generation.

generateMATLABFunction(afe,'extractSpeechFeatures')

The HelperSpeechCommandRecognition supporting function encapsulates the feature extraction and network prediction process demonstrated previously. So that the feature extraction is compatible with code generation, feature extraction is handled by the generated extractSpeechFeatures function. So that the network is compatible with code generation, the supporting function uses the coder.loadDeepLearningNetwork (MATLAB Coder) function to load the network.

Use the HelperSpeechCommandRecognition function to perform live detection of speech commands.

show(timeScope)
show(matrixViewer)
timeLimit = 10;

tic
while isVisible(timeScope) && isVisible(matrixViewer) && toc < timeLimit
    x = adr();    
        
    [speechCommandIdx, auditorySpectrum] = HelperSpeechCommandRecognition(x);  
		
    matrixViewer(auditorySpectrum);
    timeScope(x);
   
    if (speechCommandIdx == backgroundIdx)
        timeScope.Title = ' ';
    else
        timeScope.Title = char(labels(speechCommandIdx));
    end
    drawnow
end

Hide the scopes.

hide(timeScope)
hide(matrixViewer)

Generate MATLAB Executable

Create a code generation configuration object for generation of an executable program. Specify the target language as C++.

cfg = coder.config('mex');
cfg.TargetLang = 'C++';

Create a configuration object for deep learning code generation with the MKL-DNN library. Attach the configuration object to the code generation configuration object.

dlcfg = coder.DeepLearningConfig('mkldnn');
cfg.DeepLearningConfig = dlcfg;

Call codegen (MATLAB Coder) to generate C++ code for the HelperSpeechCommandRecognition function. Specify the configuration object and prototype arguments. A MEX file named HelperSpeechCommandRecognition_mex is generated to your current folder.

codegen HelperSpeechCommandRecognition -config cfg -args {rand(samplesPerCapture, 1, 'single')} -profile -report -v
### Compiling function(s) HelperSpeechCommandRecognition ...
------------------------------------------------------------------------
[1/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  MWTensorBase.cpp /Fobuild\win64\MWTensorBase.obj
MWTensorBase.cpp
[2/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  MWElementwiseAffineLayer.cpp /Fobuild\win64\MWElementwiseAffineLayer.obj
MWElementwiseAffineLayer.cpp
[3/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  MWMaxPoolingLayer.cpp /Fobuild\win64\MWMaxPoolingLayer.obj
MWMaxPoolingLayer.cpp
[4/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  MWInputLayerImpl.cpp /Fobuild\win64\MWInputLayerImpl.obj
MWInputLayerImpl.cpp
[5/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  MWInputLayer.cpp /Fobuild\win64\MWInputLayer.obj
MWInputLayer.cpp
[6/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  MWOutputLayer.cpp /Fobuild\win64\MWOutputLayer.obj
MWOutputLayer.cpp
[7/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  MWFCLayer.cpp /Fobuild\win64\MWFCLayer.obj
MWFCLayer.cpp
[8/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  MWCNNLayer.cpp /Fobuild\win64\MWCNNLayer.obj
MWCNNLayer.cpp
[9/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  MWOutputLayerImpl.cpp /Fobuild\win64\MWOutputLayerImpl.obj
MWOutputLayerImpl.cpp
[10/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  MWFusedConvReLULayer.cpp /Fobuild\win64\MWFusedConvReLULayer.obj
MWFusedConvReLULayer.cpp
[11/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  MWMaxPoolingLayerImpl.cpp /Fobuild\win64\MWMaxPoolingLayerImpl.obj
MWMaxPoolingLayerImpl.cpp
[12/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  HelperSpeechCommandRecognition_data.cpp /Fobuild\win64\HelperSpeechCommandRecognition_data.obj
HelperSpeechCommandRecognition_data.cpp
[13/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  HelperSpeechCommandRecognition_terminate.cpp /Fobuild\win64\HelperSpeechCommandRecognition_terminate.obj
HelperSpeechCommandRecognition_terminate.cpp
[14/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  colon.cpp /Fobuild\win64\colon.obj
colon.cpp
[15/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  HelperSpeechCommandRecognition_initialize.cpp /Fobuild\win64\HelperSpeechCommandRecognition_initialize.obj
HelperSpeechCommandRecognition_initialize.cpp
[16/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  MWElementwiseAffineLayerImpl.cpp /Fobuild\win64\MWElementwiseAffineLayerImpl.obj
MWElementwiseAffineLayerImpl.cpp
[17/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  rt_nonfinite.cpp /Fobuild\win64\rt_nonfinite.obj
rt_nonfinite.cpp
[18/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  MWFCLayerImpl.cpp /Fobuild\win64\MWFCLayerImpl.obj
MWFCLayerImpl.cpp
[19/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  MWFusedConvReLULayerImpl.cpp /Fobuild\win64\MWFusedConvReLULayerImpl.obj
MWFusedConvReLULayerImpl.cpp
[20/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  eml_int_forloop_overflow_check.cpp /Fobuild\win64\eml_int_forloop_overflow_check.obj
eml_int_forloop_overflow_check.cpp
[21/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  MWSoftmaxLayerImpl.cpp /Fobuild\win64\MWSoftmaxLayerImpl.obj
MWSoftmaxLayerImpl.cpp
[22/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  stft.cpp /Fobuild\win64\stft.obj
stft.cpp
[23/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  sort.cpp /Fobuild\win64\sort.obj
sort.cpp
[24/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  MWSoftmaxLayer.cpp /Fobuild\win64\MWSoftmaxLayer.obj
MWSoftmaxLayer.cpp
[25/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  extractSpeechFeatures.cpp /Fobuild\win64\extractSpeechFeatures.obj
extractSpeechFeatures.cpp
[26/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  HelperSpeechCommandRecognition.cpp /Fobuild\win64\HelperSpeechCommandRecognition.obj
HelperSpeechCommandRecognition.cpp
[27/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  DeepLearningNetwork.cpp /Fobuild\win64\DeepLearningNetwork.obj
DeepLearningNetwork.cpp
[28/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  sortIdx.cpp /Fobuild\win64\sortIdx.obj
sortIdx.cpp
[29/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  interface\_coder_HelperSpeechCommandRecognition_api.cpp /Fobuild\win64\_coder_HelperSpeechCommandRecognition_api.obj
_coder_HelperSpeechCommandRecognition_api.cpp
[30/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  MWCNNLayerImpl.cpp /Fobuild\win64\MWCNNLayerImpl.obj
MWCNNLayerImpl.cpp
[31/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  permute.cpp /Fobuild\win64\permute.obj
permute.cpp
[32/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  predict.cpp /Fobuild\win64\predict.obj
predict.cpp
[33/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  interface\_coder_HelperSpeechCommandRecognition_info.cpp /Fobuild\win64\_coder_HelperSpeechCommandRecognition_info.obj
_coder_HelperSpeechCommandRecognition_info.cpp
[34/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  HelperSpeechCommandRecognition_mexutil.cpp /Fobuild\win64\HelperSpeechCommandRecognition_mexutil.obj
HelperSpeechCommandRecognition_mexutil.cpp
[35/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  MWTargetNetworkImpl.cpp /Fobuild\win64\MWTargetNetworkImpl.obj
MWTargetNetworkImpl.cpp
[36/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  interface\_coder_HelperSpeechCommandRecognition_mex.cpp /Fobuild\win64\_coder_HelperSpeechCommandRecognition_mex.obj
_coder_HelperSpeechCommandRecognition_mex.cpp
[37/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  indexShapeCheck.cpp /Fobuild\win64\indexShapeCheck.obj
indexShapeCheck.cpp
[38/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\version\cpp_mexapi_version.cpp /Fobuild\win64\cpp_mexapi_version.obj
cpp_mexapi_version.cpp
[39/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  MWCustomLayerForMKLDNN.cpp /Fobuild\win64\MWCustomLayerForMKLDNN.obj
MWCustomLayerForMKLDNN.cpp
[40/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  MWMkldnnUtils.cpp /Fobuild\win64\MWMkldnnUtils.obj
MWMkldnnUtils.cpp
[41/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  mtimes.cpp /Fobuild\win64\mtimes.obj
mtimes.cpp
[42/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  computeDFT.cpp /Fobuild\win64\computeDFT.obj
computeDFT.cpp
[43/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  formatSTFTOutput.cpp /Fobuild\win64\formatSTFTOutput.obj
formatSTFTOutput.cpp
[44/45] cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /source-charset:utf-8 /I "." /I "C:\ExampleMatlab\ExampleManager\sporwal.Bdoc21b.j1648568\deeplearning_shared-ex90506783" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include\mkldnn" /I ".\interface" /I "Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\include" /I "." -DMODEL=HelperSpeechCommandRecognition_mex -DMW_NEEDS_VERSION_H /wd4251  AsyncBuffer.cpp /Fobuild\win64\AsyncBuffer.obj
AsyncBuffer.cpp
[45/45] link build\win64\MWCNNLayer.obj build\win64\MWElementwiseAffineLayer.obj build\win64\MWFCLayer.obj build\win64\MWFusedConvReLULayer.obj build\win64\MWInputLayer.obj build\win64\MWMaxPoolingLayer.obj build\win64\MWOutputLayer.obj build\win64\MWSoftmaxLayer.obj build\win64\MWTensorBase.obj build\win64\MWElementwiseAffineLayerImpl.obj build\win64\MWFCLayerImpl.obj build\win64\MWFusedConvReLULayerImpl.obj build\win64\MWInputLayerImpl.obj build\win64\MWMaxPoolingLayerImpl.obj build\win64\MWOutputLayerImpl.obj build\win64\MWSoftmaxLayerImpl.obj build\win64\MWCNNLayerImpl.obj build\win64\MWTargetNetworkImpl.obj build\win64\MWMkldnnUtils.obj build\win64\MWCustomLayerForMKLDNN.obj build\win64\HelperSpeechCommandRecognition_data.obj build\win64\rt_nonfinite.obj build\win64\HelperSpeechCommandRecognition_initialize.obj build\win64\HelperSpeechCommandRecognition_terminate.obj build\win64\HelperSpeechCommandRecognition.obj build\win64\DeepLearningNetwork.obj build\win64\colon.obj build\win64\extractSpeechFeatures.obj build\win64\stft.obj build\win64\indexShapeCheck.obj build\win64\mtimes.obj build\win64\permute.obj build\win64\predict.obj build\win64\_coder_HelperSpeechCommandRecognition_api.obj build\win64\_coder_HelperSpeechCommandRecognition_mex.obj build\win64\computeDFT.obj build\win64\eml_int_forloop_overflow_check.obj build\win64\formatSTFTOutput.obj build\win64\sort.obj build\win64\sortIdx.obj build\win64\AsyncBuffer.obj build\win64\HelperSpeechCommandRecognition_mexutil.obj build\win64\_coder_HelperSpeechCommandRecognition_info.obj build\win64\cpp_mexapi_version.obj /nologo /manifest   /DLL /LIBPATH:"Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\lib\win64\microsoft" libmx.lib libmex.lib libmat.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libMatlabDataArray.lib libMatlabEngine.lib  /out:"HelperSpeechCommandRecognition_mex.mexw64" /LIBPATH:"Z:\32\sporwal.Bdoc21b.j1648568\matlab\bin\win64" /LIBPATH:"Z:\32\sporwal.Bdoc21b.j1648568\matlab\extern\lib\win64\microsoft" libiomp5md.lib libmwblas.lib libemlrt.lib libcovrt.lib libut.lib libmwmathutil.lib  "Z:\32\sporwal.Bdoc21b.j1648568\matlab\lib\win64\mwdnnl.lib"
   Creating library HelperSpeechCommandRecognition_mex.lib and object HelperSpeechCommandRecognition_mex.exp

------------------------------------------------------------------------
### Generating compilation report ...
Code generation successful: View report

Perform Speech Command Recognition Using Deployed Code

Show the time scope and matrix viewer. Detect commands using the generated MEX for as long as both the time scope and matrix viewer are open or until the time limit is reached. To stop the live detection before the time limit is reached, close the time scope window or matrix viewer window.

show(timeScope)
show(matrixViewer)

timeLimit = 20;

tic
while isVisible(timeScope) && isVisible(matrixViewer) && toc < timeLimit
    x = adr();    
        
    [speechCommandIdx, auditorySpectrum] = HelperSpeechCommandRecognition_mex(x);
		
    matrixViewer(auditorySpectrum);
    timeScope(x);
   
    if (speechCommandIdx == backgroundIdx)
        timeScope.Title = ' ';
    else
        timeScope.Title = char(labels(speechCommandIdx));
    end
    drawnow
end

hide(matrixViewer)
hide(timeScope)

Evaluate MEX Execution Time

Use tic and toc to compare the execution time to run the simulation completely in MATLAB with the execution time of the MEX function.

Measure the performance of the simulation code.

testDur = 50e-3;
x = pinknoise(fs*testDur,'single');
numLoops = 100;
tic
for k = 1:numLoops
    [speechCommandIdx, auditory_features] = HelperSpeechCommandRecognition(x);
end
exeTime = toc;
fprintf('SIM execution time per 50 ms of audio = %0.4f ms\n',(exeTime/numLoops)*1000);
SIM execution time per 50 ms of audio = 6.8212 ms

Measure the performance of the MEX code.

tic
for k = 1:numLoops
    [speechCommandIdx, auditory_features] = HelperSpeechCommandRecognition_mex(x);
end
exeTimeMex = toc;
fprintf('MEX execution time per 50 ms of audio = %0.4f ms\n',(exeTimeMex/numLoops)*1000);
MEX execution time per 50 ms of audio = 1.3347 ms

Evaluate the performance gained from using the MEX function. This performance test is performed on a machine using NVIDIA Quadro P620 (Version 26) GPU and Intel(R) Xeon(R) W-2133 CPU running at 3.60 GHz.

PerformanceGain = exeTime/exeTimeMex
PerformanceGain = 5.1107