ebook2audiobook: error on basic command

/home/src/AI/ebook2audiobookXTTS/env_py311/lib64/python3.11/site-packages/torch/cuda/init.py:654: UserWarning: Can’t initialize NVML warnings.warn(“Can’t initialize NVML”)

Using model: xtts /home/src/AI/ebook2audiobookXTTS/env_py311/lib64/python3.11/site-packages/TTS/utils/io.py:54: FutureWarning: You are using torch.load with weights_only=False (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for weights_only will be flipped to True. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via torch.serialization.add_safe_globals. We recommend you start setting weights_only=True for any use case where you don’t have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature. return torch.load(f, map_location=map_location, **kwargs) GPT2InferenceModel has generative capabilities, as prepare_inputs_for_generation is explicitly overwritten. However, it doesn’t directly inherit from GenerationMixin. From 👉v4.50👈 onwards, PreTrainedModel will NOT inherit from GenerationMixin, and this model will lose the ability to call generate and other related functions.

  • If you’re using trust_remote_code=True, you can get rid of this warning by loading the model with an auto class. See https://huggingface.co/docs/transformers/en/model_doc/auto#auto-classes
  • If you are the owner of the model architecture code, please modify your model class such that it inherits from GenerationMixin (after PreTrainedModel, otherwise you’ll get an exception).
  • If you are not the owner of the model architecture class, please contact the model code owner to update it. Traceback (most recent call last): File “/home/src/AI/ebook2audiobookXTTS/ebook2audiobook.py”, line 461, in <module> convert_chapters_to_audio(chapters_directory, output_audio_directory, target_voice, language) File “/home/src/AI/ebook2audiobookXTTS/ebook2audiobook.py”, line 412, in convert_chapters_to_audio sentences = sent_tokenize(chapter_text, language=‘italian’ if language == ‘it’ else ‘english’) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/home/src/AI/ebook2audiobookXTTS/env_py311/lib64/python3.11/site-packages/nltk/tokenize/init.py”, line 119, in sent_tokenize tokenizer = _get_punkt_tokenizer(language) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/home/src/AI/ebook2audiobookXTTS/env_py311/lib64/python3.11/site-packages/nltk/tokenize/init.py”, line 105, in _get_punkt_tokenizer return PunktTokenizer(language) ^^^^^^^^^^^^^^^^^^^^^^^^ File “/home/src/AI/ebook2audiobookXTTS/env_py311/lib64/python3.11/site-packages/nltk/tokenize/punkt.py”, line 1744, in init self.load_lang(lang) File “/home/src/AI/ebook2audiobookXTTS/env_py311/lib64/python3.11/site-packages/nltk/tokenize/punkt.py”, line 1749, in load_lang lang_dir = find(f"tokenizers/punkt_tab/{lang}/") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/home/src/AI/ebook2audiobookXTTS/env_py311/lib64/python3.11/site-packages/nltk/data.py”, line 579, in find raise LookupError(resource_not_found) LookupError:

Resource punkt_tab not found. Please use the NLTK Downloader to obtain the resource:

import nltk nltk.download(‘punkt_tab’)

For more information see: https://www.nltk.org/data.html

Attempted to load tokenizers/punkt_tab/english/

Searched in: - ‘/root/nltk_data’ - ‘/home/src/AI/ebook2audiobookXTTS/env_py311/nltk_data’ - ‘/home/src/AI/ebook2audiobookXTTS/env_py311/share/nltk_data’ - ‘/home/src/AI/ebook2audiobookXTTS/env_py311/lib/nltk_data’ - ‘/usr/share/nltk_data’ - ‘/usr/local/share/nltk_data’ - ‘/usr/lib/nltk_data’ - ‘/usr/local/lib/nltk_data’


any idea how to solve it?

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 32 (20 by maintainers)

Commits related to this issue

Most upvoted comments

–device [“gpu”,“cpu”] added if params does not exists or if params is gpu but no gpu avaliable so it will be “cpu” I made also some more tolerant params behavior concerning --headless and --custom*, I will do a full explanation of the changes once the PR will be done. btw, if you think the PR will be too shocking for you (I mean all the code refactored) so maybe I can create a fresh new repo and work in parallel with your repo without to disturb your habits…

lol yup