Sign inSign up

joshxt/alltalk_tts

By joshxt

β€’Updated over 2 years ago

Image
0

4.3K

joshxt/alltalk_tts repository overview

⁠AllTalk TTS

AllTalk is an updated version of the Coqui_tts extension for Text Generation web UI. Features include:

  • Can be run as a standalone⁠ or part of Text-generation-webui⁠ using the a quick setup utility
  • Model Finetuning: Train the model specifically on a voice of your choosing for better reproduction.
  • Local/Custom models: Use any of the XTTSv2 models (API Local and XTTSv2 Local).
  • Bulk TTS Generator/Editor: Generate hours of TTS into one big file or have something read back to you demo⁠.
  • DeepSpeed: A 2-3x performance boost generating TTS. Screenshot⁠
  • Low VRAM mode: Great for people with small GPU memory or if your VRAM is filled by your LLM.
  • Custom Start-up Settings: Adjust your default start-up settings. Screenshot⁠
  • Narrarator: Use different voices for main character and narration. Example Narration⁠
  • Optional wav file maintenance: Configurable deletion of old output wav files. Screenshot⁠
  • Documentation: Fully documented with a built in webpage. Screenshot⁠
  • Clear Console output: Clear command line output for any warnings or issues.
  • API Suite and 3rd Party support via JSON calls: Can be used with 3rd party applications via JSON calls.
  • SillyTavern integration: Full integration with SillyTavern. Screenshot⁠
⁠Index
β πŸ”„ Feature requests, Updates & Bug fixes

Please check the below link to find a list of all recent updates and changes.

β Β Β Β Β πŸ”„ Updates list & bug fixes list can be found here⁠
β Β Β Β Β πŸ”„ Current Feature request list can be found here⁠

I welcome your input and ideas for new features, suggestions, and improvements. Feel free to share your thoughts and collaborate in the discussions area. If you find this project valuable and would like to show your appreciation, you can make a donation on my Ko-fi⁠ page. Your support goes a long way in ensuring that I can continue to deliver even better features and experiences.

ERROR ImportError: cannot import name 'SampleOutput' from 'transformers.generation.utils' please see this issue here⁠

⁠🟩 Quick Setup (Text-generation-webui & Standalone Installation)

For Windows 10/11 and Linux machines there is a quick setup script. Please note, Python on Windows requires you install the C++ development tools⁠ to compile packages, further details can be found in the help section.

Click to expand the correct section below:

QUICK SETUP - Text-Generation-webui

If you wish to see this as a video, please go here⁠

  1. To download the AllTalk setup you can either:

    • A) Go to the Releases page⁠ and download the latest alltalk_tts.zip then extract it to the text-generation-webui extensions folder
      e.g. \text-generation-webui\extensions\alltalk_tts\.

    • B) Go to a terminal/console, move into the \text-generation-webui\extensions\ folder
      and git clone https://github.com/erew123/alltalk_tts

  2. In a terminal/command prompt, in the text-generation-webui folder you will start its Python environment with either cmd_windows.bat or ./cmd_linux.sh

  3. Move into the AllTalk folder e.g. cd extensions then cd alltalk_tts

  4. Start the AllTalk setup script atsetup.bat or ./atsetup.sh

  5. Follow the on-screen prompts and install the correct requirements files that you need. It's recommended to test AllTalk works before installing DeepSpeed.

    Any time you need to make changes to AllTalk, or use Finetuning etc, always start the Text-generation-webui Python environment first.

    Please read the 🟩 Other installation notes (also additional voices are available there).

    Finetuning & DeepSpeed have other installation requirements (depending on your OS) so please read any instructions in the setup utility and refer back here to this page for detailed instructions (as needed).

QUICK SETUP - Standalone Installation

If you wish to see this as a video, please go here⁠

  1. To download the AllTalk setup you can either:

    • A) Go to the Releases page⁠ and download the latest alltalk_tts.zip and extract it to the folder of your choice
      e.g. C:\myfiles\alltalk_tts\.

    • B) Go to a terminal/console, move into the folder of your choice e.g C:\myfiles\ folder
      and git clone https://github.com/erew123/alltalk_tts

  2. In a terminal/command prompt, move into the AllTalk folder e.g. cd alltalk_tts

  3. Start the AllTalk setup script atsetup.bat or ./atsetup.sh

  4. Follow the on-screen prompts and install the correct requirements files that you need. It's recommended to test AllTalk works before installing DeepSpeed.

    DeepSpeed on Windows machines will be installed as standard. Linux machines have other requirements which are detailed within the setup utility and on this page.

    Please read the 🟩 Other installation notes (also additional voices are available there).

    You cannot have a dash in your folder path e.g. c:\myfiles\alltalk_tts-main so please ensure you remove any - from your folder path. This is a conda specific requirement and will cause AllTalk not to start at all.

    Finetuning has other installation requirements so please read any instructions in the setup utility and refer back here to this page for detailed instructions.

⁠🟩 Manual Installation - As part of Text generation web UI

On Mac's or if you wish to perform a manual installation. Click to expand the correct section below:

MANUAL INSTALLATION - Text-Generation-webui

This has been tested on the current Dec 2023 release of Text generation webUI. If you have not updated it for a while, you may wish to update Text generation webUI, instructions here⁠

  1. In a command prompt/terminal window you need to move into your Text generation webUI folder:

    cd text-generation-webui

  2. Start the Text generation webUI Python environment for your OS with whichever one of the below is correct for your OS:

    cmd_windows.bat, ./cmd_linux.sh, cmd_macos.sh or cmd_wsl.bat

    Loading Text-generation-webui's Python Environment is $\textcolor{red}{\textsf{VERY IMPORTANT}}$. If you are uncertain what a loaded Python environment looks like, image here⁠ and video here⁠

  3. Move into your extensions folder:

    cd extensions

  4. Once there git clone this repository:

    git clone https://github.com/erew123/alltalk_tts

  5. Move into the alltalk_tts folder:

    cd alltalk_tts

  6. Install one of the two requirements files. Whichever one of the two is correct for your machine type:

    Nvidia graphics card machines - pip install -r requirements_nvidia.txt

    Other machines (mac, amd etc) - pip install -r requirements_other.txt

  7. (Optional DeepSpeed) If you have an Nvidia Graphics card on a system running Linux or Windows and wish to use DeepSpeed please follow these instructions here⁠. However, I would highly reccommend before you install DeepSpeed, you start text-generation-webui up, confirm AllTalk starts correctly and everything is working, as DeepSpeed can add another layer of complications troubleshooting any potential start-up issues. If necessary you can pip uninstall deepspeed.

  8. You can now start move back to the main Text generation webUI folder cd .. (a few times), start Text generation webUI with whichever one of the startup scripts is correct for your OS (start_windows.bat,./start_linux.sh, start_macos.sh or start_wsl.bat) and load the AllTalk extension in the Text generation webUI session tab.

    Starting Text-generation-webui with its correct start-up script is $\textcolor{red}{\textsf{VERY IMPORTANT}}$.

    Any time you need to make changes to AllTalk, or use Finetuning etc, always start the Text-generation-webui Python environment first.

    Please read the 🟩 Other installation notes (also additional voices are available there).

    Finetuning & DeepSpeed have other installation requirements (depending on your OS) so please read any instructions in the setup utility and refer back here to this page for detailed instructions (as needed).

⁠🟩 Manual Installation - As a Standalone Application

On Mac's or if you wish to perform a manual installation. Click to expand the correct section below:

MANUAL INSTALLATION - I want to run AllTalk as a standalone when installed with Text-generation-webui

If you already have AllTalk as a extension of Text-generation-webui, and wish to run it as standalone, load Text-generation-webui's Python environment cmd_windows.bat, ./cmd_linux.sh, cmd_macos.sh or cmd_wsl.bat, move into the AllTalk folder cd extensions > cd alltalk_tts and start AllTalk with python script.py. There is nothing beyond this you would need to do.

MANUAL INSTALLATION - I wish to do a custom install of AllTalk

AllTalk will run as a standalone app, as long as you install its requirements files into whatever Python environment you are using. You can follow the steps to install the AllTalk's requirements into whatever Python environment you wish. Because I dont know what Python environment you are wanting to use, I can only give you a loose set of installation instructions.

Please note, at time of writing, the TTS engine requires Python 3.9.x to 3.11.x TTS Engine details here⁠. AllTalk and its requirements are tested on Python 3.11.x.

⁠🟩 A very quick understanding of Python Environments.

Different Python applications have different requirements, some of those requirement’s conflict with other Python applications requirements. To work around this problem, you can create different Python environments that remain separated from one another. A simple way of looking at Python environments, is just like how your house has different rooms for specific purposes (Kitchen, Bathroom, Bedroom etc). You can create a Python environment that is built/customised specifically for your current applications needs/purposes and will not interfere with any other Python applications environments/installations.

If you are adept at managing Python environments, have an existing Python environment and know that you won’t cause any conflicts by installing AllTalk's requirements within that Python environment, then load up your Python environment and install the requirements. For everyone else, here is a basic guide on installing AllTalk in its own custom Python environment (there will be small variations between OS's, but the principle is the same).

Note: A standard VENV can cause module path issues, hence Conda is the correct method to create a Python environment for AllTalk.

⁠🟩 Building a custom Python Environment with Miniconda
  1. Open a terminal/command prompt, and confirm that both python --version and pip both work. Neither of them should give an error message. If they do you may need to install Python (and maybe Pip).

    Python Website⁠
    Pip Website⁠

    Once you have those working you can now continue on.

  2. Assuming you don't already have Miniconda installed, we will need to download and install Minoconda as this is what we will use to build our custom Python environment.

    Miniconda Website⁠

    Download the Miniconda version that is correct for your OS and then install it. Miniconda will create some items in your Start Menu or Application Launcher called something like Anaconda Prompt

    You will start the Anaconda Prompt and your prompt in your terminal/command prompt will say something like:

    (base) C:\users\myaccount\>

    The important bit is that it has the (base), the location after that doesn't matter. (base) signifies we are in the base conda Python environment and can now create custom Python environments with Conda.

  3. In your Anaconda Prompt command prompt/terminal, move into the folder where you want to download AllTalk to and then git clone this repository. For simplicity I am going to assume that location is c:\myfiles\. So you will:

    cd myfiles

    git clone https://github.com/erew123/alltalk_tts

  4. Now we will create our custom Conda Python 3.11.5 environment and give it the name alltalkenv by typing the following at the prompt:

    conda create --name alltalkenv python=3.11.5

    You will be prompted if you want to continue and you say yes.

    Once that process has completed, we now need to change from the (base) Conda Python environment, to our newly created (alltalkenv) environment. So type the following:

    conda activate alltalkenv

    Your prompt should now change from (base) C:\myfiles\> to (alltalkenv) C:\myfiles\>

  5. If you are NOT using an Nvidia card and CUDA, skip to step 6. To force PyTorch to install with CUDA, perform the following:

    pip cache purge (Clear the current Pip cache)

    pip uninstall torch torchaudio (Uninstall Torch and Torchaudio from the alltalkenv environment)

    You can now either install the CUDA 11.8 or 12.1 version of Torch and Torchaudio with one of the following

    CUDA 11.8 > pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118

    CUDA 12.1 > pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121

  6. Move into the alltalk_tts folder and install one of the two requirements files. Whichever one of the two is correct for your machine type:

    cd alltalk_tts

    Nvidia graphics card machines - pip install -r requirements_nvidia.txt

    Other machines (mac, amd etc) - pip install -r requirements_other.txt

  7. Start AllTalk with python script.py

🟩 Anytime you wish to use AllTalk, update its requirements, install some other requirements such as DeepSpeed, you will need to start its Conda Python Environment in the terminal/prompt, which you will do with conda activate alltalkenv as long as the Conda executable is accessible at the command prompt/terminal you are in.

It is fully possible to create a batch file or script file that you can use as a launcher from your Start Menu/Application Launcher that will start the environment and AllTalk for you.

Deepspeed and other such things can be installed. Please read the relevant instructions for those items, however, make the relevant changes to load your correct Python environment when installing any requirements files and starting AllTalk.

Any time you need to make changes to AllTalk, or use Finetuning etc, always start your Python environment first.

Please read the 🟩 Other installation notes (also additional voices are available there).

Finetuning & DeepSpeed have other installation requirements (depending on your OS) so please read any instructions in the setup utility and refer back here to this page for detailed instructions (as needed).

⁠🟩 Other installation notes

On first startup, AllTalk will download the Coqui XTTSv2 2.0.2 model to its models folder (1.8GB space required). Check the command prompt/terminal window if you want to know what its doing. After it says "Model Loaded" the Text generation webUI is usually available on its IP address a few seconds later, for you to connect to in your browser. If you are running a headless system and need to change the IP, please see the Help with problems section down below.

Once the extension is loaded, please find all documentation and settings on the link provided in the interface (as shown in the screenshot below).

Where to find voices https://aiartes.com/voiceai⁠ or https://commons.wikimedia.org/⁠ or interviews on youtube etc. Instructions on how to cut down and prepare a voice sample are within the built in documentation.

Please read the note below about start-up times and also the note about ensuring your character cards are set up correctly⁠

Some extra voices for AllTalk are downloadable here⁠

⁠🟩 A note on Character Cards & Greeting Messages

Messages intended for the Narrator should be enclosed in asterisks * and those for the character inside quotation marks ". However, AI systems often deviate from these rules, resulting in text that is neither in quotes nor asterisks. Sometimes, text may appear with only a single asterisk, and AI models may vary their formatting mid-conversation. For example, they might use asterisks initially and then switch to unmarked text. A properly formatted line should look like this:

"Hey! I'm so excited to finally meet you. I've heard so many great things about you and I'm eager to pick your brain about computers." *She walked across the room and picked up her cup of coffee*

Most narrator/character systems switch voices upon encountering an asterisk or quotation marks, which is somewhat effective. AllTalk has undergone several revisions in its sentence splitting and identification methods. While some irregularities and AI deviations in message formatting are inevitable, any line beginning or ending with an asterisk should now be recognized as Narrator dialogue. Lines enclosed in double quotes are identified as Character dialogue. For any other text, you can choose how AllTalk handles it: whether it should be interpreted as Character or Narrator dialogue (most AI systems tend to lean more towards one format when generating text not enclosed in quotes or asterisks).

With improvements to the splitter/processor, I'm confident it's functioning well. You can monitor what AllTalk identifies as Narrator lines on the command line and adjust its behavior if needed (Text Not Inside - Function).

⁠πŸŸͺ Updating
UPDATING - I am using Text-Generation-webui
This is pretty much a repeat of the installation process.
  1. In a command prompt/terminal window you need to move into your Text generation webUI folder:

    cd text-generation-webui and start the Python environment for your OS with whichever one of the below is correct for your OS:

    cmd_windows.bat, ./cmd_linux.sh, cmd_macos.sh or cmd_wsl.bat

  2. Move into your extensions and alltalk_tts folder e.g. cd extensions then cd alltalk_tts

  3. At the command prompt/terminal, type git pull

  4. Install the correct requirements for your machine:

    Nvidia graphics card machines - pip install -r requirements_nvidia.txt

    Other machines (mac, amd etc) - pip install -r requirements_other.txt

UPDATING - I am running as a Standalone Application
  1. In a command prompt/terminal window you need to move into your alltalk_tts folder and run start_environment.bat or /start_environment.sh to load the Python environment.

  2. At the command prompt/terminal, type git pull and wait for it to complete the download.

  3. Install the correct requirements for your machine:

    Nvidia graphics card machines - pip install -r requirements_nvidia.txt

    Other machines (mac, amd etc) - pip install -r requirements_other.txt

⁠πŸŸͺ Updating "git pull" error
Click to expand

I did leave a mistake in the /extensions/alltalk_tts/.gitignore file at one point. If your git pull doesnt work, you can either follow the Problems Updating section below, or edit the .gitignore file and replace its entire contents with the below, save the file, then re-try the git pull

voices/*.*
models/*.*
outputs/*.*
finetune/*.*
config.json
confignew.json
models.json
diagnostics.log
⁠πŸŸͺ Updating other problems
Click to expand

If you do experience any problems, the simplest method to resolve this will be:

  1. re-name the existing alltalk_tts folder to something like alltalk_tts.old

  2. Start a console/terminal then:

    cd text-generation-webui and start your python environment cmd_windows.bat, ./cmd_linux.sh, cmd_macos.sh or cmd_wsl.bat

  3. Move into the extensions folder, same as if you were doing a fresh installation:

    cd extensions then

    git clone https://github.com/erew123/alltalk_tts

This will download a fresh installation.

  1. Move into the alltalk_tts folder:

    cd alltalk_tts

  2. Install the correct requirements for your machine:

    Nvidia graphics card machines - pip install -r requirements_nvidia.txt

    Other machines (mac, amd etc) - pip install -r requirements_other.txt

  3. Before starting it up, copy/merge the models, voices and outputs folders over from the alltalk_tts.old folder to the newly created alltalk_tts folder. This will keep your voices history and also stop it re-downloading the model again.

You can now start text-generation-webui or AllTalk (standalone) and it should start up fine. You will need to re-set any saved configuration changes on the configuration page.

Assuming its all working fine and you are happy, you can delete the old alltalk_tts.old folder.

⁠🟫 Screenshots
imageimageimageimage
imageimageimageimage
⁠🟨 Help with problems
⁠     πŸ”„ Minor updates/bug fixes list can be found here⁠
⁠🟨 How to make a diagnostics report file

If you are on a Windows machine or a Linux machine, you should be

Tag summary

Content type

Image

Digest

sha256:7169ab8ca…

Size

7 GB

Last updated

over 2 years ago

docker pull joshxt/alltalk_tts