docstr: inputs = {
      'text': '小酒窝长睫毛AP是你最美的记号',
      'notes': 'C#4/Db4 | F#4/Gb4 | G#4/Ab4 | A#4/Bb4 F#4/Gb4 | F#4/Gb4 C#4/Db4 | C#4/Db4 | rest | C#4/Db4 | A#4/Bb4 | G#4/Ab4 | A#4/Bb4 | G#4/Ab4 | F4 | C#4/Db4',
      'notes_duration': '0.407140 | 0.376190 | 0.242180 | 0.509550 0.183420 | 0.315400 0.235020 | 0.361660 | 0.223070 | 0.377270 | 0.340550 | 0.299620 | 0.344510 | 0.283770 | 0.323390 | 0.360340',
      'input_type': 'word'
  }  # user input: Chinese characters
  or,
  inputs = {
      'text': '小酒窝长睫毛AP是你最美的记号',
      'ph_seq': 'x iao j iu w o ch ang ang j ie ie m ao AP sh i n i z ui m ei d e j i h ao',
      'note_seq': 'C#4/Db4 C#4/Db4 F#4/Gb4 F#4/Gb4 G#4/Ab4 G#4/Ab4 A#4/Bb4 A#4/Bb4 F#4/Gb4 F#4/Gb4 F#4/Gb4 C#4/Db4 C#4/Db4 C#4/Db4 rest C#4/Db4 C#4/Db4 A#4/Bb4 A#4/Bb4 G#4/Ab4 G#4/Ab4 A#4/Bb4 A#4/Bb4 G#4/Ab4 G#4/Ab4 F4 F4 C#4/Db4 C#4/Db4',
      'note_dur_seq': '0.407140 0.407140 0.376190 0.376190 0.242180 0.242180 0.509550 0.509550 0.183420 0.315400 0.315400 0.235020 0.361660 0.361660 0.223070 0.377270 0.377270 0.340550 0.340550 0.299620 0.299620 0.344510 0.344510 0.283770 0.283770 0.323390 0.323390 0.360340 0.360340',
      'is_slur_seq': '0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0',
      'input_type': 'phoneme'
  }  # input like Opencpop dataset.
