From 9ec88d9444b90e28bac1e015e99c328961ca7121 Mon Sep 17 00:00:00 2001 From: mrq Date: Fri, 19 Jul 2024 21:07:17 -0500 Subject: [PATCH] validated passing URI path for assets instead of base64 encoding them --- vall_e/demo.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/vall_e/demo.py b/vall_e/demo.py index 9fe8645..e6583b4 100644 --- a/vall_e/demo.py +++ b/vall_e/demo.py @@ -120,7 +120,7 @@ def main(): entries = [ f'{text}'+ "".join( [ - f'' + f'' for audio in audios ] )+ '' @@ -158,14 +158,17 @@ def main(): reference = dir / "reference.wav" out_path = dir / "out" / "ours.wav" - decode_to_file( batch["proms"].to("cuda"), prompt, device="cuda" ) - decode_to_file( batch["resps"].to("cuda"), reference, device="cuda" ) - samples.append(( text, [ prompt, reference, out_path ] )) + if args.skip_existing and out_path.exists(): + continue + + decode_to_file( batch["proms"].to("cuda"), prompt, device="cuda" ) + decode_to_file( batch["resps"].to("cuda"), reference, device="cuda" ) + tts.inference( text=text, references=[prompt], @@ -187,7 +190,7 @@ def main(): samples = [ f'{text}'+ "".join( [ - f'' + f'' for audio in audios ] )+ ''