code: def wav_to_mel_cloning(
      wav,
      mel_norms_file="../experiments/clips_mel_norms.pth",
      mel_norms=None,
      device=torch.device("cpu"),
      n_fft=4096,
      hop_length=1024,
      win_length=4096,
      power=2,
      normalized=False,
      sample_rate=22050,
      f_min=0,
      f_max=8000,
      n_mels=80,
  ):
      """
      Convert waveform to mel-spectrogram with hard-coded parameters for cloning.
  
      Args:
          wav (torch.Tensor): Input waveform tensor.
          mel_norms_file (str): Path to mel-spectrogram normalization file.
          mel_norms (torch.Tensor): Mel-spectrogram normalization tensor.
          device (torch.device): Device to use for computation.
  
      Returns:
          torch.Tensor: Mel-spectrogram tensor.
      """
      mel_stft = torchaudio.transforms.MelSpectrogram(
          n_fft=n_fft,
          hop_length=hop_length,
          win_length=win_length,
          power=power,
          normalized=normalized,
          sample_rate=sample_rate,
          f_min=f_min,
          f_max=f_max,
          n_mels=n_mels,
          norm="slaney",
      ).to(device)
      wav = wav.to(device)
      mel = mel_stft(wav)
      mel = torch.log(torch.clamp(mel, min=1e-5))
      if mel_norms is None:
          mel_norms = torch.load(mel_norms_file, map_location=device)
      mel = mel / mel_norms.unsqueeze(0).unsqueeze(-1)
      return mel
  
imports: import os
  from dataclasses import dataclass
  import librosa
  import torch
  import torch.nn.functional
  import torchaudio
  from coqpit import Coqpit
  from TTS.tts.layers.xtts.gpt import GPT
  from TTS.tts.layers.xtts.hifigan_decoder import HifiDecoder
  from TTS.tts.layers.xtts.stream_generator import init_stream_support
  from TTS.tts.layers.xtts.tokenizer import VoiceBpeTokenizer, split_sentence
  from TTS.tts.layers.xtts.xtts_manager import SpeakerManager, LanguageManager
  from TTS.tts.models.base_tts import BaseTTS
  from TTS.utils.io import load_fsspec
label_desc: Use image node_id 1 for calling a global function with example usage: wav_to_mel_cloning(wav, mel_norms_file, mel_norms, device, n_fft, hop_length, win_length, power, normalized, sample_rate, f_min, f_max, n_mels) and returns: mel