%% Download YAMNet
% Download and unzip the Audio Toolbox™ model for YAMNet.
% Type yamnet at the Command Window. If the Audio Toolbox model for YAMNet 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 the following commands to download and unzip the YAMNet model to your temporary directory.

downloadFolder = fullfile(tempdir,'YAMNetDownload');
loc = websave(downloadFolder,'https://ssd.mathworks.com/supportfiles/audio/yamnet.zip');
YAMNetLocation = tempdir;
unzip(loc,YAMNetLocation)
addpath(fullfile(YAMNetLocation,'yamnet'))

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

yamnet

% Copyright 2020 The MathWorks, Inc.