feat: display demo file used when no input

This commit is contained in:
ayo 2026-06-08 14:32:07 +02:00
parent b8e23fc984
commit 2871d9fb83

3
tts.py
View file

@ -177,7 +177,7 @@ def main():
if not default_exists: if not default_exists:
script_dir = os.path.dirname(os.path.realpath(__file__)) script_dir = os.path.dirname(os.path.realpath(__file__))
file_path = os.path.join(script_dir, 'tongue-twister.txt') file_path = os.path.join(script_dir, 'tongue-twister.txt')
print(f"Using demo file: {file_path}") print(f"Using demo file: {file_path}")
if os.path.isfile(file_path): if os.path.isfile(file_path):
directory, file_name = os.path.split(file_path) directory, file_name = os.path.split(file_path)
@ -227,6 +227,7 @@ def main():
start_time = time() start_time = time()
output_files = generate_audio(generator, name, voice) output_files = generate_audio(generator, name, voice)
generation_time = time() - start_time generation_time = time() - start_time
if len(output_files) > 0: if len(output_files) > 0:
directory,f = os.path.split(output_files[0]) directory,f = os.path.split(output_files[0])
else: else: