Building Text to speech model for Swahili(East African language)
# NLP Project: Text-to-Speech (TTS) for Swahili using tacotron2
## Overview
This project builds a **Text-to-Speech (TTS) model for Swahili**, an East African language.
## Getting Started
### 1. Install Dependencies
Before running the project, install the required dependencies by running:
```bash
pip install -r requirements.txt
```
### 2. Dataset Preprocessing
Download the dataset from
drive.google.com and place it in your project directory. Then, run the **NLP_TTS_preprocessing.py** script to perform basic preprocessing on the dataset.
```bash
NLP_TTS_preprocessing.ipynb
```
This script processes the dataset and generates **tts_dataset.csv**, which will be used for training the model.
### 3. Train the Model
Once preprocessing is complete, proceed to
```bash
nlp_project_model.ipynb
```
**Update the dataset path** in the notebook to point to the generated **tts_dataset.csv** file.
Since speech synthesis models require significant training, **set the number of epochs to 100** for better performance. Run the notebook to train the model.
### 4. Inference
After training, you can perform inference using the saved model. The model takes a Swahili text prompt as input and generates a **Mel spectrogram**, which is then converted into an audio file. The generated audio will be saved automatically.
## Notes
- Use **Google Colab** to get results
- Ensure that the dataset path is correctly updated in the notebook before training.
- Training on **100 epochs** is recommended for optimal results.
- The output audio files will be stored in the specified directory after inference.
## Thank you