docstr: compute input sequences separately. Call it before
  passing dataset to data loader.
docstr_tok: ["compute","input","sequences","separately",".","Call","it","before","passing","dataset","to","data","loader","."]
code: def compute_input_seq(self, num_workers=0):
      """compute input sequences separately. Call it before
      passing dataset to data loader."""
      if not self.use_phonemes:
          if self.verbose:
              print(" | > Computing input sequences ...")
          for idx, item in enumerate(tqdm.tqdm(self.items)):
              text, *_ = item
              sequence = np.asarray(
                  text_to_sequence(
                      text,
                      [self.cleaners],
                      tp=self.tp,
                      add_blank=self.add_blank,
                  ),
                  dtype=np.int32,
              )
              self.items[idx][0] = sequence
  
      else:
          func_args = [
              self.phoneme_cache_path,
              self.enable_eos_bos,
              self.cleaners,
              self.phoneme_language,
              self.tp,
              self.add_blank,
          ]
          if self.verbose:
              print(" | > Computing phonemes ...")
          if num_workers == 0:
              for idx, item in enumerate(tqdm.tqdm(self.items)):
                  phonemes = self._phoneme_worker([item, func_args])
                  self.items[idx][0] = phonemes
          else:
              with Pool(num_workers) as p:
                  phonemes = list(
                      tqdm.tqdm(
                          p.imap(
                              MyDataset._phoneme_worker,
                              [
                                  [item, func_args]
                                  for item in self.items
                              ],
                          ),
                          total=len(self.items),
                      )
                  )
                  for idx, p in enumerate(phonemes):
                      self.items[idx][0] = p
  
imports: import collections
  import os
  import random
  from multiprocessing import Manager, Pool
  import numpy
  import torch
  import tqdm
  from torch.utils.data import Dataset
  from TTS.tts.utils.data import prepare_data, prepare_stop_target, prepare_tensor
  from TTS.tts.utils.text import pad_with_eos_bos, phoneme_to_sequence, text_to_sequence
label_desc: Use image node_id 8 for calling the MyDataset obj's underlying member method code with example usage: obj.compute_input_seq(num_workers) without return types