class_docstr: Task for joint training speech and text to text.
class_docstr_tok: ["Task","for","joint","training","speech","and","text","to","text","."]
docstr: Add task-specific arguments to the parser.
docstr_tok: ["Add","task-specific","arguments","to","the","parser","."]
code: def add_args(cls, parser):
      """Add task-specific arguments to the parser."""
      super(SpeechTextJointToTextTask, cls).add_args(parser)
      ###
      parser.add_argument(
          "--parallel-text-data",
          default="",
          help="path to parallel text data directory",
      )
      parser.add_argument(
          "--max-tokens-text",
          type=int,
          metavar="N",
          help="maximum tokens for encoder text input ",
      )
      parser.add_argument(
          "--max-positions-text",
          type=int,
          metavar="N",
          default=400,
          help="maximum tokens for per encoder text input ",
      )
      parser.add_argument(
          "--langpairs",
          default=None,
          metavar="S",
          help='language pairs for text training, separated with ","',
      )
      parser.add_argument(
          "--speech-sample-ratio",
          default=1,
          type=float,
          metavar="N",
          help="Multiple Ratio for speech dataset with transcripts ",
      )
      parser.add_argument(
          "--text-sample-ratio",
          default=1,
          type=float,
          metavar="N",
          help="Multiple Ratio for text set ",
      )
      parser.add_argument(
          "--update-mix-data",
          action="store_true",
          help="use mixed data in one update when update-freq  > 1",
      )
      parser.add_argument(
          "--load-speech-only",
          action="store_true",
          help="load speech data only",
      )
      parser.add_argument(
          "--mask-text-ratio",
          type=float,
          metavar="V",
          default=0.0,
          help="mask V source tokens for text only mode",
      )
      parser.add_argument(
          "--mask-text-type",
          default="random",
          choices=["random", "tail"],
          help="mask text typed",
      )
      parser.add_argument(
          "--noise-token",
          default="",
          help="noise token for masking src text tokens if mask-text-ratio > 0",
      )
      parser.add_argument(
          "--infer-target-lang",
          default="",
          metavar="S",
          help="target language for inference",
      )
  
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 1 for calling the SpeechTextJointToTextTask obj's underlying member method code with example usage: obj.add_args(cls, parser) without return types