Text-to-Speech
Persian
Farsi
Persian
voice-cloning

Persian model Fine-tuning

#8
by RaminTavakoli - opened

Hi dear Thomcles!
I have prepared chatterbox mtl training script for Persian language and i perfectly understand chatterbox architecture.
and i used your (Filtered!) Persian datasets (https://huggingface.co/datasets/Thomcles/Persian-Farsi-Speech) and your t3 model (https://huggingface.co/Thomcles/Chatterbox-TTS-Persian-Farsi) for fine-tuning your model on your data!

Why did I do this?
Because I wanted to see if the text loss and speech loss are low!?
This shows me if you really trained the model with this data.
The result is strange to me!
The text loss is low and the speech loss is high.
To make sure the training is done well, I have included the loss training figure below.

train for 4 epochs:
image

train for 10 epoch(your data and 140 hours private data):

image

It is clear that the model training is going well.
I want to know if you actually used this data to train the model?
If so, why am I having this problem?

The results you're getting seem pretty normal and consistent to me.

Speech tokens are harder to understand than text tokens (the S3tokenizer produces purely semantic speech tokens, but they still encode fine-grained structures such as paralinguistic information). They have higher entropy and less structured distributions , especially with large codebooks (Chatterbox has a vocabulary size of 8k for speech versus ~2k for text). This naturally leads to higher cross-entropy values.

At least, that’s my theoretical take on it, and there might be something else going on. But it’s definitely something I’ve observed empirically myself as well.

And yes, I can confirm that I did use this dataset to fine-tune this model.

I completely agree with what you said.

However, I should add that while the speech loss has been reduced nicely after a few epochs, unfortunately, when I take different examples and infer from the model, the voice quality has gotten considerably worse, to the point where we can’t understand what he’s saying! This is very strange.

My initial thought is that I need to start the train with a proper learning rate. Do you remember what the learning rate was at the end of the train? Or do you have any idea what else could be causing this problem?
I also set aside a portion of this data for validation, and the validation loss figure is as follows, which is also strange!

You can see that learning rate scheduler are work perfectly.
Is a high grad norm normal?

image

image

Maybe if I train the model with initial mtl chatterbox weights this problem will be solved.

Your model has overfit, given the pattern of the validation loss. Consider keeping only the weights from the 10k-step model and testing it, everything should work fine. Also, make sure not to calculate the loss on the speech tokens in the sequence you fed into the perceiver, otherwise there will be a GT leak (however, if you're using continuation-prompt mixed training, you don't need to do this).
And yes, using the weights from the base model rather than mine could reduce the amount of training needed before overfitting, since I've already trained the model on similar data. I used a similar learning rate.

When I use the model weights in step 10,000 and test it, the result is still very bad.
The problem is not over-fitting, and the problem is probably something else.

can you explain this part of your text more?
Also, make sure not to calculate the loss on the speech tokens in the sequence you fed into the perceiver, otherwise there will be a GT leak (however, if you're using continuation-prompt mixed training, you don't need to do this).

I trained the model with the weights that the original Chatterbox itself has.
And the train figures look like this.
But when I listen to the sounds, the result is not even close to your model.
What the graphs show is, things are done well, but the model output is not good.
I wanted to know how many epochs with what batch size and you trained the model and did you re-initialize the model weights?

image
image

Sign up or log in to comment