docstr_tok: ["inputs","=","{","'text","'",":","'\u5c0f\u9152\u7a9d\u957f\u776b\u6bdbAP\u662f\u4f60\u6700\u7f8e\u7684\u8bb0\u53f7","'",",","'notes","'",":","'","C","#","4\/Db4","|","F","#","4\/Gb4","|","G","#","4\/Ab4","|","A","#","4\/Bb4","F","#","4\/Gb4","|","F","#","4\/Gb4","C","#","4\/Db4","|","C","#","4\/Db4","|","rest","|","C","#","4\/Db4","|","A","#","4\/Bb4","|","G","#","4\/Ab4","|","A","#","4\/Bb4","|","G","#","4\/Ab4","|","F4","|","C","#","4\/Db4","'",",","'notes_duration","'",":","'","0.407140","|","0.376190","|","0.242180","|","0.509550","0.183420","|","0.315400","0.235020","|","0.361660","|","0.223070","|","0.377270","|","0.340550","|","0.299620","|","0.344510","|","0.283770","|","0.323390","|","0.360340","'",",","'input_type","'",":","'word'","}","#","user","input",":","Chinese","characters","or",",","inputs","=","{","'text","'",":","'\u5c0f\u9152\u7a9d\u957f\u776b\u6bdbAP\u662f\u4f60\u6700\u7f8e\u7684\u8bb0\u53f7","'",",","'ph_seq","'",":","'","x","iao","j","iu","w","o","ch","ang","ang","j","ie","ie","m","ao","AP","sh","i","n","i","z","ui","m","ei","d","e","j","i","h","ao","'",",","'note_seq","'",":","'","C","#","4\/Db4","C","#","4\/Db4","F","#","4\/Gb4","F","#","4\/Gb4","G","#","4\/Ab4","G","#","4\/Ab4","A","#","4\/Bb4","A","#","4\/Bb4","F","#","4\/Gb4","F","#","4\/Gb4","F","#","4\/Gb4","C","#","4\/Db4","C","#","4\/Db4","C","#","4\/Db4","rest","C","#","4\/Db4","C","#","4\/Db4","A","#","4\/Bb4","A","#","4\/Bb4","G","#","4\/Ab4","G","#","4\/Ab4","A","#","4\/Bb4","A","#","4\/Bb4","G","#","4\/Ab4","G","#","4\/Ab4","F4","F4","C","#","4\/Db4","C","#","4\/Db4","'",",","'note_dur_seq","'",":","'","0.407140","0.407140","0.376190","0.376190","0.242180","0.242180","0.509550","0.509550","0.183420","0.315400","0.315400","0.235020","0.361660","0.361660","0.223070","0.377270","0.377270","0.340550","0.340550","0.299620","0.299620","0.344510","0.344510","0.283770","0.283770","0.323390","0.323390","0.360340","0.360340","'",",","'is_slur_seq","'",":","'","0","0","0","0","0","0","0","0","1","0","0","1","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","'",",","'input_type","'",":","'phoneme'","}","#","input","like","Opencpop","dataset","."]
code: def singing_voice_synthesis(
      self,
      inputs: Dict[str, str],
      sample_num: int = 1,
      save_audio: bool = True,
      save_dir: str = "outputs",
  ) -> Dict[str, Union[List[List[int]], int]]:
      """
      inputs = {
          'text': '小酒窝长睫毛AP是你最美的记号',
          'notes': 'C#4/Db4 | F#4/Gb4 | G#4/Ab4 | A#4/Bb4 F#4/Gb4 | F#4/Gb4 C#4/Db4 | C#4/Db4 | rest | C#4/Db4 | A#4/Bb4 | G#4/Ab4 | A#4/Bb4 | G#4/Ab4 | F4 | C#4/Db4',
          'notes_duration': '0.407140 | 0.376190 | 0.242180 | 0.509550 0.183420 | 0.315400 0.235020 | 0.361660 | 0.223070 | 0.377270 | 0.340550 | 0.299620 | 0.344510 | 0.283770 | 0.323390 | 0.360340',
          'input_type': 'word'
      }  # user input: Chinese characters
      or,
      inputs = {
          'text': '小酒窝长睫毛AP是你最美的记号',
          'ph_seq': 'x iao j iu w o ch ang ang j ie ie m ao AP sh i n i z ui m ei d e j i h ao',
          'note_seq': 'C#4/Db4 C#4/Db4 F#4/Gb4 F#4/Gb4 G#4/Ab4 G#4/Ab4 A#4/Bb4 A#4/Bb4 F#4/Gb4 F#4/Gb4 F#4/Gb4 C#4/Db4 C#4/Db4 C#4/Db4 rest C#4/Db4 C#4/Db4 A#4/Bb4 A#4/Bb4 G#4/Ab4 G#4/Ab4 A#4/Bb4 A#4/Bb4 G#4/Ab4 G#4/Ab4 F4 F4 C#4/Db4 C#4/Db4',
          'note_dur_seq': '0.407140 0.407140 0.376190 0.376190 0.242180 0.242180 0.509550 0.509550 0.183420 0.315400 0.315400 0.235020 0.361660 0.361660 0.223070 0.377270 0.377270 0.340550 0.340550 0.299620 0.299620 0.344510 0.344510 0.283770 0.283770 0.323390 0.323390 0.360340 0.360340',
          'is_slur_seq': '0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0',
          'input_type': 'phoneme'
      }  # input like Opencpop dataset.
      """
      outputs = []
      for i in range(sample_num):
          output = self.infer.infer_once(inputs)
          os.makedirs(save_dir, exist_ok=True)
          if save_audio:
              save_wav(
                  output,
                  os.path.join(
                      save_dir, "%d_%d.wav" % (i, int(time.time()))
                  ),
                  hparams["audio_sample_rate"],
              )
          outputs.append(output.tolist())
      return {
          "wavs": outputs,
          "sample_rate": hparams["audio_sample_rate"],
      }
  
file_path: PaddleHub/modules/audio/svs/diffsinger/module.py
imports: import argparse
  import os
  import time
  from typing import Dict
  from typing import List
  from typing import Union
  from .infer import Infer
  from .utils.audio import save_wav
  from .utils.hparams import hparams
  from .utils.hparams import set_hparams
  from paddlehub.module.module import moduleinfo
  from paddlehub.module.module import runnable
  from paddlehub.module.module import serving
label_desc: Use image node_id 2 for calling the DiffSinger obj's underlying member method code with example usage: obj.singing_voice_synthesis(inputs, sample_num, save_audio, save_dir) and returns: dict