World's Fair 2025
Text-to-Speech Data Preparation and Fine-tuning Workshop - Ronan McGovern
Overview
This workshop details the process of preparing data and fine-tuning a text-to-speech (TTS) model, specifically Sesame's CSM 1B model, to produce speech that mimics a target voice. It covers extracting audio from sources like YouTube, transcribing it, and formatting it into a dataset suitable for training. The process leverages the Unsloth library for efficient fine-tuning and demonstrates how to evaluate the model's performance before and after the fine-tuning process.
Who should watch
- AI engineers and builders interested in TTS model customization.
- Individuals looking to create custom voice models from existing audio.
- Developers seeking to fine-tune large language models for specific audio outputs.
- Anyone interested in the practical application of token-based TTS models.
Key takeaways
- Token-based TTS models, like Sesame's CSM 1B, work by predicting discrete audio tokens sequentially, similar to how language models predict text tokens.
- Audio can be represented discretely using codebooks, where vectors in the codebook correspond to specific sound segments.
- Data preparation involves transcribing audio (e.g., using Whisper), correcting transcriptions, and segmenting the audio and text into manageable chunks, ideally up to 30 seconds long.
- Fine-tuning can be accelerated using libraries like Unsloth, which optimizes transformer models and allows for adapter-based training to reduce computational load.
- Even with a small dataset (around 41 snippets of 30 seconds), fine-tuning can significantly improve voice similarity compared to zero-shot inference or voice cloning alone.
- Combining fine-tuning with voice cloning techniques can yield the best results, producing audio that closely matches the target voice.
- The process involves loading a pre-trained model, applying LoRA adapters to specific layers (like linear layers), and then training these adapters on the prepared dataset.
- Monitoring training loss is crucial, and further improvements can be made by increasing the dataset size (e.g., to 500 snippets) or refining data filtering to remove silences or pauses.
Notable quotes
*You should be able to train a text to speech model so that it sounds like a specific voice.*
*The answer is you can represent audio or a little piece of audio as a choice from a code book.*
*We're going to focus on the linear layers and actually we're not even going to train all of the parameters in the linear layers. We're going to train adapters that plug on.*
Unofficial community note. Prefer the recording for nuance.