code: def test_transcription(
      self, speech_classification_model, test_data_dir
  ):
      # Ground truth labels = ["yes", "no"]
      audio_filenames = ["an22-flrp-b.wav", "an90-fbbh-b.wav"]
      audio_paths = [
          os.path.join(test_data_dir, "asr", "train", "an4", "wav", fp)
          for fp in audio_filenames
      ]
  
      model = speech_classification_model.eval()
  
      # Test Top 1 classification transcription
      results = model.transcribe(audio_paths, batch_size=2)
      assert len(results) == 2
      assert results[0].shape == torch.Size([1])
  
      # Test Top 5 classification transcription
      model._accuracy.top_k = [
          5
      ]  # set top k to 5 for accuracy calculation
      results = model.transcribe(audio_paths, batch_size=2)
      assert len(results) == 2
      assert results[0].shape == torch.Size([5])
  
      # Test Top 1 and Top 5 classification transcription
      model._accuracy.top_k = [1, 5]
      results = model.transcribe(audio_paths, batch_size=2)
      assert len(results) == 2
      assert results[0].shape == torch.Size([2, 1])
      assert results[1].shape == torch.Size([2, 5])
      assert model._accuracy.top_k == [1, 5]
  
      # Test log probs extraction
      model._accuracy.top_k = [1]
      results = model.transcribe(
          audio_paths, batch_size=2, logprobs=True
      )
      assert len(results) == 2
      assert results[0].shape == torch.Size([len(model.cfg.labels)])
  
      # Test log probs extraction remains same for any top_k
      model._accuracy.top_k = [5]
      results = model.transcribe(
          audio_paths, batch_size=2, logprobs=True
      )
      assert len(results) == 2
      assert results[0].shape == torch.Size([len(model.cfg.labels)])
  
imports: import copy
  import os
  import pytest
  import torch
  from omegaconf import DictConfig, ListConfig
  from nemo.collections.asr.data import audio_to_label
  from nemo.collections.asr.models import EncDecClassificationModel, EncDecFrameClassificationModel, configs
  from nemo.utils.config_utils import assert_dataclass_signature_match
label_desc: Use image node_id 4 for calling the TestEncDecClassificationModel obj's underlying member method code with example usage: obj.test_transcription(speech_classification_model, test_data_dir) without return types