class_docstr: Joint denoising training task for speech and text.
class_docstr_tok: ["Joint","denoising","training","task","for","speech","and","text","."]
code: def get_sample_ratio(self, epoch):
      sup_ratio = (
          self.sup_ratio[epoch]
          if len(self.sup_ratio) > epoch
          else self.sup_ratio[-1]
      )
      sup_s2s_ratio = (
          self.sup_s2s_ratio[epoch]
          if len(self.sup_s2s_ratio) > epoch
          else self.sup_s2s_ratio[-1]
      )
      unsup_ratio = (
          self.unsup_ratio[epoch]
          if len(self.unsup_ratio) > epoch
          else self.unsup_ratio[-1]
      )
      text_ratio = (
          self.text_ratio[epoch]
          if len(self.text_ratio) > epoch
          else self.text_ratio[-1]
      )
      bitext_ratio = (
          self.bitext_ratio[epoch]
          if len(self.bitext_ratio) > epoch
          else self.bitext_ratio[-1]
      )
      return (
          text_ratio,
          bitext_ratio,
          sup_ratio,
          sup_s2s_ratio,
          unsup_ratio,
      )
  
imports: import logging
  import os
  import re
  from argparse import Namespace
  from pathlib import Path
  from fairseq.data import ConcatDataset, Dictionary, encoders
  from fairseq.data.audio.multi_modality_dataset import FileAudioDatasetWrapper, ModalityDatasetItem, MultiModalityDataset
  from fairseq.data.audio.speech_to_text_joint_dataset import S2TJointDataConfig, SpeechToTextJointDatasetCreator
  from fairseq.data.iterators import GroupedEpochBatchIterator
  from fairseq.tasks import register_task
  from .pair_denoising import PairedDenoisingTask
label_desc: Use image node_id 10 for calling the SpeechTextJointDenoisingPreTask obj's underlying member method code with example usage: obj.get_sample_ratio(epoch) and returns: text_ratio,  bitext_ratio,  sup_ratio,  sup_s2s_ratio,  unsup_ratio