patrickenfuego / Chapterize-Audiobooks

Split a single, monolithic mp3 audiobook file into chapters using Machine Learning and ffmpeg.
Apache License 2.0
86 stars 14 forks source link

Failure downloading model #15

Open Savanta opened 11 months ago

Savanta commented 11 months ago

I got the error:

Traceback (most recent call last):
  File "/home/savant/Projects/Chapterize-Audiobooks/chapterize_ab.py", line 1078, in <module>
    main()
  File "/home/savant/Projects/Chapterize-Audiobooks/chapterize_ab.py", line 970, in main
    audiobook_file, in_metadata, lang, model_name, model_type, cue_file = parse_args()
  File "/home/savant/Projects/Chapterize-Audiobooks/chapterize_ab.py", line 316, in parse_args
    args.audiobook.with_suffix('.cue').exists()
AttributeError: 'NoneType' object has no attribute 'with_suffix'

Command: python3.10 chapterize_ab.py -dm -l pl

Executed inside venv OS: debian 11 Installed dependencies using pip3.10 install -r requirements.txt

pip log:

Requirement already satisfied: rich>=12.6.0 in ./lib/python3.10/site-packages (from -r requirements.txt (line 1)) (13.5.3)
Requirement already satisfied: vosk>=0.3.44 in ./lib/python3.10/site-packages (from -r requirements.txt (line 2)) (0.3.45)
Requirement already satisfied: requests>=2.28.0 in ./lib/python3.10/site-packages (from -r requirements.txt (line 3)) (2.31.0)
Requirement already satisfied: markdown-it-py>=2.2.0 in ./lib/python3.10/site-packages (from rich>=12.6.0->-r requirements.txt (line 1)) (3.0.0)
Requirement already satisfied: pygments<3.0.0,>=2.13.0 in ./lib/python3.10/site-packages (from rich>=12.6.0->-r requirements.txt (line 1)) (2.16.1)
Requirement already satisfied: cffi>=1.0 in ./lib/python3.10/site-packages (from vosk>=0.3.44->-r requirements.txt (line 2)) (1.16.0)
Requirement already satisfied: tqdm in ./lib/python3.10/site-packages (from vosk>=0.3.44->-r requirements.txt (line 2)) (4.66.1)
Requirement already satisfied: srt in ./lib/python3.10/site-packages (from vosk>=0.3.44->-r requirements.txt (line 2)) (3.5.3)
Requirement already satisfied: websockets in ./lib/python3.10/site-packages (from vosk>=0.3.44->-r requirements.txt (line 2)) (11.0.3)
Requirement already satisfied: certifi>=2017.4.17 in ./lib/python3.10/site-packages (from requests>=2.28.0->-r requirements.txt (line 3)) (2023.7.22)
Requirement already satisfied: idna<4,>=2.5 in ./lib/python3.10/site-packages (from requests>=2.28.0->-r requirements.txt (line 3)) (3.4)
Requirement already satisfied: charset-normalizer<4,>=2 in ./lib/python3.10/site-packages (from requests>=2.28.0->-r requirements.txt (line 3)) (3.2.0)
Requirement already satisfied: urllib3<3,>=1.21.1 in ./lib/python3.10/site-packages (from requests>=2.28.0->-r requirements.txt (line 3)) (2.0.5)
Requirement already satisfied: pycparser in ./lib/python3.10/site-packages (from cffi>=1.0->vosk>=0.3.44->-r requirements.txt (line 2)) (2.21)
Requirement already satisfied: mdurl~=0.1 in ./lib/python3.10/site-packages (from markdown-it-py>=2.2.0->rich>=12.6.0->-r requirements.txt (line 1)) (0.1.2)
WARNING: You are using pip version 21.2.3; however, version 23.2.1 is available.
You should consider upgrading via the '/home/savant/Projects/Chapterize-Audiobooks/bin/python3.10 -m pip install --upgrade pip' command.
patrickenfuego commented 10 months ago

Sorry for the late response. If you're still having issues, can you provide your command line? You can always download the model manually if needed (I provide an English model as well). I just tested it and it's working on my end, albeit Windows 11. I have a few Debian boxes I can test on, although not sure when I'll have the time right now.

patrickenfuego commented 10 months ago

Also, please see this issue. This sounds similar to a PYTHONPATH misconfiguration.

Savanta commented 10 months ago

If you're still having issues, can you provide your command line?

You mean shell? It's zsh

Problem persists with python path env

patrickenfuego commented 10 months ago

I meant the actual command line you're running inside zsh.

Savanta commented 10 months ago

Command: python3.10 chapterize_ab.py -dm -l pl

patrickenfuego commented 10 months ago

Just an update - I have not forgotten about this, I've just been very busy. I will have time to test it in a few weeks on a Deb 11 system. Until then, I encourage you to download the model manually from Vosk's website and place it in the models directory.

Also note that there are no excluded phrases or chapter separators for Polish - if you wish to contribute some that would be most welcome!