JarodMica / audiobook_maker

GNU General Public License v3.0
316 stars 51 forks source link

Runtime StyleTTS Ntlk 'punkt_tab' problem #88

Closed cappah closed 3 days ago

cappah commented 1 week ago

I resolved the issue in the comment about the Runtime error by moving the package directly into the C-drive, where prior, I had it two folders deep. This allowed the finish_styletts_install to work properly. The F5TTS worked as shown, but when it came to testing StyleTTS2, I get this error about NLTK:

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:

edbartz commented 6 days ago

I am experiencing the same problem. Strangely enough, my manually installed styletts_webui version works fine. That version uses my main python install, not the package audiobook maker copy of python. I also went to appdata/roaming, where nltk_data gets installed, and copied it to ...audiobook_maker\runtime\nltk_data. To no avail.

edbartz commented 5 days ago

for what it is worth, I did the following: Open terminal window in audiobook maker home directory. enter: runtime/python.exe import nltk nltk.download('punkt_tab')

This fixed my problem with it. Now why this worked, but not python.exe, import nltk nltk.download('punkt_tab')

I don't know. Perhaps a environment variable issue.

Now if I can just figure out why the voices are high pitched with styletts2 using the audiobook maker, but not with the styletts2 webui, I will be in business. Jarod, your voice is soprano in styletts2.

Ed

JarodMica commented 5 days ago

for what it is worth, I did the following: Open terminal window in audiobook maker home directory. enter: runtime/python.exe import nltk nltk.download('punkt_tab')

Ugh, I was kinda afraid this issue might appear, I do this already in the finish styletts2 bat file, idk why it wants the user to do it in the terminal without the batch script but that is something I'll have to figure out

Now if I can just figure out why the voices are high pitched with styletts2 using the audiobook maker, but not with the styletts2 webui, I will be in business. Jarod, your voice is soprano in styletts2.

I'd love to hear a sample, it was working fine on my end so I'm not too sure what is happening here! Vocaroo is an easy site to upload audio files to if you wanna just share a link

edbartz commented 5 days ago

I will make you a sample, if you can tell me how to send it.

Also, I am finally trying to play with the code. So, if I can figure things out enough (the obfuscation is killing me at the moment, I am trying to see how the setting file is built, and where) I will add my word replacement code, and send it on to you. I notice some one is asking for it. I figure it needs to be engine, if not voice dependent. We will see what I can do.

cappah commented 5 days ago

for what it is worth, I did the following: Open terminal window in audiobook maker home directory. enter: runtime/python.exe import nltk nltk.download('punkt_tab')

This fixed my problem with it. Now why this worked, but not python.exe, import nltk nltk.download('punkt_tab')

I don't know. Perhaps a environment variable issue. Ed

That worked for me, except I went directly into the runtime folder to run python. Also my models don't have the issue of high-pitched voices. My only issue now is that for each voice I'm using, the wav files must be jarod.wav to work lol

edbartz commented 4 days ago

Jarod, I sent you two voice samples. Your voice from the audiobook maker, and from your styleTTS2-webUI.
Ed

edbartz commented 4 days ago

Jarrod, I just noticed something, download_punkt.py has:

import nltk nltk.download('punkt')

but that is not what we are asked for, it was: import nltk nltk.download('punkt_tab') Ed

JarodMica commented 4 days ago

Jarod, I sent you two voice samples. Your voice from the audiobook maker, and from your styleTTS2-webUI. Ed

I listened to them - ODD, they use the exact same styletts package, so gonan have to investigaat a bit. That's how it sounded in the demo video as well. Does it happen with other voices or models?

JarodMica commented 4 days ago

Jarrod, I just noticed something, download_punkt.py has:

import nltk nltk.download('punkt')

but that is not what we are asked for, it was: import nltk nltk.download('punkt_tab') Ed

Hmm, I'll look into this. I also show people in the video to install 'punkt'

edbartz commented 3 days ago

I sent some more samples. Including some using the jarod_sample from the packaged webui.

JarodMica commented 3 days ago

I sent some more samples. Including some using the jarod_sample from the packaged webui.

Honestly, I'm not too sure what is going on here! I just tested on my computer, same file, same settings, same seed for both the ABM and Webui and they sound exactly the same. If it's only on my voice, I'm not going to worry about it too much - it seems to work fine with other models or voices so I'm going to leave it as that for now. If you run into any other cases, please open a new issue so that I can tag it correctly as well!

JarodMica commented 3 days ago

Alright, this should be fixed in the latest downloadable package - working on some other things before I update the package and reupload, so it should be in there by end of night

JarodMica commented 3 days ago

The latest package is uploading, so it should be downloadable in about an hour or so so closing this issue as resolved. Let me know if you run into any additional issues!

edbartz commented 2 days ago

This seems fixed Thanks Ed