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: Removes segments that are too short.
  
  Arguments
  ---------
  boundaries : torch.Tensor
      Tensor containing the speech boundaries. It can be derived using the
      get_boundaries method.
  len_th: float
      If the length of the segment is smaller than close_th, the segments
      will be merged.
  
  Returns
  -------
  new_boundaries
      The new boundaries without the short segments.
docstr_tok: ["Removes","segments","that","are","too","short",".","Arguments","--","--","--","--","-","boundaries",":","torch.Tensor","Tensor","containing","the","speech","boundaries",".","It","can","be","derived","using","the","get_boundaries","method",".","len_th",":","float","If","the","length","of","the","segment","is","smaller","than","close_th",",","the","segments","will","be","merged",".","Returns","--","--","--","-","new_boundaries","The","new","boundaries","without","the","short","segments","."]
code: def remove_short_segments(self, boundaries, len_th=0.250):
      """Removes segments that are too short.
  
      Arguments
      ---------
      boundaries : torch.Tensor
          Tensor containing the speech boundaries. It can be derived using the
          get_boundaries method.
      len_th: float
          If the length of the segment is smaller than close_th, the segments
          will be merged.
  
      Returns
      -------
      new_boundaries
          The new boundaries without the short segments.
      """
      new_boundaries = []
  
      # Process the segments
      for i in range(boundaries.shape[0]):
          # Computing segment length
          seg_len = boundaries[i, 1] - boundaries[i, 0]
  
          # Accept segment only if longer than len_th
          if seg_len > len_th:
              new_boundaries.append(
                  [boundaries[i, 0], boundaries[i, 1]]
              )
      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 8 for calling the VAD obj's underlying member method code with example usage: obj.remove_short_segments(boundaries, len_th) and returns: new_boundaries