This is a Basque text-to-speech (TTS) model based on the StyleTTS2 architecture, specifically adapted for Basque language synthesis. The model achieves good-quality Basque speech synthesis. The model was trained from scratch on the Basque multispeaker Sonora speech corpus.
Examples (playable):
Sample 1 — "Cesare Pavese XXI. mendeko idazle italiar esanguratzuenetakoa da."
Sample 2 — "Herriko errekan bakarrik korrika."
Main modifications:
PL-BERT-eu: PL-BERT model trained with WordPiece tokenizer for phonemized Basque text.
ASR-eu: ASR model trained with a subset of the multispeaker speech corpus. It uses the same architecture as the original ASR from StyleTTS2.
Phonemizer: We used code developed by Aholab to generate IPA phonemes for training the model. You can see a demo of the Basque phonemizer at arrandi/phonemizer-eus-esp. Likewise, the code used to generate IPA phonemes can be found in the phonemizer directory. We collapsed multi-character phonemes into single-character phonemes for better grapheme–phoneme alignment.
Training & model config → place at Models/Basque_Multispeaker_Phoneme_wavlm_normal/
epoch_2nd_00030.pth
Main TTS checkpoint → place at Models/Basque_Multispeaker_Phoneme_wavlm_normal/
epoch_00200.pth
Basque ASR / text aligner → place at Utils/ASR_basque/
step_4000000.t7
Phoneme PLBERT → place at Utils/PLBERT_phoneme/
Note: The JDC F0 extractor (Utils/JDC/bst.t7) is not Basque-specific — download it from the original StyleTTS2 repository and place it at Utils/JDC/bst.t7.
Setup
bash
1# 1. Clone the code repository2git clone https://github.com/AArriandiaga/StyleTTS2_basque
3cd StyleTTS2_basque
45# 2. Install dependencies6pip install -r requirements.txt
78# 3. Download model weights from this HF repo and place them:9mkdir -p Models/Basque_Multispeaker_Phoneme_wavlm_normal Utils/ASR_basque Utils/PLBERT_phoneme Utils/JDC
10# Download bst.t7 from the original StyleTTS2 repo (not Basque-specific):11wget -P Utils/JDC https://github.com/yl4579/StyleTTS2/raw/main/Utils/JDC/bst.t7
1213# using huggingface_hub:14python - <<'EOF'
15from huggingface_hub import hf_hub_download
16import shutil
1718repo = "HiTZ/styletts2-basque"
19files = {
20 "config_basque_multispeaker_phoneme_wavlm_800_2nd_normal.yml": "Models/Basque_Multispeaker_Phoneme_wavlm_normal/config_basque_multispeaker_phoneme_wavlm_800_2nd_normal.yml",
21 "epoch_2nd_00030.pth": "Models/Basque_Multispeaker_Phoneme_wavlm_normal/epoch_2nd_00030.pth",
22 "epoch_00200.pth": "Utils/ASR_basque/epoch_00200.pth",
23 "step_4000000.t7": "Utils/PLBERT_phoneme/step_4000000.t7",
24}
25# bst.t7 comes from the original StyleTTS2 repo — download separately:
26# https://github.com/yl4579/StyleTTS2/tree/main/Utils/JDC
27for hf_name, local_path in files.items():
28 src = hf_hub_download(repo_id=repo, filename=hf_name)
29 shutil.copy(src, local_path)
30 print(f"✓ {local_path}")
31EOF
Two reference audios are included in the repo under Demo/:
ref_antton.wav — male speaker
ref_maider.wav — female speaker
All credit goes to the authors of StyleTTS2.
Citation
bibtex
1@inproceedings{li2023styletts2,
2 title = {StyleTTS 2: Towards Human-Level Text-to-Speech through Style Diffusion and Adversarial Training with Large Speech Language Models},
3 author = {Li, Yinghao Aaron and Han, Cong and Mesgarani, Nima},
4 booktitle = {Advances in Neural Information Processing Systems},
5 year = {2023},
6}
This work is funded by the Ministerio para la Transformación Digital y de la Función Pública - Funded by EU – NextGenerationEU within the framework of the project Desarrollo de Modelos ALIA.