def METHOD_NAME(self, text, wav_name, out_wav_dir, exp_dir='temp'):
    voc = "hifigan_aishell3"
    dump_dir = os.path.join(exp_dir, 'dump')
    output_dir = os.path.join(exp_dir, 'exp')
    text_path = os.path.join(exp_dir, 'sentences.txt')
    lang = "zh"
    ngpu = get_ngpu()
    model_path = f"{output_dir}/checkpoints"
    ckpt = find_max_ckpt(model_path)
    # 生成对应的语句
    with open(text_path, "w", encoding='utf8') as f:
        f.write(wav_name + " " + text)
    cmd = f"""
        FLAGS_allocator_strategy=naive_best_fit \
        FLAGS_fraction_of_gpu_memory_to_use=0.01 \
        python3 {self.BIN_DIR}/../synthesize_e2e.py \
            --am=fastspeech2_aishell3 \
            --am_config={self.pretrained_model_dir}/default.yaml \
            --am_ckpt={output_dir}/checkpoints/snapshot_iter_{ckpt}.pdz \
            --am_stat={self.pretrained_model_dir}/speech_stats.npy \
            --voc={voc} \
            --voc_config={self.voc_model_dir}/default.yaml \
            --voc_ckpt={self.voc_model_dir}/snapshot_iter_2500000.pdz \
            --voc_stat={self.voc_model_dir}/feats_stats.npy \
            --lang={lang} \
            --text={text_path} \
            --output_dir={out_wav_dir} \
            --phones_dict={dump_dir}/phone_id_map.txt \
            --speaker_dict={dump_dir}/speaker_id_map.txt \
            --spk_id=0 \
            --ngpu={ngpu}
    """
    out_path = os.path.join(out_wav_dir, f"{wav_name}.wav")
    return run_cmd(cmd, out_path)