KaniTTS is a text-to-speech model, a high-speed, high-fidelity speech generation system built for real-time conversational AI. Designed with a two-stage architecture that fuses a 370M parameter language model and an ultra-efficient neural audio codec, KaniTTS produces speech that’s incredibly natural, clear, and low-latency, clocking in at just ~1 second to generate 15 seconds of audio. If you’re powering a live voice chatbot, a screen reader, or an edge-deployed virtual assistant, KaniTTS delivers studio-grade realism with lightning-fast performance, all while running on just 2GB of GPU memory. With a 22kHz sample rate, support for six languages, and a Mean Opinion Score of 4.3/5, this model combines speed, accuracy, and versatility in a way that rivals even cloud-grade TTS systems.
In this guide, you’ll learn how to install and run KaniTTS locally, so you can bring lifelike, multilingual, real-time voice synthesis directly to your device without relying on external APIs or servers.
Prerequisites
The minimum system requirements for running this model are:
- GPU: 1x RTX4090
- Storage: 20 GB (preferable)
- VRAM: at least 8 GB
Step-by-step process to install and run KaniTTS
For the purpose of this tutorial, we’ll use a GPU-powered Virtual Machine by NodeShift since it provides high compute Virtual Machines at a very affordable cost on a scale that meets GDPR, SOC2, and ISO27001 requirements. Also, it offers an intuitive and user-friendly interface, making it easier for beginners to get started with Cloud deployments. However, feel free to use any cloud provider of your choice and follow the same steps for the rest of the tutorial.
Step 1: Setting up a NodeShift Account
Visit app.nodeshift.com and create an account by filling in basic details, or continue signing up with your Google/GitHub account.
If you already have an account, login straight to your dashboard.
Step 2: Create a GPU Node
After accessing your account, you should see a dashboard (see image), now:
- Navigate to the menu on the left side.
- Click on the GPU Nodes option.
- Click on Start to start creating your very first GPU node.
These GPU nodes are GPU-powered virtual machines by NodeShift. These nodes are highly customizable and let you control different environmental configurations for GPUs ranging from H100s to A100s, CPUs, RAM, and storage, according to your needs.
Step 3: Selecting configuration for GPU (model, region, storage)
- For this tutorial, we’ll be using 1x RTX4090 GPU, however, you can choose any GPU as per the prerequisites.
- Similarly, we’ll opt for 50 GB storage by sliding the bar. You can also select the region where you want your GPU to reside from the available ones.
Step 4: Choose GPU Configuration and Authentication method
- After selecting your required configuration options, you’ll see the available GPU nodes in your region and according to (or very close to) your configuration. In our case, we’ll choose a 1x RTX4090 24 GB GPU node with 64vCPUs/28GB RAM/50GB SSD.
2. Next, you’ll need to select an authentication method. Two methods are available: Password and SSH Key. We recommend using SSH keys, as they are a more secure option. To create one, head over to our official documentation.
Step 5: Choose an Image
The final step is to choose an image for the VM, which in our case is Nvidia Cuda.
That’s it! You are now ready to deploy the node. Finalize the configuration summary, and if it looks good, click Create to deploy the node.
Step 6: Connect to active Compute Node using SSH
- As soon as you create the node, it will be deployed in a few seconds or a minute. Once deployed, you will see a status Running in green, meaning that our Compute node is ready to use!
- Once your GPU shows this status, navigate to the three dots on the right, click on Connect with SSH, and copy the SSH details that appear.
As you copy the details, follow the below steps to connect to the running GPU VM via SSH:
- Open your terminal, paste the SSH command, and run it.
2. In some cases, your terminal may take your consent before connecting. Enter ‘yes’.
3. A prompt will request a password. Type the SSH password, and you should be connected.
Output:
Next, If you want to check the GPU details, run the following command in the terminal:
!nvidia-smi
Step 7: Set up the project environment with dependencies
- Create a virtual environment using Anaconda.
conda create -n tts python=3.11 -y && conda activate tts
Output:
2. Clone the official repository.
git clone https://github.com/nineninesix-ai/kani-tts.git && cd kani-tts
Output:
3. Install required dependencies.
pip install torch librosa soundfile numpy huggingface_hub
pip install "nemo_toolkit[tts]"
pip install -U "git+https://github.com/huggingface/transformers.git"
pip install fastapi unicorn
pip install -r requirements.txt
apt install ffmpeg
4. Run the python file named server.py
which will start a fastapi server at port http://localhost:8000
. It will automatically download the model checkpoints as well.
python server.py
Output:
5. If you’re on a remote machine (e.g., NodeShift GPU), you’ll need to do SSH port forwarding in order to access the server port on your local browser.
Run the following command in your local terminal after replacing:
<YOUR_SERVER_PORT>
with the PORT allotted to your remote server (For the NodeShift server – you can find it in the deployed GPU details on the dashboard).
<PATH_TO_SSH_KEY>
with the path to the location where your SSH key is stored.
<YOUR_SERVER_IP>
with the IP address of your remote server.
ssh -L 8000:localhost:8000 -p <YOUR_SERVER_PORT> -i <PATH_TO_SSH_KEY> root@<YOUR_SERVER_IP>
After this copy the URL you received in your remote server: http://0.0.0.0:8000
Now, the web interface running on the local browser will be able to access this server port to make API calls.
Step 8: Launch the model with HTML Interface
1. Launch the following client.html
file in your browser to open the web interface for this model.
2. Now you can either get generated audio for your given text speech by clicking on Generate Speech.
3. Or you can stream the live audio and listen to it on the go by clicking on Stream Speech option.
Conclusion
KaniTTS brings the perfect blend of speed, fidelity, and efficiency to local text-to-speech generation, transforming written text into lifelike, multilingual audio in real time. With its dual-stage architecture powered by a 370M parameter LLM and a cutting-edge neural audio codec, it delivers studio-quality speech at remarkably low latency, ideal for voice assistants, accessibility tools, and conversational AI systems. By following this guide, you can set up and run KaniTTS locally to experience seamless, high-performance voice synthesis on your own hardware. NodeShift Cloud streamlines this process by providing a ready-to-run, GPU-optimized environment, eliminating dependency issues and enabling developers to experiment, fine-tune, and deploy KaniTTS effortlessly, bringing the power of real-time, privacy-first speech generation right to your workflow.