function classify_frame_sns( sns_filename )
  
  if nargin < 1
    error( [ mfilename ' needs 1 input argument.' ] );
  end

  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  % ( 0 ) Inputs and output

  disp( ' ' );
  
  % Define the output filename.
  % We will write out a file very similar to "FULL_detect_locate_wrapper....",
  % except for a few additional fields ("cluster_sns_par" etc.).
  
  [ p, n ] = fileparts( sns_filename );

  out_filename = fullfile( 'DATA', [ mfilename '-' n '.mat' ] );

  % Make sure it does not exist yet

  if exist( out_filename, 'file' )
    disp( [ mfilename ': output file already exists. Skipped.' ] );
    disp( [ '("' out_filename ')"' ] );
    return;
  end

  % Lock it by creating it

  fid = fopen( out_filename, 'wt' );
  fclose( fid );

  % Load the speech/non-speech GMM models
  
  load( sns_filename, 'model_list', 'par' );
  disp( [ mfilename ' loaded ' sns_filename ] );

  % Load the multisource detection-localization result

  result_filename = par.in_filename;
  load( result_filename, 'result' );
  disp( [ mfilename ' loaded ' result_filename ] );
  
  % Among the GMMs with at least one full covariance matrix component,
  % select the one with maximum BIC score.

  BIC_list = [ model_list.BIC ];
  BIC_list( find( [ model_list.n_full ] < 1 ) ) = -Inf;
  
  [ tmp, gmm_max_ind ] = max( BIC_list );

  if tmp == -Inf
    
    disp( [ mfilename ' did not find a suitable GMM for MFCCs -> only wideband activeness will be used, along with C0.' ] );
    gmm_max_ind = [];
    
    % In such a case we'll only use wideband activeness
    % to take the speech/non-speech decision (see below).

  end

  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  % ( 2 ) Process the recording(s)

  if numel( result.list ) ~= 1
    error( [ mfilename ' can process only one recording at a time.' ] );
  end
  
  % In "loc_to_keep", we are going to mark which location estimates we want to keep.

  % -> FRAME-LEVEL decision

  tag = result.list.sphloc_mat( 7,: );
  
  if isempty( gmm_max_ind )

    disp( [ mfilename ': taking frame-level decisions using wideband activeness only.' ] );

    loc_to_keep = model_list( 1 ).wa_decision;

  else

    disp( [ mfilename ': taking frame-level decisions using wideband activeness and sector-based MFCCs.' ] );

    loc_to_keep = model_list( gmm_max_ind ).wa_speech_decision;

  end
  
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  % ( 3 ) Remove all location estimates belonging to non-speech clusters,
  % keep all others.

  result.list.sphloc_mat = result.list.sphloc_mat( :, loc_to_keep );
  
  if ~isempty( gmm_max_ind )
    result.list.sbmfcc_mat = result.list.sbmfcc_mat( :, loc_to_keep );
  else
    result.list.sbmfcc_mat  = [];
  end
  
  % Write out

  save( out_filename, 'result' );

  disp( [ mfilename ' wrote out "' out_filename '".' ] );
  