docstr: Compute noisy audio based on noise schedule
docstr_tok: ["Compute","noisy","audio","based","on","noise","schedule"]
code: def compute_y_n(self, y_0):
      """Compute noisy audio based on noise schedule"""
      self.noise_level = self.noise_level.to(y_0)
      if len(y_0.shape) == 3:
          y_0 = y_0.squeeze(1)
      s = torch.randint(0, self.num_steps - 1, [y_0.shape[0]])
      l_a, l_b = self.noise_level[s], self.noise_level[s + 1]
      noise_scale = l_a + torch.rand(y_0.shape[0]).to(y_0) * (l_b - l_a)
      noise_scale = noise_scale.unsqueeze(1)
      noise = torch.randn_like(y_0)
      noisy_audio = (
          noise_scale * y_0 + (1.0 - noise_scale**2) ** 0.5 * noise
      )
      return (
          noise.unsqueeze(1),
          noisy_audio.unsqueeze(1),
          noise_scale[:, 0],
      )
  
file_path: TTS/TTS/vocoder/models/wavegrad.py
imports: import numpy
  import torch
  from torch import nn
  from torch.nn.utils import weight_norm
  from ..layers.wavegrad import DBlock, FiLM, UBlock, Conv1d
label_desc: Use image node_id 5 for calling the Wavegrad obj's underlying member method code with example usage: obj.compute_y_n(y_0) and returns: noise,  noisy_audio,  noise_scale