class_docstr: A ready-to-use class for Voice Activity Detection (VAD) using a
  pre-trained model.
  
  Example
  -------
  >>> import torchaudio
  >>> from speechbrain.inference.VAD import VAD
  >>> # Model is downloaded from the speechbrain HuggingFace repo
  >>> tmpdir = getfixture("tmpdir")
  >>> VAD = VAD.from_hparams(
  ...     source="speechbrain/vad-crdnn-libriparty",
  ...     savedir=tmpdir,
  ... )
  
  >>> # Perform VAD
  >>> boundaries = VAD.get_speech_segments("tests/samples/single-mic/example1.wav")
docstr: Takes in input the boundaries of the detected speech segments and
  double checks (using the neural VAD) that they actually contain speech.
  
  Arguments
  ---------
  boundaries: torch.Tensor
      Tensor containing the boundaries of the speech segments.
  audio_file: path
      The original audio file used to compute vad_out.
  speech_th: float
      Threshold on the mean posterior probability over which speech is
      confirmed. Below that threshold, the segment is re-assigned to a
      non-speech region.
  
  Returns
  -------
  new_boundaries
      The boundaries of the segments where speech activity is confirmed.
docstr_tok: ["Takes","in","input","the","boundaries","of","the","detected","speech","segments","and","double","checks","(","using","the","neural","VAD",")","that","they","actually","contain","speech",".","Arguments","--","--","--","--","-","boundaries",":","torch.Tensor","Tensor","containing","the","boundaries","of","the","speech","segments",".","audio_file",":","path","The","original","audio","file","used","to","compute","vad_out",".","speech_th",":","float","Threshold","on","the","mean","posterior","probability","over","which","speech","is","confirmed",".","Below","that","threshold",",","the","segment","is","re-assigned","to","a","non-speech","region",".","Returns","--","--","--","-","new_boundaries","The","boundaries","of","the","segments","where","speech","activity","is","confirmed","."]
code: def double_check_speech_segments(
      self, boundaries, audio_file, speech_th=0.5
  ):
      """Takes in input the boundaries of the detected speech segments and
      double checks (using the neural VAD) that they actually contain speech.
  
      Arguments
      ---------
      boundaries: torch.Tensor
          Tensor containing the boundaries of the speech segments.
      audio_file: path
          The original audio file used to compute vad_out.
      speech_th: float
          Threshold on the mean posterior probability over which speech is
          confirmed. Below that threshold, the segment is re-assigned to a
          non-speech region.
  
      Returns
      -------
      new_boundaries
          The boundaries of the segments where speech activity is confirmed.
      """
  
      # Getting the total size of the input file
      sample_rate, sig_len = self._get_audio_info(audio_file)
  
      # Double check the segments
      new_boundaries = []
      for i in range(boundaries.shape[0]):
          beg_sample = int(boundaries[i, 0] * sample_rate)
          end_sample = int(boundaries[i, 1] * sample_rate)
          len_seg = end_sample - beg_sample
  
          # Read the candidate speech segment
          segment, fs = torchaudio.load(
              str(audio_file),
              frame_offset=beg_sample,
              num_frames=len_seg,
          )
          speech_prob = self.get_speech_prob_chunk(segment)
          if speech_prob.mean() > speech_th:
              # Accept this as a speech segment
              new_boundaries.append(
                  [boundaries[i, 0], boundaries[i, 1]]
              )
  
      # Convert boundaries from list to tensor
      new_boundaries = torch.FloatTensor(new_boundaries).to(
          boundaries.device
      )
      return new_boundaries
  
imports: import torch
  import torchaudio
  from speechbrain.utils.data_utils import split_path
  from speechbrain.utils.fetching import fetch
  from speechbrain.inference.interfaces import Pretrained
label_desc: Use image node_id 15 for calling the VAD obj's underlying member method code with example usage: obj.double_check_speech_segments(boundaries, audio_file, speech_th) and returns: new_boundaries