metadata
license: apache-2.0
base_model: Qwen/Qwen2.5-7B
library_name: peft
tags:
- text-to-speech
- ssml
- qwen2.5
- lora
- peft
language:
- en
- fr
pipeline_tag: text-generation
🗣️ ssml-text2breaks-fr-lora
ssml-text2breaks-fr-lora is a LoRA adapter built on top of Qwen/Qwen2.5-7B
, trained to predict symbolic pause markers (e.g., #250
, #500
) in raw French text. These symbolic tags indicate appropriate prosodic boundaries for speech synthesis systems.
This model is the first stage in the cascaded pipeline presented in:
"Improving French Synthetic Speech Quality via SSML Prosody Control"
Nassima Ould-Ouali, Éric Moulines – ICNLSP 2025 (Springer LNCS, accepted)
It is designed to be followed by ssml-break2ssml-fr-lora
, which converts symbolic markers into valid SSML tags.
🧩 Pipeline Overview
Stage | Model Name | Description |
---|---|---|
1️⃣ | ssml-text2breaks-fr-lora |
Predicts symbolic pause markers such as #250 , #500 |
2️⃣ | ssml-break2ssml-fr-lora |
Converts symbolic markers into <break time="..."/> SSML tags |
✨ Example
Input:
Bonjour je m'appelle Bertrand Perier. Je suis avocat à la cour.
Output
Bonjour#250 je m'appelle Bertrand Perier.#500 Je suis avocat à la cour.
🧠 Model Details
- Base Model: Qwen/Qwen2.5-7B
- Fine-tuning Method: LoRA (Low-Rank Adaptation)
- LoRA Rank: 8
- LoRA Alpha: 16
- Target Modules: q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj
- Training Epochs: 5
- Batch Size: 1 (with gradient accumulation)
- Learning Rate: 3e-4
🚀 How to run the code
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
# Load base model and tokenizer
base_model = AutoModelForCausalLM.from_pretrained(
"Qwen/Qwen2.5-7B",
torch_dtype=torch.bfloat16,
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-7B")
# Load LoRA adapter
model = PeftModel.from_pretrained(base_model, "jonahdvt/qwen-ssml-lora")
# Prepare input
instruction = "Convert text to SSML with pauses:"
text = "Hello, how are you today? I hope everything is going well."
formatted_input = f"### Task:\n{instruction}\n\n### Text:\n{text}\n\n### SSML:\n"
# Generate
inputs = tokenizer(formatted_input, return_tensors="pt").to(model.device)
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=256,
temperature=0.7,
do_sample=True,
pad_token_id=tokenizer.eos_token_id
)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
ssml_output = response.split("### SSML:\n")[-1]
print(ssml_output)
Citation
If you use this model in your research, please cite:
@inproceedings{ould-ouali2025_improving,
title = {Improving Synthetic Speech Quality via SSML Prosody Control},
author = {Ould-Ouali, Nassima and Sani, Awais and Bueno, Ruben and Dauvet, Jonah and Horstmann, Tim Luka and Moulines, Eric},
booktitle = {Proceedings of the 8th International Conference on Natural Language and Speech Processing (ICNLSP)}, % TODO: vérifier l'intitulé exact utilisé par la conf
year = {2025},
pages = {XX--YY}, % TODO
publisher = {—}, % TODO
address = {—} % TODO
}
License
This model is released under the Apache 2.0 license, same as the base Qwen2.5-7B model.