docstr: Run as a command
docstr_tok: ["Run","as","a","command"]
code: def run_cmd(self, argvs):
      """
      Run as a command
      """
      self.parser = argparse.ArgumentParser(
          description="Run the %s module." % self.name,
          prog="hub run %s" % self.name,
          usage="%(prog)s",
          add_help=True,
      )
  
      self.arg_input_group = self.parser.add_argument_group(
          title="Input options", description="Input data. Required"
      )
      self.arg_input_group = self.parser.add_argument_group(
          title="Ouput options", description="Ouput path. Optional."
      )
      self.arg_config_group = self.parser.add_argument_group(
          title="Config options",
          description="Run configuration for controlling module behavior, optional.",
      )
  
      self.add_module_config_arg()
      self.add_module_input_arg()
      self.add_module_output_arg()
  
      args = self.parser.parse_args(argvs)
  
      try:
          input_data = self.check_input_data(args)
      except DataFormatError and RuntimeError:
          self.parser.print_help()
          return None
  
      mkdir(args.output_path)
      wavs, sample_rate = self.synthesize(
          texts=input_data, use_gpu=args.use_gpu, vocoder=args.vocoder
      )
  
      for index, wav in enumerate(wavs):
          sf.write(
              os.path.join(args.output_path, f"{index}.wav"),
              wav,
              sample_rate,
          )
  
      ret = f"The synthesized wav files have been saved in {args.output_path}"
      return ret
  
imports: import os
  import ast
  import argparse
  import importlib.util
  import nltk
  import paddle.fluid
  import paddle.fluid.dygraph
  import paddlehub
  from paddlehub.module.module import runnable
  from paddlehub.common.utils import mkdir
  from paddlehub.module.nlp_module import DataFormatError
  from paddlehub.common.logger import logger
  from paddlehub.module.module import moduleinfo, serving
  from paddlehub.common.dir import THIRD_PARTY_HOME
  from paddlehub.common.downloader import default_downloader
label_desc: Use image node_id 8 for calling the TransformerTTS obj's underlying member method code with example usage: obj.run_cmd(argvs) and returns: ret, None