From 97b46b4afa995b76c436c93b5698a828e6c1daf1 Mon Sep 17 00:00:00 2001 From: Claudio Santini Date: Wed, 19 Feb 2025 22:01:59 +0100 Subject: [PATCH] fix --- audiblez/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/audiblez/core.py b/audiblez/core.py index 594263d..5176e9d 100755 --- a/audiblez/core.py +++ b/audiblez/core.py @@ -99,6 +99,8 @@ def main(file_path, voice, pick_manually, speed, output_folder='.', print('Total words:', len(' '.join(texts).split())) eta = strfdelta((stats.total_chars - stats.processed_chars) / stats.chars_per_sec) print(f'Estimated time remaining (assuming {stats.chars_per_sec} chars/sec): {eta}') + set_espeak_library() + pipeline = KPipeline(lang_code=voice[0]) # a for american or b for british etc. chapter_wav_files = [] for i, chapter in enumerate(selected_chapters, start=1): @@ -121,8 +123,6 @@ def main(file_path, voice, pick_manually, speed, output_folder='.', # add intro text text = f'{title} – {creator}.\n\n' + text start_time = time.time() - set_espeak_library() - pipeline = KPipeline(lang_code=voice[0]) # a for american or b for british etc. if post_event: post_event('CORE_CHAPTER_STARTED', chapter_index=chapter.chapter_index) audio_segments = gen_audio_segments( pipeline, text, voice, speed, stats, post_event=post_event, max_sentences=max_sentences)