XiaoHei Studio commited on
Commit
907324f
1 Parent(s): e86a276

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -531,9 +531,9 @@ def tts_fn(_text, _gender, _lang, _rate, _volume, output_format, sid, vc_transfo
531
  _volume = f"+{int(_volume*100)}%" if _volume >= 0 else f"{int(_volume*100)}%"
532
  if _lang == "Auto":
533
  _gender = "Male" if _gender == "男" else "Female"
534
- subprocess.run([r".\workenv\python.exe", "tts.py", _text, _lang, _rate, _volume, _gender])
535
  else:
536
- subprocess.run([r".\workenv\python.exe", "tts.py", _text, _lang, _rate, _volume])
537
  target_sr = 44100
538
  y, sr = librosa.load("tts.wav")
539
  resampled_y = librosa.resample(y, orig_sr=sr, target_sr=target_sr)
 
531
  _volume = f"+{int(_volume*100)}%" if _volume >= 0 else f"{int(_volume*100)}%"
532
  if _lang == "Auto":
533
  _gender = "Male" if _gender == "男" else "Female"
534
+ subprocess.run([r"python", "tts.py", _text, _lang, _rate, _volume, _gender])
535
  else:
536
+ subprocess.run([r"python", "tts.py", _text, _lang, _rate, _volume])
537
  target_sr = 44100
538
  y, sr = librosa.load("tts.wav")
539
  resampled_y = librosa.resample(y, orig_sr=sr, target_sr=target_sr)