diff --git a/tortoise/data/layman.txt b/tortoise/data/layman.txt new file mode 100644 index 0000000..e69de29 diff --git a/tortoise/read.py b/tortoise/read.py index 9ee9ad6..e89bbc9 100644 --- a/tortoise/read.py +++ b/tortoise/read.py @@ -48,14 +48,20 @@ if __name__ == '__main__': if regenerate is not None: regenerate = [int(e) for e in regenerate.split(',')] + # Process text + with open(args.textfile, 'r', encoding='utf-8') as f: + text = ' '.join([l for l in f.readlines()]) + if '|' in text: + print("Found the '|' character in your text, which I will use as a cue for where to split it up. If this was not" + "your intent, please remove all '|' characters from the input.") + texts = text.split('|') + else: + texts = split_and_recombine_text(text) + for selected_voice in selected_voices: voice_outpath = os.path.join(outpath, selected_voice) os.makedirs(voice_outpath, exist_ok=True) - with open(args.textfile, 'r', encoding='utf-8') as f: - text = ''.join([l for l in f.readlines()]) - texts = split_and_recombine_text(text) - if '&' in selected_voice: voice_sel = selected_voice.split('&') else: