Skip to content

Commit

Permalink
Update ge2e_clone.py (PaddlePaddle#3517)
Browse files Browse the repository at this point in the history
修复在windows上的多空格错误
  • Loading branch information
skyboooox authored and luotao1 committed Jun 11, 2024
1 parent 43ffb6f commit e7c632f
Showing 1 changed file with 3 additions and 17 deletions.
20 changes: 3 additions & 17 deletions demos/speech_web/speech_server/src/ge2e_clone.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,9 @@ def vc(self, text, input_wav, out_wav):
output_dir = os.path.dirname(out_wav)
ngpu = get_ngpu()

cmd = f"""
python3 {self.BIN_DIR}/voice_cloning.py \
--am={self.am} \
--am_config={self.am_config} \
--am_ckpt={self.am_ckpt} \
--am_stat={self.am_stat} \
--voc={self.voc} \
--voc_config={self.voc_config} \
--voc_ckpt={self.voc_ckpt} \
--voc_stat={self.voc_stat} \
--ge2e_params_path={self.ge2e_params_path} \
--text="{text}" \
--input-dir={ref_audio_dir} \
--output-dir={output_dir} \
--phones-dict={self.phones_dict} \
--ngpu={ngpu}
"""
cmd = f"""python {self.BIN_DIR}/voice_cloning.py --am={self.am} --am_config={self.am_config} --am_ckpt={self.am_ckpt} --am_stat={self.am_stat} --voc={self.voc} --voc_config={self.voc_config} --voc_ckpt={self.voc_ckpt} --voc_stat={self.voc_stat} --ge2e_params_path={self.ge2e_params_path} --text="{text}" --input-dir={ref_audio_dir} --output-dir={output_dir} --phones-dict={self.phones_dict} --ngpu={ngpu}"""

print(cmd)

output_name = os.path.join(output_dir, full_file_name)
return run_cmd(cmd, output_name=output_name)

0 comments on commit e7c632f

Please sign in to comment.