Ir para o conteúdo
ModelListadosExterno
Baixar

Balochi TTS Three Speakers

Balochi Latin-script text-to-speech with three speaker voices, built with SpeechT5.

TipoText modelVersãomodelBnota

Fonte do modelo

Tipo
Text model
Tamanho do arquivo
551 MB
Versão
vmodel
Atualizado
26 de out. de 2026
Downloads
29
Fonte
Hugging Face

Descrição da fonte

Balochi-TTS-Three-Speakers

Balochi Latin-script text-to-speech with three speaker voices, built with SpeechT5.

Speakers

VoiceKeyEmbedding fileDescription
Ayn Káderayn_kaderspeaker_embedding_ayn_kader.ptOriginal news reader
Dódádodaspeaker_embedding_doda.ptMale voice
Dódéndodenspeaker_embedding_doden.ptFemale 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

FileDescription
config.jsonSpeechT5 architecture
model.safetensorsFine-tuned weights (~578 MB)
preprocessor_config.jsonMel spectrogram settings
spm_char.modelSentencePiece tokenizer
speaker_embedding_ayn_kader.ptNews reader embedding
speaker_embedding_doda.ptMale speaker embedding
speaker_embedding_doden.ptFemale speaker embedding

Training

  1. Base: BalochiT5-Fine-Tuned-Model2-News (25 news clips)
  2. Three-speaker fine-tune: 75 samples (Ayn Káder, Dódá, Dódén)
  3. Per-file speaker embeddings (x-vector)
  4. Script: train_tts_three_speakers.py in 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

Fontes

1 fonte
Hugging FacePrimárioVersão cc25ef69be28788d3add9366b9144aee4e6b6a27
huggingface.co/Aynkader/Balochi-TTS-Three-Speakers/tree/cc25ef69be28788d3add9366b9144aee4e6b6a27

Verificado 26 de out.

Artefatos de modelo

1 artefato

model.safetensors

safetensors · 551 MB · SHA-256 b0497146517e…910f · Hugging Face

Download file

Trechos de fonte

3 trechos

--- 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