mirror of
https://github.com/santinic/audiblez.git
synced 2025-08-31 22:09:26 +00:00
fix
This commit is contained in:
parent
148f511831
commit
89bc29908c
1 changed files with 6 additions and 0 deletions
|
@ -105,6 +105,7 @@ def main(file_path, voice, pick_manually, speed, max_chapters=None):
|
|||
create_index_file(title, creator, chapter_wav_files)
|
||||
create_m4b(chapter_wav_files, filename, cover_image)
|
||||
|
||||
|
||||
def find_cover(book):
|
||||
def is_image(item):
|
||||
return item is not None and item.media_type.startswith('image/')
|
||||
|
@ -127,6 +128,7 @@ def find_cover(book):
|
|||
|
||||
return None
|
||||
|
||||
|
||||
def print_selected_chapters(document_chapters, chapters):
|
||||
print(tabulate([
|
||||
[i, c.get_name(), len(c.extracted_text), '✅' if c in chapters else '', chapter_beginning_one_liner(c)]
|
||||
|
@ -300,6 +302,10 @@ def cli_main():
|
|||
else:
|
||||
print('CUDA GPU not available. Defaulting to CPU')
|
||||
|
||||
if not spacy.util.is_package("en_core_web_sm"):
|
||||
print("Downloading Spacy model 'en_core_web_sm'...")
|
||||
spacy.cli.download("en_core_web_sm")
|
||||
|
||||
main(args.epub_file_path, args.voice, args.pick, args.speed)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue