code: def main():
      parser = argparse.ArgumentParser()
      parser.add_argument(
          "--lang_tag",
          type=str,
          default=None,
          nargs="?",
          help="language tag (can be used for multi lingual case)",
      )
      parser.add_argument("--spk_tag", type=str, help="speaker tag")
      parser.add_argument(
          "jsons", nargs="+", type=str, help="*_mls.json filenames"
      )
      parser.add_argument("out", type=str, help="output filename")
      parser.add_argument(
          "trans_type",
          type=str,
          default="phn",
          choices=["char", "phn"],
          help="Input transcription type",
      )
      args = parser.parse_args()
  
      dirname = os.path.dirname(args.out)
      if len(dirname) != 0 and not os.path.exists(dirname):
          os.makedirs(dirname)
  
      with codecs.open(args.out, "w", encoding="utf-8") as out:
          for filename in sorted(args.jsons):
              with codecs.open(filename, "r", encoding="utf-8") as f:
                  js = json.load(f)
              for key in sorted(js.keys()):
                  uid = args.spk_tag + "_" + key.replace(".wav", "")
  
                  content = js[key]["clean"]
                  text = custom_english_cleaners(content.rstrip())
                  if args.trans_type == "phn":
                      clean_content = text.lower()
                      text = g2p(clean_content)
  
                  if args.lang_tag is None:
                      line = "%s %s \n" % (uid, text)
                  else:
                      line = "%s <%s> %s\n" % (uid, args.lang_tag, text)
                  out.write(line)
  
file_path: espnet/egs/vcc20/tts1_en_fi/local/clean_text_mailabs.py
imports: import argparse
  import codecs
  import json
  import os
  import nltk
  from tacotron_cleaner.cleaners import custom_english_cleaners
label_desc: Use image node_id 2 for calling a global function with example usage: main() without return types