class_docstr: A ready-to-use SED interface (audio -> emotions and their durations)
  
  Arguments
  ---------
  hparams
      Hyperparameters (from HyperPyYAML)
  
  Example
  -------
  >>> from speechbrain.inference.diarization import Speech_Emotion_Diarization
  >>> tmpdir = getfixture("tmpdir")
  >>> sed_model = Speech_Emotion_Diarization.from_hparams(source="speechbrain/emotion-diarization-wavlm-large", savedir=tmpdir,) # doctest: +SKIP
  >>> sed_model.diarize_file("speechbrain/emotion-diarization-wavlm-large/example.wav") # doctest: +SKIP
docstr: Encodes audios into fine-grained emotional embeddings
  
  Arguments
  ---------
  wavs : torch.tensor
      Batch of waveforms [batch, time, channels].
  wav_lens : torch.tensor
      Lengths of the waveforms relative to the longest one in the
      batch, tensor of shape [batch]. The longest one should have
      relative length 1.0 and others len(waveform) / max_length.
      Used for ignoring padding.
  
  Returns
  -------
  torch.tensor
      The encoded batch
code: def encode_batch(self, wavs, wav_lens):
      """Encodes audios into fine-grained emotional embeddings
  
      Arguments
      ---------
      wavs : torch.tensor
          Batch of waveforms [batch, time, channels].
      wav_lens : torch.tensor
          Lengths of the waveforms relative to the longest one in the
          batch, tensor of shape [batch]. The longest one should have
          relative length 1.0 and others len(waveform) / max_length.
          Used for ignoring padding.
  
      Returns
      -------
      torch.tensor
          The encoded batch
      """
      if len(wavs.shape) == 1:
          wavs = wavs.unsqueeze(0)
  
      # Assign full length if wav_lens is not assigned
      if wav_lens is None:
          wav_lens = torch.ones(wavs.shape[0], device=self.device)
  
      wavs, wav_lens = wavs.to(self.device), wav_lens.to(self.device)
  
      wavs = self.mods.input_norm(wavs, wav_lens)
      outputs = self.mods.wav2vec2(wavs)
      return outputs
  
file_path: speechbrain/speechbrain/inference/diarization.py
imports: import torch
  from speechbrain.inference.interfaces import Pretrained
label_desc: Use image node_id 3 for calling the Speech_Emotion_Diarization obj's underlying member method code with example usage: obj.encode_batch(wavs, wav_lens) and returns: outputs