MOSS-TTS icon indicating copy to clipboard operation
MOSS-TTS copied to clipboard

Finetune Guide

Open tamerkanak opened this issue 8 months ago • 8 comments

Can you add fine tune code/guide for OpenMOSS-Team/MOSS-TTS-Realtime, OpenMOSS-Team/MOSS-TTS?

tamerkanak avatar Mar 03 '26 21:03 tamerkanak

We're building this, please stay tuned!

YWMditto avatar Mar 10 '26 05:03 YWMditto

We have already released an open-source tutorial on fine-tuning the MossTTSDelay architecture, and will subsequently provide corresponding versions of MossTTSLocal and MossTTSRealtime.

https://github.com/OpenMOSS/MOSS-TTS#fine-tuning

YWMditto avatar Mar 12 '26 03:03 YWMditto

thank you for the tutorial, what is the recommended length distribution for the audio segment in training phase?, I tried 2-15s, 2-30s, 2-200s but every time I had the early clipping problem

omarabb315 avatar Mar 16 '26 10:03 omarabb315

thank you for the tutorial, what is the recommended length distribution for the audio segment in training phase?, I tried 2-15s, 2-30s, 2-200s but every time I had the early clipping problem

@omarabb315 With my single speaker dataset (1~30s, 100 hours), the finetuned moss-tts-delay could speak clearly after an epoch, but early clippping happens on almost every test sentence. Please share your experience if you have solved the issue.

tekinek avatar Mar 25 '26 15:03 tekinek

I am still waiting for the solution actually, I tried increasing the segments range to be (2-200s) improved a bit, but still suffering from the same issue ...

omarabb315 avatar Apr 05 '26 11:04 omarabb315

I am still waiting for the solution actually, I tried increasing the segments range to be (2-200s) improved a bit, but still suffering from the same issue ...

During inference, manual setting of text_temperature and text_temperature in model.generate() helped.

model.generate(text_temperature=0.8, text_top_p=0.95, ...)

tekinek avatar Apr 06 '26 16:04 tekinek

Sorry for the long delay in replying.

The architecture of MossTTSDelay is divided into two layers: modeling the text layer and modeling the speech RVQ tokens. The text layer is used to explicitly control the model’s output behavior, namely when generation should start and stop. This can be seen in the inference code: https://github.com/OpenMOSS/MOSS-TTS/blob/41b8cefa54eaa936d28d3da29109e85e2ed0ac3d/moss_tts_delay/modeling_moss_tts.py#L467

During training, our training data covered all audio segments within one hour, so the duration of the fine-tuning audio is very unlikely to be the cause of early termination.

During inference, the behavior of the text layer is as follows:

  1. It generates <|audio_start|>, indicating the start of audio generation.
  2. It continuously generates a number of <|audio_assistant_gen_slot|> tokens corresponding to the actual text length, indicating normal audio content generation.
  3. When the first <|audio_assistant_delay_slot|> is generated, it indicates that the audio content has finished generating and the model has entered the delay stage. At this point, we only need to append the remaining n_vq - 2 <|audio_assistant_delay_slot|> tokens to obtain the complete two-dimensional RVQ audio tokens.
  4. Finally, <|audio_end|> is appended, indicating the complete end of the audio content.

Therefore, when the first <|audio_assistant_delay_slot|> is generated, the sampling parameters of the model’s text layer affect when it appears, thereby determining the length of the generated audio.

YWMditto avatar May 26 '26 09:05 YWMditto