aedocw / epub2tts

Turn an epub or text file into an audiobook
Apache License 2.0
445 stars 44 forks source link

BUG: LookupError: Resource punkt not found #100

Closed Omarov3000 closed 7 months ago

Omarov3000 commented 7 months ago

After following MAC OS installation guide

#install dependencies
brew install espeak pyenv ffmpeg mecab
#install epub2tts
git clone https://github.com/aedocw/epub2tts
cd epub2tts
pyenv install 3.11
pyenv local 3.11
#OPTIONAL - install this in a virtual environment
python -m venv .venv && source .venv/bin/activate
pip install .

and running epub2tts my-book.txt I got

LookupError: 
**********************************************************************
  Resource punkt not found.
  Please use the NLTK Downloader to obtain the resource:

  >>> import nltk
  >>> nltk.download('punkt')

After running it in the shell I successfully generated my audiobook. I think this step should be added to the setup script.

P.S. Thank you very much for a really great project 🙂!

aedocw commented 7 months ago

Thanks for such a thorough bug report, it really helps!

I was unable to reproduce this myself, but there's a really easy way I can put in a test to see if this resource is already available, and if not, download it on the fly. I'll throw that in right now.

Thanks again for using it and for reporting the issue - take care!