Balochi TTS Three Speakers
Balochi Latin-script text-to-speech with three speaker voices, built with SpeechT5.
Modellquelle
- Art
- Text model
- Dateigröße
- 551 MB
- Version
- vmodel
- Aktualisiert
- 26. Okt. 2026
- Downloads
- 29
- Quelle
- Hugging Face
Quellenbeschreibung
Balochi-TTS-Three-Speakers
Balochi Latin-script text-to-speech with three speaker voices, built with SpeechT5.
- Author: Aynkader
- Model ID:
Aynkader/Balochi-TTS-Three-Speakers - Base: Fine-tuned from
BalochiT5-Fine-Tuned-Model2-News - Vocoder:
microsoft/speecht5_hifigan - Training data: 75 clips (25 per speaker, shared transcripts)
- Web demo:
Aynkader/Balochi-TTS
Speakers
| Voice | Key | Embedding file | Description |
|---|---|---|---|
| Ayn Káder | ayn_kader | speaker_embedding_ayn_kader.pt | Original news reader |
| Dódá | doda | speaker_embedding_doda.pt | Male voice |
| Dódén | doden | speaker_embedding_doden.pt | Female voice |
Quick start
import torch
import soundfile as sf
from huggingface_hub import hf_hub_download
from transformers import SpeechT5ForTextToSpeech, SpeechT5HifiGan, SpeechT5Processor
MODEL_ID = "Aynkader/Balochi-TTS-Three-Speakers"
device = "cuda" if torch.cuda.is_available() else "cpu"
processor = SpeechT5Processor.from_pretrained(MODEL_ID)
model = SpeechT5ForTextToSpeech.from_pretrained(MODEL_ID).to(device).eval()
vocoder = SpeechT5HifiGan.from_pretrained("microsoft/speecht5_hifigan").to(device).eval()
emb_path = hf_hub_download(MODEL_ID, "speaker_embedding_ayn_kader.pt")
speaker = torch.load(emb_path, map_location="cpu", weights_only=False)
if speaker.dim() == 1:
speaker = speaker.unsqueeze(0)
text = "Gwáderá tyáb dapá sharábay proshtagén bótalán daryáward paréshán kotagant."
inputs = processor(text=text, return_tensors="pt").to(device)
with torch.no_grad():
speech = model.generate_speech(
inputs["input_ids"],
speaker.to(device),
vocoder=vocoder,
threshold=0.62,
minlenratio=0.10,
maxlenratio=6.0,
)
sf.write("output.wav", speech.cpu().numpy(), 16000)
Supported text
Use Balochi Latin characters:
a b c d e g h i j k l m n o p r s t u w y z
á é ó (and uppercase)
. , : ? ! ' -
digits 0-9
Arabic script input is supported in the web Space via built-in Arabic → Latin conversion.
Model files
| File | Description |
|---|---|
config.json | SpeechT5 architecture |
model.safetensors | Fine-tuned weights (~578 MB) |
preprocessor_config.json | Mel spectrogram settings |
spm_char.model | SentencePiece tokenizer |
speaker_embedding_ayn_kader.pt | News reader embedding |
speaker_embedding_doda.pt | Male speaker embedding |
speaker_embedding_doden.pt | Female speaker embedding |
Training
- Base:
BalochiT5-Fine-Tuned-Model2-News(25 news clips) - Three-speaker fine-tune: 75 samples (Ayn Káder, Dódá, Dódén)
- Per-file speaker embeddings (x-vector)
- Script:
train_tts_three_speakers.pyin the upstream TTS project
Limitations
- Best for short paragraphs (≤100 characters recommended)
- Latin script input for direct inference; Arabic via converter
- Requires internet on first run for HiFi-GAN vocoder
- Small per-speaker dataset (25 clips each)
Citation
Aynkader/Balochi-TTS-Three-Speakers — https://huggingface.co/Aynkader/Balochi-TTS-Three-Speakers
License
Apache 2.0
Quellen
1 Quelle
Quellen
1 QuelleVerifiziert 26. Okt.
Modellartefakte
1 Artefakt
Modellartefakte
1 ArtefaktQuellenauszüge
3 Auszüge
Quellenauszüge
3 Auszüge--- license: apache-2.0 language: - bal tags: - text-to-speech - balochi - speecht5 - latin-script - multi-speaker library_name: transformers pipeline_tag: text-to-speech --- # Balochi-TTS-Three-Speakers Balochi **Latin-script** text-to-speech with **three speaker voices**, built with [SpeechT5](https://huggingface.co/docs/transformers/model_doc/speecht5). - **Author:** [Aynkader](https://huggingface.co/Aynkader) - **Model ID:** `Aynkader/Balochi-TTS-Three-Speakers` - **Base:** Fine-tuned from `BalochiT5-Fine-Tuned-Model2-News` - **Vocoder:** [`microsoft/speecht5_hifigan`](https://huggingface.co/microsoft/speecht5_hifigan) - **Training data:** 75 clips (25 per speaker, shared transcripts) - **Web demo:** [`Aynkader/Balochi-TTS`](https://huggingface.co/spaces/Aynkader/Balochi-TTS) ## Speakers | Voice | Key | Embedding file | Description | |-------|-----|----------------|-------------| | Ayn Káder | `ayn_kader` | `speaker_embedding_ayn_kader.pt` | Original news reader | | Dódá | `doda` | `speaker_embedding_doda.pt` | Male voice | | Dódén | `doden` | `speaker_embedding_doden.pt` | Female voice | ## Quick start ```python import torch import soundfile as sf from huggingface_hub import hf_hub_download from transformers import SpeechT5ForTextToSpeech, SpeechT5HifiGan, SpeechT5Processor MODEL_ID = "Aynkader/Balochi-TTS-Three-Speakers" device = "cuda" if torch.cuda.is_available() else "cpu" processor = SpeechT5Processor.from_pretrained(MODEL_ID) model = SpeechT5ForTextToSpeech.from_pretrained(MODEL_ID).to(device).eval() vocoder = SpeechT5HifiGan.from_pretrained("microsoft/speecht5_hifigan").to(device).eval() emb_path = hf_hub_download(MODEL_ID, "speaker_embedding_ayn_kader.pt") speaker = torch.load(emb_path, map_location="cpu", weights_only=False) if speaker.dim() == 1: speaker = speaker.unsqueeze(0) text = "Gwáderá tyáb dapá sharábay proshtagén bótalán daryáward paréshán kotagant." inputs = processor(text=text, return_tensors="pt").to(device) with torch.no_grad(): speech = model.generate_speech( inputs["input_ids"], speaker.to(device), vocoder=vocoder, threshold=0.62, minlenratio=0.10, maxlenratio=6.0, ) sf.write("output.wav", speech.cpu().numpy(), 16000) ``` ## Supported text Use **Balochi Latin** characters: ``` a b c d e g h i j k l m n o p r s t u w y z á é ó (and uppercase) . , : ? ! ' - digits 0-9 ``` Arabic script input is support...
Source context: 29 downloads · 0 likes · Pipeline text-to-speech · Library transformers · Repo Aynkader/Balochi-TTS-Three-Speakers
Source context: 101 downloads · 0 likes · Pipeline text-to-speech · Library transformers · Repo Aynkader/Balochi-TTS-Three-Speakers
