Advertisement
progressor1322

Tortoise TTS instructions

Jun 29th, 2022 (edited)
2,195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.84 KB | None | 0 0
  1. Keep in mind that I don't know much about any of this myself, this is just what I did to make this work.
  2. If you are on Windows and your GPU is NVidia, this should work.
  3. First, you will need to install Anaconda.
  4. https://www.anaconda.com/products/distribution
  5. After you install it, run Anaconda Prompt (type it into start menu search to find it).
  6. This is where you will be doing most of the stuff. (this and managing files on your drive).
  7.  
  8. Managing separate environments.
  9.  
  10. I don't know much about this. I didn't do this part myself and Tortoise still works, it uses default "base" environment.
  11. I'm guessing you need this for the sake of organisation and managing separate installs with different versions of... whatever.
  12. If you gonna do this, consult with this page:
  13. https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html
  14. You will need to both create and activate the environment.
  15. Don't know if things will be different if you will do this, probably not.
  16.  
  17. Next, install pytorch.
  18. For that, while in Anaconda prompt, enter command:
  19.  
  20. conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch
  21.  
  22. And press Enter.Wait for it to install, it might take a while.
  23. IIRC, it will ask you to confirm, so type y and press enter.
  24. You can get this command or a command for a different OS and environment programs from this page:
  25. https://pytorch.org/get-started/locally/
  26.  
  27. After this is done, enter a command:
  28.  
  29. conda install -c conda-forge pysoundfile
  30.  
  31. And press enter. Then, enter:
  32.  
  33. git clone https://github.com/neonbjb/tortoise-tts.git
  34.  
  35. And press Enter. Then, enter:
  36.  
  37. cd tortoise-tts
  38.  
  39. And press Enter. Remember this command, because you will have to enter it in the beginning of each session of using Tortoise. Then, enter:
  40.  
  41. python -m pip install -r ./requirements.txt
  42.  
  43. And press enter, then this:
  44.  
  45. python setup.py install
  46.  
  47. And again, press Enter. You'll have to wait after you enter each command for it to finish what it's doing.
  48. After all this there should appear a folder named 'tortoise-tts' on your drive.
  49. 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.
  50. This folder contains Tortoise scripts and data, including "voices" folder with all the voice sample files (tortoise-tts/tortoise/voices/).
  51. You can drop here your own custom sample files (several .wav files, around 10 sec long, 22050 bitrate).
  52. 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.
  53.  
  54. So now you should be able to use TTS. Each time you open Anaconda Prompt after this moment, you will have to first enter:
  55.  
  56. cd tortoise-tts
  57.  
  58. in order to navigate to your Tortoise folder. After that, to use Tortoise, enter:
  59.  
  60. python tortoise/do_tts.py --text "your text" --voice emma --preset fast
  61.  
  62. 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').
  63. Different presets take more time and generally give cleaner audio quality, but not guaranteed.
  64. 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.
  65.  
  66. For large amount of text you will need to use:
  67.  
  68. python tortoise/read.py --textfile script.txt --voice emma --preset fast
  69.  
  70. Where 'script.txt' is the name of the .txt file with your text, which you will have to put into 'tortoise-tts' folder.
  71.  
  72. This is all I can say right now, hope it will be helpful.
  73. Github page of Tortoise TTS with the original guide and other information:
  74. https://github.com/neonbjb/tortoise-tts
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement