%% Download VGGish Network
% Download and unzip the Audio Toolbox™ model for VGGish.
% Type vggish at the Command Window. If the Audio Toolbox model for VGGish is not installed, then the function provides a link to the location of the network weights. To download the model, click the link. Unzip the file to a location on the MATLAB path.
% Alternatively, execute these commands to download and unzip the VGGish model to your temporary directory.

downloadFolder = fullfile(tempdir,'VGGishDownload');
loc = websave(downloadFolder,'https://ssd.mathworks.com/supportfiles/audio/vggish.zip');
VGGishLocation = tempdir;
unzip(loc,VGGishLocation)
addpath(fullfile(VGGishLocation,'vggish'))

%
% Check that the installation is successful by typing vggish at the Command Window. If the network is installed, then the function returns a SeriesNetwork object.

vggish

% Copyright 2020 The MathWorks, Inc.