πŸ—£οΈ 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-ouali2025improving,
 author = {Nassima Ould-Ouali and Awais Sani and Tim Luka Horstmann and Jonah Dauvet and Ruben Bueno and Γ‰ric Moulines},
 title = {Improving French Synthetic Speech Quality via SSML Prosody Control},
 booktitle = {Proceedings of the 9th International Conference on Natural Language and Speech Processing (ICNLSP)},
 series = {Lecture Notes in Computer Science},
 publisher = {Springer},
 year = {2025},
 note = {To appear}
 }

License

This model is released under the Apache 2.0 license, same as the base Qwen2.5-7B model.

Downloads last month
8
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for nassimaODL/ssml-text2breaks-fr-lora

Base model

Qwen/Qwen2.5-7B
Adapter
(384)
this model