Downloads · 30 days
24
13% of all-time downloads
servinosmanov/speecht5-crh-sevil
speecht5-crh-sevil is a text-to-speech model from servinosmanov. Use it when you need text read aloud. The card lists the license as apache-2.0.
Text-to-Speech model for Crimean Tatar language (Qırımtatar tili) based on Microsoft SpeechT5.
Downloads · 30 days
24
13% of all-time downloads
All-time downloads
189
Public
Parameters
144M
578 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors578 MB · 100%
From the Hugging Face model README
Text-to-Speech model for Crimean Tatar language (Qırımtatar tili) based on Microsoft SpeechT5.
This model uses phonetic v4 mapping to convert Crimean Tatar Latin script to English-friendly phonetic representation:
| Original | Phonetic | Sound |
|---|---|---|
| ğ | gh | soft g |
| ç | ch | ch |
| ş | sh | sh |
| ñ | ng | ng |
| ı | y | ы |
| ö | o | o |
| ü | u | u |
| j | zh | ж |
| c | dj | дж |
import torch
from transformers import SpeechT5Processor, SpeechT5ForTextToSpeech, SpeechT5HifiGan
# Load model
model_id = "servinosmanov/speecht5-crh-sevil"
processor = SpeechT5Processor.from_pretrained(model_id)
model = SpeechT5ForTextToSpeech.from_pretrained(model_id)
vocoder = SpeechT5HifiGan.from_pretrained("microsoft/speecht5_hifigan")
# Load speaker embedding
speaker_embedding = torch.load("speaker_embedding.pt")
# Phonetic mapping function
def to_phonetic(text):
replacements = [
('ğ', 'gh'), ('Ğ', 'GH'),
('ç', 'ch'), ('Ç', 'CH'),
('ş', 'sh'), ('Ş', 'SH'),
('ñ', 'ng'), ('Ñ', 'NG'),
('ı', 'y'), ('I', 'Y'),
('ö', 'o'), ('ü', 'u'),
('j', 'zh'), ('J', 'ZH'),
('c', 'dj'), ('C', 'DJ'),
]
for old, new in replacements:
text = text.replace(old, new)
return text
# Generate speech
text = "Selam aleykum"
inputs = processor(text=text, return_tensors="pt")
speech = model.generate_speech(inputs["input_ids"], speaker_embedding.unsqueeze(0), vocoder=vocoder)
# Save audio
import soundfile as sf
sf.write("output.wav", speech.numpy(), samplerate=16000)
Apache 2.0
Osmanov, Servin (2025). speecht5-crh-sevil: Crimean Tatar Text-to-Speech Model. HuggingFace. https://huggingface.co/servinosmanov/speecht5-crh-sevil