Scottish AI Voice Model — TTS Fine-tuning Project
Welcome to Gregg, a voice cloning project using AI to train a custom Scottish accent voice (nicknamed “Greg”). This repository uses Tacotron2 for spectrogram generation and HiFi-GAN for waveform synthesis to create high-quality, expressive speech from text.
- Train a natural-sounding voice model for “Greg” (Scottish accent)
- Use open-source tools for fine-tuning on a small custom dataset
- Experiment with phoneme settings, audio quality, and inference improvements
- ✅ Tacotron2 + HiFi-GAN: Neural TTS stack for clear speech synthesis
- ✅ LJSpeech-compatible Formatting: Flexible with
metadata.csv - ✅ Custom Voice Training: Easily fine-tune using your own recordings
- ✅ Configurable Output: Adjust all model, training, and audio parameters via
config.json - ✅ Test Sentences: Quickly generate inference output from predefined sentences
- ✅ Supports English Phonemizer: For improved pronunciation control
- Python 3.7+
- PyTorch with GPU support recommended
- FFmpeg installed and accessible in PATH
Install dependencies:
pip install -r requirements.txtExample config.json snippet:
{
"model": "Tacotron2",
"generator_model": "HiFi-GAN",
"audio_config": {
"sample_rate": 22050,
"fft_size": 1024,
"hop_length": 256
},
"training_config": {
"epochs": 100,
"batch_size": 16,
"learning_rate": 0.001
},
"datasets": [
{
"formatter": "ljspeech",
"path": "dataset/",
"meta_file_train": "metadata.csv",
"language": "English",
"phonemizer": "English"
}
]
}💡 Important: Make sure the "language" is explicitly set to "English" — the model will error out otherwise.
python main.pyThis will generate a sample file like:
output/test-output.wav
If you simply want to synthesise speech in your own voice without retraining the model, you can leverage the pretrained XTTS v2 model. Provide a short reference audio clip of yourself and the text you would like the model to speak:
python synth_xtts.py --text "Hello from Scotland" --speaker_wav path/to/your_voice.wav --output output/greg.wavThis uses the default tts_models/multilingual/multi-dataset/xtts_v2
checkpoint shipped with Coqui TTS to generate an audio file in
output/greg.wav.
python train_tts.py --config_path config.json --output_path output/Training progress is saved to:
output/checkpoints/
output/logs/
You can resume training with:
python train_tts.py --config_path config.json --continue_path output/greg-ai/
├── config.json # Main configuration
├── main.py # Synthesis entry point
├── train_tts.py # Training script
├── dataset/ # Custom audio and metadata
│ ├── metadata.csv
│ └── wavs/
├── output/ # Checkpoints, logs, generated audio
├── .venv/ # Python virtual environment
The dataset folder should follow this format:
dataset/
├── metadata.csv # Format: filename|transcript
├── wavs/
│ ├── clip1.wav
│ ├── clip2.wav
- All audio files must be mono WAV format
- Use a sample rate of 22050 Hz
- Match filenames exactly to
metadata.csventries
Ensure that "language": "English" is set in the config and dataset section. Also make sure the phonemizer is valid for English or left out if unused.
- 🗣️ Tacotron2
- 🎵 HiFi-GAN
- 🎤 LJSpeech Dataset
- 🧠 Coqui TTS — the library powering this repo
MIT — free to use, modify, and share. See LICENSE file for details.
Built by Adam — adam@ajstudios.dev
Project repo: github.com/uxillary/greg-ai
- XTTS v2 support for multi-speaker synthesis
- Dataset augmentation via phoneme control
- Real-time inference UI using Streamlit or Gradio
- Voice personality tuning and expression embedding