From 7dd2fd836cb99c6577452e0d749debedbe1eaf96 Mon Sep 17 00:00:00 2001 From: Michael Andrew Date: Fri, 1 Nov 2024 01:30:56 +1300 Subject: [PATCH] Fix for missing pitch when calling run_rvc - Adds the missing pitch argument when calling `run_rvc()`. Previously this was failing when RVC was enabled and TTS was generated using the OpenAI compatible API interface. --- tts_server.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tts_server.py b/tts_server.py index 1f115b6..83fe497 100644 --- a/tts_server.py +++ b/tts_server.py @@ -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