This commit is contained in:
umoubuton 2023-07-05 22:01:03 +08:00 committed by GitHub
parent 9f13c8e43c
commit d4f6b7361f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -214,9 +214,9 @@ def vc_fn2(_text, _lang, _gender, _rate, _volume, sid, output_format, vc_transfo
_volume = f"+{int(_volume*100)}%" if _volume >= 0 else f"{int(_volume*100)}%"
if _lang == "Auto":
_gender = "Male" if _gender == "" else "Female"
subprocess.run([r"workenv\python.exe", "edgetts/tts.py", _text, _lang, _rate, _volume, _gender])
subprocess.run([r"python", "edgetts/tts.py", _text, _lang, _rate, _volume, _gender])
else:
subprocess.run([r"workenv\python.exe", "edgetts/tts.py", _text, _lang, _rate, _volume])
subprocess.run([r"python", "edgetts/tts.py", _text, _lang, _rate, _volume])
target_sr = 44100
y, sr = librosa.load("tts.wav")
resampled_y = librosa.resample(y, orig_sr=sr, target_sr=target_sr)