Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Keep in mind that I don't know much about any of this myself, this is just what I did to make this work.
- If you are on Windows and your GPU is NVidia, this should work.
- First, you will need to install Anaconda.
- https://www.anaconda.com/products/distribution
- After you install it, run Anaconda Prompt (type it into start menu search to find it).
- This is where you will be doing most of the stuff. (this and managing files on your drive).
- Managing separate environments.
- I don't know much about this. I didn't do this part myself and Tortoise still works, it uses default "base" environment.
- I'm guessing you need this for the sake of organisation and managing separate installs with different versions of... whatever.
- If you gonna do this, consult with this page:
- https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html
- You will need to both create and activate the environment.
- Don't know if things will be different if you will do this, probably not.
- Next, install pytorch.
- For that, while in Anaconda prompt, enter command:
- conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch
- And press Enter.Wait for it to install, it might take a while.
- IIRC, it will ask you to confirm, so type y and press enter.
- You can get this command or a command for a different OS and environment programs from this page:
- https://pytorch.org/get-started/locally/
- After this is done, enter a command:
- conda install -c conda-forge pysoundfile
- And press enter. Then, enter:
- git clone https://github.com/neonbjb/tortoise-tts.git
- And press Enter. Then, enter:
- cd tortoise-tts
- And press Enter. Remember this command, because you will have to enter it in the beginning of each session of using Tortoise. Then, enter:
- python -m pip install -r ./requirements.txt
- And press enter, then this:
- python setup.py install
- And again, press Enter. You'll have to wait after you enter each command for it to finish what it's doing.
- After all this there should appear a folder named 'tortoise-tts' on your drive.
- For me, since I didn't create a separate environment, it appeared in Users folder. I don't know where it will be if you create a new environment.
- This folder contains Tortoise scripts and data, including "voices" folder with all the voice sample files (tortoise-tts/tortoise/voices/).
- You can drop here your own custom sample files (several .wav files, around 10 sec long, 22050 bitrate).
- The name of the individual folder containing audio files will be the name of the voice that you will have to specify when using Tortoise.
- So now you should be able to use TTS. Each time you open Anaconda Prompt after this moment, you will have to first enter:
- cd tortoise-tts
- in order to navigate to your Tortoise folder. After that, to use Tortoise, enter:
- python tortoise/do_tts.py --text "your text" --voice emma --preset fast
- In this case, 'your text' is your input text prompt, 'emma' is your voice of choice (the name of the folder containing audio files), 'fast' is a preset of quality of generation *'fast', 'standard', or 'high)quality').
- Different presets take more time and generally give cleaner audio quality, but not guaranteed.
- The results by default will be in tortoise-tts/results/, 3 candidates for you to choose from. You can specify a number of candidates by adding '--candidates number' but I think it depends on the amount of VRam, I haven't tried setting up more than 3 candidates.
- For large amount of text you will need to use:
- python tortoise/read.py --textfile script.txt --voice emma --preset fast
- Where 'script.txt' is the name of the .txt file with your text, which you will have to put into 'tortoise-tts' folder.
- This is all I can say right now, hope it will be helpful.
- Github page of Tortoise TTS with the original guide and other information:
- https://github.com/neonbjb/tortoise-tts
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement