π Back to the Full Course on local models and Hugging Face (+Videos)
Hi and welcome back to part 5 of the local models tutorial series. In this part, we’ll be getting started with audio models, looking first at text-to-speech generation. In the next part, we’ll also look at text-to-music AI music generation.
π‘ We will not be touching on speech-to-text transcription type models here as I already have a full OpenAI Whisper course that deals specifically with the amazing and free open-source OpenAI Whisper model for this purpose, running it on our local machine. If you’re interested in speech-to-text, podcast subscription, automatic video subtitling, and such, bookmark this course for later!
Let’s get started with the text-to-speech models now, as they have loads of real-world practical use cases and it’s very nice to have a free open-source model on your computer available whenever you need it.
If some of the preceding models were a bit intense for your computer system to handle, fear not! Text-to-speech is surprisingly lightweight and you can probably run real-time inference even on a CPU-only setup!
Let’s head over to the Hugging Face page for MeloTTS:

Installation
If we look at the model card it offers some very simple example code but states we need to follow the installation steps before we can run the code.

The installation instructions for Linux and MacOS are quite simple and straightforward, so if you’re on one of those systems just follow the provided instructions. Assuming most of you are on Windows, we have a couple of extra steps to follow as we need to run Docker. If you already have Docker and are familiar with the software, skim ahead a bit to the part where we run the container!
If this sounds like a large pain in the bum just to run one model, rest assured, you will need Docker again sooner or later in this world, so my personal advice is to just get it out of the way and get used to Docker as soon as possible!
I won’t go too deep into the details of what Docker is, but basically, it will allow us to run a sort of small virtual machines named containers (oversimplifying here) based on Linux on our Windows machine. This small container will have all the dependencies inside that our project needs and runs independently on its own Linux and Python environment.
Preparing for Docker installation
Most tutorials will just tell you to install Docker and give no details which might leave you with a hard and long process of figuring out why it won’t work on your system. I’ll do a quick grab-back to the Autogen course where I explained the process in detail, so we can get through the installation quickly:
π‘ I’ll cover all the basics here and provide some useful references but you may need to do some extra research if you run into any issues, as I cannot prepare for every possible problem you might run into.
First, we need to install WSL2 (Windows Subsystem for Linux 2) on our system. This is a Windows feature that allows us to run Linux on our Windows machine. This is needed because Docker Desktop for Windows requires WSL2 to run. (You can also use Hyper-V instead, but WSL2 is the recommended way).
π‘ If you already use WSL but need to check if you have version 2, you can check your version by entering the command:
wsl -l -vin PowerShell or Windows Command Prompt.
You can find the details for installing WSL2 here, but basically you do this:
- Open a PowerShell or Windows Command Prompt in administrator mode by right-clicking and selecting “Run as administrator”
- Run the following command in the terminal:
wsl --install - Restart your computer when prompted
This will enable WSL on your Windows machine and install a Linux distribution (Ubuntu) on your system. You may need to create a Username and Password for your Linux distribution and save them somewhere. More details can be found here or Google “Setting up your Linux username and password.”
We have a couple more things to check before we can install Docker Desktop. First, we need to make sure the Virtual Machine Platform option is enabled. This is fairly easy! Just press the Windows key or click in the Windows search bar and search for “Turn Windows features on or off”.
Open this and make sure the “Virtual Machine Platform” option is checked. If it’s not, check it and click OK. You may need to restart your computer after this.

(You don’t have to match the other checkboxes with the settings in the image!)
Next, we need to make sure that Virtualization is enabled in our BIOS. The easiest way to check if this is enabled is to open the Windows Task Manager by pressing Ctrl+Alt+Delete and selecting Task Manager. Then click on the Performance tab and click on CPU on the left-hand side. If Virtualization is enabled, you will see “Virtualization: Enabled” in the bottom right information block like this:

If Virtualization is not enabled, you will have to go into your BIOS settings and enable Virtualization. This is where you will have to do some googling and research on your own, as every system has slightly different keys to get into the BIOS setup menu, and the settings may be located in different parts of the BIOS menu for different manufacturers. I’ll leave you with two links to get you started, the first one describes the general process of getting this setting enabled in your BIOS:
- Virtual Metric – How to enable hardware virtualization
- Docker Docs – Troubleshoot topics – virtualization
When you’ve got that ready and set up to go, let’s continue on.
Installing Docker Desktop
Finally, it’s time! Head over to the Docker Desktop download page here and download the appropriate Docker version for your OS. I’m running Docker 4.26.1, but just download the latest version and you should be fine. When the download finishes start the installer. The installer will give you the following options:

Just accept both of these options and click OK, unless you chose not to install WSL 2 and use Hyper-V instead. Whether or not you want a shortcut on your desktop is entirely up to you of course π.
Now just let the installer do its magic, and then go ahead and run the Docker Desktop application, where you’ll have to accept the service agreement:
