Wednesday, June 5, 2024

ChatTTS Text to Speech Model Installation Locally

 This video shows a step-by-step process to locally install ChatTTS which is a text-to-speech model designed specifically for dialogue scenario such as LLM assistant. It supports both English and Chinese languages.


conda create -n chattts python=3.11 -y

git clone

cd ChatTTS

pip install -r requirements.txt
pip install gradio
pip install pynini
pip install nemo_text_processing
pip install WeTextProcessing
pip install torchaudio

import torch
torch._dynamo.config.cache_size_limit = 64
torch._dynamo.config.suppress_errors = True
import torchaudio
import ChatTTS
from IPython.display import Audio
import warnings

texts = ["hello, this is Fahd , and AI Youtuber. hahahaha. Subscribe to the channel please and also share it among your network",]

chat = ChatTTS.Chat()
wavs = chat.infer(texts)"/home/Ubuntu/audiooutput/myaudio1.wav", torch.from_numpy(wavs[0]), 24000)

No comments: