konverner commited on
Commit
cd8906c
1 Parent(s): a0f3dfc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -10,8 +10,10 @@ def greet(text, audio_file_path):
10
  text = "%s" % text
11
  audio_file_path = "%s" % audio_file_path
12
  out_path = Path("scripts/output/audio.wav")
 
13
  os.system(f'python scripts/train.py --audio_path {audio_file_path}\
14
  --output_dir "models"')
 
15
  os.system(f'python scripts/cloning_inference.py --model_path "models/microsoft_speecht5_tts_{Path(audio_file_path).stem}"\
16
  --input_text "{text}" --output_path "{str(out_path)}"')
17
  return out_path
 
10
  text = "%s" % text
11
  audio_file_path = "%s" % audio_file_path
12
  out_path = Path("scripts/output/audio.wav")
13
+ progress(0.2, desc="Training voice embedding... (aprx 20 mins)")
14
  os.system(f'python scripts/train.py --audio_path {audio_file_path}\
15
  --output_dir "models"')
16
+ progress(0.9, desc="Generating voice...")
17
  os.system(f'python scripts/cloning_inference.py --model_path "models/microsoft_speecht5_tts_{Path(audio_file_path).stem}"\
18
  --input_text "{text}" --output_path "{str(out_path)}"')
19
  return out_path