code: def test_acoustic_model():
      dummy_tokens = torch.rand((1, 41)).long().to(device)
      dummy_text_lens = torch.tensor([41]).long().to(device)
      dummy_spec = torch.rand((1, 100, 207)).to(device)
      dummy_spec_lens = torch.tensor([207]).to(device)
      dummy_pitch = torch.rand((1, 1, 207)).long().to(device)
      dummy_energy = torch.rand((1, 1, 207)).long().to(device)
  
      args.out_channels = 100
      args.num_mels = 100
  
      acoustic_model = AcousticModel(
          args=args, tokenizer=tokenizer, speaker_manager=None
      ).to(device)
      acoustic_model = acoustic_model.train()
  
      output = acoustic_model(
          tokens=dummy_tokens,
          src_lens=dummy_text_lens,
          mel_lens=dummy_spec_lens,
          mels=dummy_spec,
          pitches=dummy_pitch,
          energies=dummy_energy,
          attn_priors=None,
          d_vectors=None,
          speaker_idx=None,
      )
      assert list(output["model_outputs"].shape) == [1, 207, 100]
  
file_path: TTS/tests/tts_tests2/test_delightful_tts_layers.py
imports: import torch
  from TTS.tts.configs.delightful_tts_config import DelightfulTTSConfig
  from TTS.tts.layers.delightful_tts.acoustic_model import AcousticModel
  from TTS.tts.models.delightful_tts import DelightfulTtsArgs, VocoderConfig
  from TTS.tts.utils.helpers import rand_segments
  from TTS.tts.utils.text.tokenizer import TTSTokenizer
  from TTS.vocoder.models.hifigan_generator import HifiganGenerator
label_desc: Use image node_id 1 for calling a global function with example usage: test_acoustic_model() without return types