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: Based on the input boundaries, this method creates a signal that is 1
  when there is speech and 0 when there is no speech.
  The vad signal has the same resolution as the input one and can be
  opened with it (e.g, using audacity) to visually figure out VAD regions.
  
  Arguments
  ---------
  boundaries: torch.Tensor
      Tensor containing the boundaries of the speech segments.
  audio_file: path
      The original audio file used to compute vad_out
  
  Returns
  -------
  vad_signal
      The output vad signal with the same resolution of the input one.
docstr_tok: ["Based","on","the","input","boundaries",",","this","method","creates","a","signal","that","is","1","when","there","is","speech","and","0","when","there","is","no","speech",".","The","vad","signal","has","the","same","resolution","as","the","input","one","and","can","be","opened","with","it","(","e.g",",","using","audacity",")","to","visually","figure","out","VAD","regions",".","Arguments","--","--","--","--","-","boundaries",":","torch.Tensor","Tensor","containing","the","boundaries","of","the","speech","segments",".","audio_file",":","path","The","original","audio","file","used","to","compute","vad_out","Returns","--","--","--","-","vad_signal","The","output","vad","signal","with","the","same","resolution","of","the","input","one","."]
code: def upsample_boundaries(self, boundaries, audio_file):
      """Based on the input boundaries, this method creates a signal that is 1
      when there is speech and 0 when there is no speech.
      The vad signal has the same resolution as the input one and can be
      opened with it (e.g, using audacity) to visually figure out VAD regions.
  
      Arguments
      ---------
      boundaries: torch.Tensor
          Tensor containing the boundaries of the speech segments.
      audio_file: path
          The original audio file used to compute vad_out
  
      Returns
      -------
      vad_signal
          The output vad signal with the same resolution of the input one.
      """
  
      # Getting the total size of the input file
      sample_rate, sig_len = self._get_audio_info(audio_file)
  
      if sample_rate != self.sample_rate:
          raise ValueError(
              "The detected sample rate is different from that set in the hparam file"
          )
  
      # Initialization of the output signal
      vad_signal = torch.zeros(1, sig_len, device=boundaries.device)
  
      # Composing the vad signal from boundaries
      for i in range(boundaries.shape[0]):
          beg_sample = int(boundaries[i, 0] * sample_rate)
          end_sample = int(boundaries[i, 1] * sample_rate)
          vad_signal[0, beg_sample:end_sample] = 1.0
      return vad_signal
  
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 14 for calling the VAD obj's underlying member method code with example usage: obj.upsample_boundaries(boundaries, audio_file) and returns: vad_signal