class_docstr: Task for joint training speech and text to text.
class_docstr_tok: ["Task","for","joint","training","speech","and","text","to","text","."]
code: def inference_step(
      self,
      generator,
      models,
      sample,
      prefix_tokens=None,
      constraints=None,
  ):
      with torch.no_grad():
          return generator.generate(
              models,
              sample,
              prefix_tokens=prefix_tokens,
              constraints=constraints,
              bos_token=self._infer_tgt_lang_id,
          )
  
imports: import logging
  import os
  from argparse import Namespace
  from pathlib import Path
  import torch
  from fairseq.data import encoders, Dictionary, ResamplingDataset, TransformEosLangPairDataset, ConcatDataset
  from fairseq.data.iterators import GroupedEpochBatchIterator
  from fairseq.data.audio.multi_modality_dataset import MultiModalityDataset, LangPairMaskDataset, ModalityDatasetItem
  from fairseq.data.audio.speech_to_text_dataset import SpeechToTextDataset, SpeechToTextDatasetCreator
  from fairseq.data.audio.speech_to_text_joint_dataset import S2TJointDataConfig, SpeechToTextJointDatasetCreator
  from fairseq.tasks import register_task
  from fairseq.tasks.speech_to_text import SpeechToTextTask
  from fairseq.tasks.translation import load_langpair_dataset
label_desc: Use image node_id 5 for calling the SpeechTextJointToTextTask obj's underlying member method code with example usage: obj.inference_step(generator, models, sample, prefix_tokens, constraints) and returns: generator