aedocw / epub2tts

Turn an epub or text file into an audiobook
Apache License 2.0
426 stars 43 forks source link

error ModuleNotFoundError: No module named 'TTS.tts.configs.xtts_config' #200

Closed unifirer closed 3 months ago

unifirer commented 5 months ago

no errors during setup but when i run epub2tts --xtts yr22k13s.wav --language 'en' Gritcleaned.txt

i GET

/usr/lib/python3/dist-packages/requests/init.py:89: RequestsDependencyWarning: urllib3 (2.1.0) or chardet (3.0.4) doesn't match a supported version! warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported " Traceback (most recent call last): File "/home/yu/.local/bin/epub2tts", line 5, in from epub2tts import main File "/home/yu/.local/lib/python3.8/site-packages/epub2tts.py", line 26, in from TTS.tts.configs.xtts_config import XttsConfig ModuleNotFoundError: No module named 'TTS.tts.configs.xtts_config'

running on zorin linux, latest version, TYVM

aedocw commented 5 months ago

Interesting, it looks like it might not be finding something that should have come with the TTS install.

Can you try running tts from the command line, like this command to list their studio models? tts --model_name tts_models/multilingual/multi-dataset/xtts_v2 --list_speaker_idx

If that doesn't work, I guess it will depend on what error you get. The nuclear option would be to try pip install TTS --upgrade --force-reinstall which should re-install Coqui TTS and all its dependencies.

Let me know what you find and I'll try to help.

unifirer commented 5 months ago

after running tts --model_name tts_models/multilingual/multi-dataset/xtts_v2 --list_speaker_idx

it started downloading the model, i guess the model isnt included in the installation therefore it didnt create the file needed

then outputs msg

Model's license - CPML

Check https://coqui.ai/cpml.txt for more info. Using model: xtts Available speaker ids: (Set --speaker_idx flag to one of these values to use the multi-speaker model. dict_keys(['Claribel Dervla', 'Daisy Studious', 'Gracie Wise', 'Tammie Ema', 'Alison Dietlinde', 'Ana Florence', 'Annmarie Nele', 'Asya Anara', 'Brenda Stern', 'Gitta Nikolina', 'Henriette Usha', 'Sofia Hellen', 'Tammy Grit', 'Tanja Adelina', 'Vjollca Johnnie', 'Andrew Chipper', 'Badr Odhiambo', 'Dionisio Schuyler', 'Royston Min', 'Viktor Eka', 'Abrahan Mack', 'Adde Michal', 'Baldur Sanjin', 'Craig Gutsy', 'Damien Black', 'Gilberto Mathias', 'Ilkin Urbano', 'Kazuhiko Atallah', 'Ludvig Milivoj', 'Suad Qasim', 'Torcull Diarmuid', 'Viktor Menelaos', 'Zacharie Aimilios', 'Nova Hogarth', 'Maja Ruoho', 'Uta Obando', 'Lidiya Szekeres', 'Chandra MacFarland', 'Szofi Granger', 'Camilla Holmström', 'Lilya Stainthorpe', 'Zofija Kendrick', 'Narelle Moon', 'Barbora MacLean', 'Alexandra Hisakawa', 'Alma María', 'Rosemary Okafor', 'Ige Behringer', 'Filip Traverse', 'Damjan Chapman', 'Wulf Carlevaro', 'Aaron Dreschner', 'Kumar Dahl', 'Eugenio Mataracı', 'Ferran Simen', 'Xavier Hayasaka', 'Luis Moray', 'Marcos Rudaski'])

but after completion i get the same error msg

(base) yu@yu-zor:/media/yu/SSD2/audio/AUDIOLINUX/epub2tts/gr$ epub2tts --xtts yr22k13s.wav --language 'en' Gritcleaned.txt /usr/lib/python3/dist-packages/requests/init.py:89: RequestsDependencyWarning: urllib3 (2.1.0) or chardet (3.0.4) doesn't match a supported version! warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported " Traceback (most recent call last): File "/home/yu/.local/bin/epub2tts", line 5, in from epub2tts import main File "/home/yu/.local/lib/python3.8/site-packages/epub2tts.py", line 26, in from TTS.tts.configs.xtts_config import XttsConfig ModuleNotFoundError: No module named 'TTS.tts.configs.xtts_config' (base) yu@yu-zor:/media/yu/SSD2/audio/AUDIOLINUX/epub2tts/gr$

aedocw commented 5 months ago

Grasping at straws now but could you do pip list |egrep "numpy|urllib" and see which versions of numpy and urllib are installed?

If it turns out to be something with this it's going to give me a lot more incentive to switch to pipenv for installations so we can keep compatible versions easily locked in.

danielw97 commented 5 months ago

I might just be muddying the waters here, although unifirer commented 5 days ago • might the fact you're running python 3.8 be the issue? I'm not familiar with the version of Linux you're running so can't comment on that, although you'll of course have versions of packages and compatibilities with a python version that old. From what I've seen coqui tts seems to run fine on python 3.10 and 3.11, and package versions are new enough that it generally runs without a problem.

aedocw commented 5 months ago

Oh @danielw97 good call! I didn't even think about that (yet again, if I moved this to pipenv it would be easier to lock to a python version).

I use python 3.11, and just forget about that. Definitely a good suggestion for you @unifirer - I would suggest using pyenv to use python 3.11 for epub2tts. Let us know if you're able to try that, thanks!

aedocw commented 3 months ago

Added "Required python version is 3.11" to README.