| # Bangla VITS TTS Fine-tuning |
|
|
| Fine-tuning Coqui TTS `tts_models/bn/custom/vits-male` on custom Bangla voice dataset. |
|
|
|
|
| ## Setup |
|
|
| ### 1. Create Environment |
| ```bash |
| conda create -n tts-bn python=3.10 -y |
| conda activate tts-bn |
| ``` |
|
|
| ### 2. Install PyTorch (do this first) |
| ```bash |
| pip install torch==2.12.0 torchaudio==2.11.0 --index-url https://download.pytorch.org/whl/cu118 |
| or |
| pip install torch==2.7.1+cu118 torchaudio==2.7.1+cu118 --index-url https://download.pytorch.org/whl/cu118 |
| ``` |
|
|
| ### 3. Install Dependencies |
| ```bash |
| pip install -r requirements.txt |
| ``` |
|
|
|
|
| ## Training |
|
|
| ### Start Fine-tuning |
| ```bash |
| CUDA_VISIBLE_DEVICES=0 python -m TTS.bin.train_tts \ |
| --config_path configs/bangla.json \ |
| --restore_path your_file_location/tts/tts_models--bn--custom--vits-male/model_file.pth |
| ``` |
|
|
| ### Continue Training from Checkpoint |
| ```bash |
| CUDA_VISIBLE_DEVICES=0 python -m TTS.bin.train_tts \ |
| --config_path configs/bangla.json \ |
| --continue_path outputs/YOUR_RUN_FOLDER/ |
| ``` |
|
|
| ### inject your cleaner into the TTS package |
| ```bash |
| CLEANERS_PATH=$(python -c "import TTS.tts.utils.text.cleaners as c; import inspect; print(inspect.getfile(c))") |
| |
| cat bangla_cleaners.py >> $CLEANERS_PATH |
| |
| # Verify it worked |
| python -c "from TTS.tts.utils.text import cleaners; print(hasattr(cleaners, 'bangla_cleaners'))" |
| ``` |
|
|
| ### Monitor Training |
| ```bash |
| tensorboard --logdir=outputs/ --port=8080 |
| ``` |
|
|
| ## Inference |
| ```bash |
| python inference.py |
| ``` |
|
|
| ### Serve Output Files |
| ```bash |
| python -m http.server 8080 |
| ``` |
| ### Tunneling with ngrok |
| ```bash |
| ngrok http --domain=hawkeyes.ngrok.app 8080 |
| ``` |