Merge pull request #393 from UXVirtual/rvc-tts-server-fix

Fix for missing pitch when calling run_rvc OpenAI endpoint
This commit is contained in:
erew123 authored and GitHub committed 2024-10-31 15:52:44 +00:00
commit d7ac6c401a
1 file changed
+2 -1
+2 -1
View File
@@ -859,7 +859,8 @@ async def openai_tts_generate(request: Request):
else:
print(f"[{branding}Debug] send to rvc") if debug_openai else None
pth_path = this_dir / "models" / "rvc_voices" / rvc_settings["rvc_char_model_file"]
run_rvc(output_file_path, pth_path, infer_pipeline)
pitch = rvc_settings["pitch"]
run_rvc(output_file_path, pth_path, pitch, infer_pipeline)
# Transcode the audio to the requested format
transcoded_file_path = await transcode_for_openai(output_file_path, response_format)
print(f"[{branding}Debug] Audio transcoded to: {transcoded_file_path}") if debug_openai else None