From 45a50d2dbaa35ed79f53afa10b0023ea3cd89a09 Mon Sep 17 00:00:00 2001 From: Michael Chung Date: Mon, 23 Oct 2023 19:58:25 -0400 Subject: [PATCH] Made some fixes to the container. --- tts/VALL-E-X/main.py | 39 ++++++++++++++++++++--------- tts/VALL-E-X/utils/prompt_making.py | 1 + 2 files changed, 28 insertions(+), 12 deletions(-) diff --git a/tts/VALL-E-X/main.py b/tts/VALL-E-X/main.py index e42fec5..67998e2 100755 --- a/tts/VALL-E-X/main.py +++ b/tts/VALL-E-X/main.py @@ -150,22 +150,22 @@ voice_designer = VoiceDesigner() def main(args): - print(args.mode) + print("Starting Inference on Vall-E-X With Inputs") + print(f"Mode: {args.mode}") - print(args.text) - print(args.audio_wav_files) - print(args.whisper_folder_path) - print(args.vocos_folder_path) + print(f"Text: {args.text}") + print(f"List of Files For Create: {args.audio_wav_files}") + print(f"Whisper Folder Path: {args.whisper_folder_path}") + print(f"Vocos Folder Path: {args.vocos_folder_path}") + print(f"Vall-E-X Path: {args.vallex_path}") - print(args.vallex_path) + print(f"Prompt Path: {args.prompt_path}") + print(f"Prompt Name: {args.prompt_name}") - print(args.prompt_path) - print(args.prompt_name) + print(f"Audio Name: {args.audio_name}") + print(f"Audio Path: {args.audio_path}") - print(args.audio_name) - print(args.audio_path) - - print(args.tmp_work_dir) + print(f"Temp Work Dir: {args.tmp_work_dir}") voice_designer.temp_path = pathlib.Path(args.tmp_work_dir) @@ -174,6 +174,7 @@ def main(args): pathlib.Path(args.whisper_folder_path)) if args.mode == 0: # run inference + print("Running Inference") voice_designer.tts_with_prompt(prompt_dir=pathlib.Path(args.prompt_path), prompt_name=pathlib.Path(args.prompt_name), audio_output_path=pathlib.Path(args.audio_path), @@ -234,3 +235,17 @@ if __name__ == "__main__": # create voice example #/home/tensor/code/storyteller/storyteller-ml/tts/VALL-E-X/.venv/bin/python /home/tensor/code/storyteller/storyteller-ml/tts/VALL-E-X/main.py --mode 1 --audio-wav-files "/home/tensor/code/TTSDockerContainer/Vall-E-mount/input/20.wav" "/home/tensor/code/TTSDockerContainer/Vall-E-mount/input/21.wav" --whisper-folder-path "/home/tensor/code/storyteller/storyteller-ml/tts/VALL-E-X/whisper" --whisper-model medium --vocos-folder-path "/home/tensor/code/TTSDockerContainer/Vall-E-mount/models/vocos-encodec-24khz" --vallex-path "/home/tensor/code/TTSDockerContainer/Vall-E-mount/models/vallex-checkpoint.pt" --prompt-path "/home/tensor/code/storyteller/VALL-E-X-TTS-Container/Vall-E-mount/prompts" --prompt-name "test_prompt" --tmp-work-dir "/tmp" + +#/home/tensor/code/storyteller/storyteller-ml/tts/VALL-E-X/.venv/bin/python +#/home/tensor/code/storyteller/storyteller-ml/tts/VALL-E-X/main.py +# --mode 1 +# --audio-wav-files +# "/home/tensor/code/TTSDockerContainer/Vall-E-mount/input/20.wav" +# "/home/tensor/code/TTSDockerContainer/Vall-E-mount/input/21.wav" +# --whisper-folder-path "/home/tensor/code/storyteller/storyteller-ml/tts/VALL-E-X/whisper" +# --whisper-model medium +# --vocos-folder-path "/home/tensor/code/TTSDockerContainer/Vall-E-mount/models/vocos-encodec-24khz" +# --vallex-path "/home/tensor/code/TTSDockerContainer/Vall-E-mount/models/vallex-checkpoint.pt" +# --prompt-path "/home/tensor/code/storyteller/VALL-E-X-TTS-Container/Vall-E-mount/prompts" +# --prompt-name "test_prompt" +# --tmp-work-dir "/tmp" diff --git a/tts/VALL-E-X/utils/prompt_making.py b/tts/VALL-E-X/utils/prompt_making.py index d71a359..41f3848 100644 --- a/tts/VALL-E-X/utils/prompt_making.py +++ b/tts/VALL-E-X/utils/prompt_making.py @@ -84,6 +84,7 @@ def make_prompt(name:pathlib.Path, audio_prompt_path:pathlib.Path,audio_prompt_o else: save_path = os.path.join("./customs/", f"{name}.npz") np.savez(save_path, audio_tokens=audio_tokens, text_tokens=text_tokens, lang_code=lang2code[lang_pr]) + print(f"Embedding Save Path {save_path}") logging.info(f"Successful. Prompt saved to {save_path}") def make_transcript(name, wav, sr, whisper_folder_path: pathlib.Path,transcript=None):