yazgı-tts-1 · safe
A hardened fork of yazgı-tts-1, the Turkish text-to-speech model with 8 built-in voices by Erkam Kavak. The model, its voices and the speech it makes are unchanged: with the same seed, every voice gives bit-identical audio to upstream, on CUDA and on the CPU (for anything up to 5 minutes and 30,000 characters; longer input, which upstream cannot finish, is handled as described under Long text). What changed is how it is packaged and loaded, so you can deploy it where pickle files and network downloads are not allowed:
Upstream yazgi-tts 0.1.0 | This fork, yazgi-tts-safe 0.1.0.post3 | |
|---|---|---|
| Weight format | PyTorch pickle (model.pt, codec.pt) + voices/*.npz | safetensors (model, codec, voices.safetensors) |
| Loading | torch.load(weights_only=True), np.load | safetensors only. No torch.load, np.load or pickle in the package |
| Integrity | none | SHA-256 pinned in the package, checked before every load |
| Network | downloads from the Hub when no folder is given | none. Reads a local directory |
| PyTorch | torch>=2.2 | torch>=2.10 (CVE-2025-32434, CVE-2026-24747) |
| Voice cloning | clone(): downloads SpeechBrain at run time, patches huggingface_hub | removed (upstream advises the built-in voices) |
| Codec file | 388 MB (with the 72M encoder only cloning needs) | 101 MB (decoder; the silence frame is stored) |
| Long text | over ~30,000 characters: NormalizationError; over ~25 min of audio: GPU out of memory (12 GB) | no length limit: normalized in pieces at sentence breaks, decoded in windows; memory stays flat |
| Many callers | one at a time: a long text holds everyone up (8th caller waited 29 s for first audio) | YazgiPool: many at once, turns of one sentence; 8th caller waits ~1 s |
| HTTP API | no body limit, key on the command line | body capped, constant-time key check, key from an env var |
| Dependencies | torch, numpy, soundfile, normalizer-tr==0.7.0 (+ hub, clone extras) | torch, numpy, safetensors, normalizer-tr>=0.7.0,<0.8 |
Türkçe özet: Bu repo, yazgı-tts-1 Türkçe TTS modelinin güvenlik açısından sertleştirilmiş bir kopyasıdır. Model,
8 ses ve üretilen ses birebir aynıdır (aynı seed ile bit bit aynı çıktı). Ağırlıklar pickle yerine safetensors
biçimindedir, paket hiçbir pickle açmaz ve ağa çıkmaz. Dosyalar sabitlenmiş SHA-256 ile doğrulanır, paket
torch>=2.10 ister. Ses klonlama (internetten model indirdiği için) çıkarılmıştır.
Kurulum rehberi: docs/kurulum.md
Listen
Made with this fork (say(), seed 0), straight from the text shown:
| Voice | Text | Audio |
|---|---|---|
male-01 | Siparişiniz 14 Ekim'de saat 15:30'da kargoya verildi. Tahmini teslimat tarihi 16 Ekim Perşembe. | |
female-01 | Sepetinizdeki ürünlerin toplamı 1.299,90 TL. Üç taksit seçerseniz aylık ödemeniz 433,30 TL olacak. | |
male-02 | Siparişinizdeki 3 ürünün hepsi stokta. Yarın sabah kargoya verilecek ve size kısa bir mesaj göndereceğiz. | |
female-04 | Teslimat adresiniz Atatürk Caddesi No: 12, Daire 5, Kadıköy, İstanbul olarak kaydedildi. | |
male-03 | Bugün İstanbul'da hava parçalı bulutlu, sıcaklık 18 derece civarında. Akşam saatlerinde kuzeyden esen rüzgârın hızlanması ve gece boyunca hafif yağmur bekleniyor. Yarın ise güneşli bir gün bizi bekliyor. | |
female-02 | Kapadokya'ya ilk kez gidenler genellikle sabahın erken saatlerinde balonları izlemek için uyanır. Gün ağarırken yüzlerce renkli balon vadinin üzerinde yavaşça yükselir. Öğleden sonra yeraltı şehirlerini gezmek, akşam da yöresel bir lokantada testi kebabı yemek bu yolculuğun vazgeçilmezlerindendir. | |
female-03 | Merhaba, size nasıl yardımcı olabilirim? | |
male-04 | Merhaba, size nasıl yardımcı olabilirim? |
Long-form samples
Ten longer, harder passages of everyday Turkish prose, three paragraphs each (about 650 to 750 characters), chosen
for this fork: long sentences, lists, paragraph breaks and a typographic apostrophe. Each is read in one call
(say(), seed 0), with nothing edited afterwards. Every built-in voice reads at least one. The texts are in
samples/long-form/texts.json.
Together they make 7.6 minutes of audio, produced in 40 s on an RTX 5070 Ti Laptop (about 11× real time).
What we heard in long text: female-01 pauses noticeably longer between sentences than the other voices,
up to about 2 s, and reads at 7.3 to 7.9 s per 100 characters where the others read at 5.9 to 7.0. It does so with
every seed we tried (0, 1, 2), so it is the voice's style in long passages, not a one-off take. For long text,
male-01 and female-04 read the most evenly.
Sabahın erken saatlerinde sahil yolunda yürümeyi severim. Deniz henüz uyanmamış gibidir; dalgalar kıyıya usulca vurur, martılar ise sessizliği bozmak için birbirleriyle yarışır. Bu saatte havada hafif bir tuz kokusu ve serinlik olur.Yürürken çoğu zaman aklımdan geçen düşünceleri sıraya koymaya çalışırım. Günün planlarını, ertelediğim işleri, aramam gereken kişileri düşünürüm. Ama bir süre sonra bütün bu düşünceler yavaş yavaş dağılır ve geriye yalnızca adımlarımın sesi kalır.Bence insanın kendini dinlemesi için uzun tatillere ya da uzak yolculuklara ihtiyacı yok. Bazen yarım saatlik bir yürüyüş, haftalarca biriken yorgunluğu hafifletmeye yeter.
Annemin mutfağı benim için her zaman bir sığınak olmuştur. Küçükken okuldan döndüğümde kapıyı açar açmaz tereyağında kavrulan soğanın kokusunu alırdım ve o akşam ne pişeceğini hemen tahmin ederdim.Annem tarif defteri kullanmazdı. Ölçüleri gözüyle, tadı diliyle ayarlardı. Ona bir yemeğin tarifini sorduğumda genellikle biraz un, bir tutam tuz, kıvamına gelene kadar su diye cevap verirdi. Yıllar sonra aynı yemeği yapmaya çalıştığımda, o kıvamın aslında yılların deneyimi olduğunu anladım.Şimdi kendi mutfağımda yemek yaparken bazen onun hareketlerini taklit ettiğimi fark ediyorum. Kaşığı tencerenin kenarına aynı şekilde vuruyor, aynı şekilde tadına bakıp başımı sallıyorum. Galiba bazı şeyler kelimelerle değil, alışkanlıklarla aktarılıyor.
Teknoloji hayatımızı hızlandırdı, bu konuda kimsenin şüphesi yok. Eskiden haftalar süren yazışmalar artık birkaç saniyede tamamlanıyor. Bir zamanlar kütüphanelerde saatlerce aradığımız bilgilere bugün cebimizdeki küçük bir cihazla ulaşabiliyoruz.Ancak bu hızın bir bedeli de var. Sürekli gelen bildirimler, dikkatimizi parçalara bölüyor. Bir kitabı sonuna kadar okumak, bir filmi telefona bakmadan izlemek ya da bir arkadaşımızla kesintisiz sohbet etmek giderek zorlaşıyor.Belki de asıl mesele teknolojiyi bırakmak değil, onu nasıl kullandığımızı yeniden düşünmek. Hangi araçların hayatımızı kolaylaştırdığını, hangilerinin ise yalnızca zamanımızı tükettiğini ayırt edebilirsek, bu hızdan gerçekten fayda sağlayabiliriz.
Geçen yaz Karadeniz’in küçük bir köyünde on gün geçirdim. Köy, vadinin yamacına kurulmuştu ve evler sanki birbirine tutunarak ayakta duruyordu. Her sabah sis, aşağıdaki dereden yukarı doğru yavaşça tırmanır, öğleye doğru da tamamen kaybolurdu.Kaldığım evin sahibi yaşlı bir teyzeydi. Her sabah bana kendi yaptığı peyniri, tereyağını ve mısır ekmeğini ikram ederdi. Ben teşekkür ettikçe o daha fazlasını getirirdi. Orada misafirperverliğin bir görev değil, bir yaşam biçimi olduğunu gördüm.Şehre döndüğümde en çok o sessizliği özledim. Kalabalık caddelerde yürürken bazen gözlerimi kapatıyor ve o vadinin derin yeşilini, derenin sesini hatırlamaya çalışıyorum.
Bir dili öğrenmek, yeni bir pencere açmak gibidir. İlk başta kelimeler yabancı gelir, cümleler bir türlü akmaz. İnsan kendini çocuk gibi hisseder, en basit şeyleri bile söylemekte zorlanır.Fakat zamanla bir şeyler değişmeye başlar. Önce birkaç kelimeyi tanırsınız, sonra kısa cümleler kurarsınız. Bir gün fark etmeden o dilde bir şakaya gülerken bulursunuz kendinizi. İşte o an, emeklerin karşılığını aldığınız andır.Bence dil öğrenmenin en güzel yanı, yalnızca yeni kelimeler değil, yeni bir bakış açısı da kazandırmasıdır. Her dil, dünyayı biraz farklı anlatır. Ve biz o dili öğrendikçe, dünyayı da biraz daha geniş görmeye başlarız.
Kış akşamlarını hep sevmişimdir. Hava erken kararır, sokaklar sessizleşir ve evlerin pencerelerinden sarı ışıklar süzülmeye başlar. Böyle akşamlarda insan dışarıdaki soğuğu, içerideki sıcaklığın değerini anlamak için bir bahane gibi görür.Çocukluğumda kar yağdığı günler bayram gibiydi. Sabah uyanıp perdeyi araladığımda bembeyaz bir dünya görmek, beni hiçbir hediyenin sevindiremeyeceği kadar mutlu ederdi. Hemen giyinip dışarı koşar, akşama kadar kardan adam yapar, kızak kayardık.Şimdi kar yağdığında ilk aklıma gelen, trafiğin nasıl olacağı oluyor. Büyümek galiba biraz da bu demek. Yine de pencerenin önünde durup lapa lapa yağan kara baktığımda, içimdeki o çocuğun hâlâ orada olduğunu hissediyorum.
Kitap okumak benim için bir yolculuk gibidir. Bir romanın ilk sayfasını açtığımda, bambaşka bir şehre, bambaşka bir zamana adım atarım. Hiç tanımadığım insanların hayatlarına ortak olur, onların sevinçleriyle güler, acılarıyla üzülürüm.Bazı kitaplar bir solukta biter. Gece yarısını geçtiğini fark etmeden okumaya devam ederim. Bazıları ise yavaş yavaş, sindire sindire okunmak ister. Her cümlesinde durup düşünmem, bazı satırları tekrar tekrar okumam gerekir.Bir kitabı bitirdiğimde içimde hep küçük bir boşluk kalır. Sanki uzun süre birlikte yaşadığım dostlarla vedalaşmışım gibi. Ama sonra raftaki bir sonraki kitaba bakar ve yeni bir yolculuğa hazırlanırım.
Şehrin en eski semtlerinden birinde büyüdüm. Dar sokakları, ahşap evleri ve köşe başındaki bakkalıyla küçük bir dünyaydı orası. Herkes birbirini tanır, kimse kapısını kilitlemeye gerek duymazdı.Akşamüstleri mahallenin çocukları sokakta toplanır, hava kararana kadar oyun oynardık. Annelerimiz pencereden seslenmeden eve dönmezdik. Yaz geceleri ise büyükler kapı önlerine sandalye çıkarır, çay içip saatlerce sohbet ederlerdi.Yıllar içinde semt çok değişti. Ahşap evlerin çoğu yıkıldı, yerlerine yüksek binalar yapıldı. Bakkalın yerinde şimdi bir market var. Yine de o sokaklardan geçerken çocukluğumun seslerini duyar gibi oluyorum.
Spor yapmaya otuz yaşımdan sonra başladım. Önceleri her seferinde bir bahane bulurdum. Ya zamanım yoktu ya hava uygun değildi ya da çok yorgundum. Bir gün merdivenleri çıkarken nefes nefese kaldığımı fark ettim ve artık bir şeyleri değiştirmem gerektiğine karar verdim.İlk haftalar gerçekten zordu. Birkaç dakikalık koşudan sonra durmak zorunda kalıyor, ertesi gün bütün kaslarım ağrıyordu. Ama vazgeçmedim. Her gün biraz daha uzun koştum, biraz daha az yoruldum.Bugün spor hayatımın vazgeçilmez bir parçası oldu. Sadece bedenim değil, zihnim de değişti. Artık zor bir işle karşılaştığımda, ilk günlerdeki o yorgun koşuları hatırlıyor ve sabrın her şeyi değiştirebileceğini biliyorum.
Bahçeyle uğraşmak bana sabrı öğretti. Toprağa bir tohum ektiğinizde, ertesi gün çiçek açmasını bekleyemezsiniz. Sulamanız, beklemeniz, ilgilenmeniz ve en önemlisi zamana güvenmeniz gerekir.İlk yıl ektiğim domateslerin çoğu tutmadı. Bazıları fazla sudan, bazıları güneşsizlikten kurudu. Hayal kırıklığına uğradım ama pes etmedim. Ertesi yıl daha dikkatli davrandım, toprağı daha iyi hazırladım ve fideleri doğru yere diktim.Şimdi her yaz bahçemden topladığım sebzelerle sofra kuruyorum. Kendi emeğinizle yetiştirdiğiniz bir domatesin tadı, marketten aldığınız hiçbir şeye benzemiyor. Belki de bunun sebebi, o domatesin içinde aylarca süren bir bekleyişin saklı olması.
Quickstart
Full step-by-step guide (GPU/CPU PyTorch, verifying the files, HTTP API, web demo, air-gapped install, troubleshooting): docs/install.md · Türkçe: docs/kurulum.md
# 1. the package (needs torch>=2.10; install the CUDA build of torch first if you have a GPU)
pip install "https://huggingface.co/muhammedekinci/yazgi-tts-1-safe/resolve/main/dist/yazgi_tts_safe-0.1.0.post3-py3-none-any.whl"
# 2. the model files, into a local directory (once; the package itself never downloads anything)
hf download muhammedekinci/yazgi-tts-1-safe model.safetensors codec.safetensors voices.safetensors SHA256SUMS --local-dir yazgi-model
(cd yazgi-model && sha256sum -c SHA256SUMS)
# 3. speak
YAZGI_TTS_ROOT=yazgi-model python -m yazgi_tts "Siparişiniz 14 Ekim'de saat 15:30'da kargoya verildi." -o out.wav --voice male-01
from yazgi_tts import YazgiTTS
from yazgi_tts.audio import write_wav
tts = YazgiTTS("yazgi-model") # or set YAZGI_TTS_ROOT
audio = tts.say("Toplam tutar 1.299,90 TL.", voice="female-01", seed=0) # 24 kHz float32
write_wav("out.wav", audio)
tts = YazgiTTS("yazgi-model", pronunciations={"Xiaomi": "şaomi"}) # your own readings for names
for chunk in tts.stream("Merhaba! Siparişiniz hazırlanıyor.", voice="male-01"):
... # 24 kHz float32 chunks while the rest is still being made
The import name is still yazgi_tts and the API is upstream's, minus clone(). Existing code needs only a model
directory: YazgiTTS() → YazgiTTS("yazgi-model"). Do not install this and upstream yazgi-tts in one environment.
HTTP API: YAZGI_TTS_API_KEY=... python -m yazgi_tts.serve --model yazgi-model --port 8000 --slots 8, then
POST /tts {"text": "...", "voice": "male-01"} for a WAV file, or POST /tts/stream for raw 16-bit PCM at 24 kHz.
Web demo: python demo/server.py --yazgi yazgi-model: type text, pick a voice, or compare all 8 voices at once.
| Voice | Description (from the upstream card) |
|---|---|
male-01 (default) | thirties, deep, warm, narrator |
male-02 | young adult, medium pitch, gentle, slow |
male-03 | fifties, medium pitch, soft, news presenter |
male-04 | thirties, low, soft |
female-01 | young adult, high, bright, receptionist |
female-02 | sixties, low, strong, calm |
female-03 | sixties, medium pitch, bright, confident |
female-04 | young adult, high, clear, relaxed |
Shared and live use: YazgiPool
YazgiTTS makes one clip at a time, so a service built on it puts every caller in one line, and one long text holds
everyone up. YazgiPool serves many callers from one copy of the weights, fairly:
from yazgi_tts import YazgiTTS, YazgiPool
pool = YazgiPool(YazgiTTS("yazgi-model"), slots=8, # once at startup; ~50 MB of GPU memory per slot
max_active=32, max_wait=30) # above 32 at once, newcomers queue (up to 30 s)
stream = pool.stream("Merhaba! Siparişiniz hazırlanıyor.", voice="female-01") # from any thread
for chunk in stream: # 24 kHz float32: 0.5 s first, then 2 s at a time
play(chunk)
audio, seed = pool.say("Kısa bir cümle.", voice="male-01", seed=7)
- Up to
slotsrequests generate at once, each slot with its own buffers, CUDA graph, CUDA stream and random generator. - A request is generated one sentence chunk per turn, then goes back in line. The next turn goes to the request whose listener would run out of audio soonest, a new request counting as due at once: a newcomer hears its first audio quickly, and a caller who is already listening is served before its audio runs dry. A long text, far ahead of its listener, waits its turn.
- Each request keeps its own random state between turns: the same text, voice and seed give the same audio however busy the pool is.
- Admission queue.
max_activecaps how many requests are served at once: as many as the GPU keeps ahead of real-time playback. Above it, new requests wait in a queue, first come first served, before their first audio, so a crowd delays newcomers instead of making every listener stall mid-sentence.max_queueandmax_waitbound the queue; a request beyond them getsPoolBusy(the HTTP API answers503withRetry-After). Withoutmax_activethere is no limit; the HTTP API defaults to 4 × slots. - Closing a stream (a client hanging up) stops its remaining work, or takes it out of the queue.
pool.close()(orwith YazgiPool(...)) gives the GPU memory back.
python -m yazgi_tts.serve and the web demo use it. tools/benchmark_pool.py measures it on your GPU, to choose
slots (the default, 8, suits a 12 GB laptop GPU). Measured on an RTX 5070 Ti Laptop: N listeners each ask for a
~45 s passage at the same moment and start playing at their first chunk.
| First audio, mean / worst | Playback stalls | |
|---|---|---|
One line (YazgiTTS behind a lock), 4 listeners | 6.4 s / 12.8 s | none |
| One line, 8 listeners | 14.5 s / 28.8 s | none |
YazgiPool, 8 slots, 4 listeners | 0.6 s / 0.6 s | none |
YazgiPool, 8 slots, 8 listeners | 1.2 s / 1.2 s | none |
YazgiPool, 8 slots, 16 listeners | 3.0 s / 5.4 s | none |
YazgiPool, 8 slots, a new listener every second (81 in 90 s, ~45 at once) | 0.7 s / 1.7 s | none |
While a one-hour text was being generated, new short requests got their first audio in 0.21 s on average (0.24 s
at worst); the hour itself still finished in 5.8 minutes. Without a limit, above capacity every listener stalls; with
max_active set to capacity, newcomers wait instead. At twice capacity (a new listener every 0.5 s, 166 in 90 s), no
limit: 99.4 % of listeners stalled mid-sentence; max_active=32: none did (first audio waited in the queue
instead, 30 s at worst with max_wait=30, which turned 37 away). Size slots and max_active for the expected
load. Pool audio has the quality of YazgiTTS.stream; it is
not sample-identical to a single-caller stream with the same seed, because each slot draws from its own generator.
Versions
Every version is a tagged commit on this repo; pin one with --revision, or use the tag in the wheel URL:
| Tag | What it is |
|---|---|
v0.1.0.post3 | adds an admission queue to YazgiPool (max_active): above capacity, newcomers wait instead of everyone stalling |
v0.1.0.post2 | adds YazgiPool for shared and live use (the HTTP API and demo use it) |
v0.1.0.post1 | the hardened fork with long-text support, before YazgiPool |
hf download muhammedekinci/yazgi-tts-1-safe --revision v0.1.0.post1 --local-dir yazgi-tts-1-safe-0.1.0.post1
pip install "https://huggingface.co/muhammedekinci/yazgi-tts-1-safe/resolve/v0.1.0.post1/dist/yazgi_tts_safe-0.1.0.post1-py3-none-any.whl"
The model files are the same in both versions, with the same SHA-256 sums. See CHANGELOG.md for the details.
Security model
Scan results (modelscan, pip-audit, bandit, detect-secrets, run-time network tracing, ruff): see SECURITY.md. All clean.
What the package does when it loads:
- Finds the model directory: the
rootargument, or$YAZGI_TTS_ROOT. There is no default and no download. - Hashes each of the three files and compares it with the SHA-256 pinned in
yazgi_tts/weights.py. A mismatch raisesWeightsErrorbefore the file is parsed. - Reads it with
safetensors, which holds raw tensors and a JSON header. Parsing it cannot run code. The header must sayyazgi-tts-safetensors/1and the right kind (tts,codecorvoices).
How the files were made: tools/convert_to_safetensors.py is the only code that ever opened the upstream pickles,
once, offline. Before loading, it scans every pickle statically, without running it, and refuses anything that
references a global other than collections.OrderedDict, torch.FloatStorage and
torch._utils._rebuild_tensor_v2. The upstream files reference exactly those three. It then loads them with
torch.load(weights_only=True) on torch ≥ 2.10. Voices are read with numpy.load(allow_pickle=False) after checking
their arrays and dtypes.
The codec's encoder is left out. Synthesis used it for one thing: the code frame of a silent second, which joins sentences. That frame is computed at conversion, checked identical on the CPU and on CUDA, and stored with the codec. The conversion is reproducible. Run it on the upstream files and compare hashes:
hf download erkamk/yazgi-tts-1 model.pt codec.pt "voices/*" --revision 87c89ad84556fb3f1c171f7f88a37ddc0f806b04 --local-dir upstream
python tools/convert_to_safetensors.py upstream out && diff out/SHA256SUMS SHA256SUMS
Long text: upstream fails on long input in two places, and this fork fixes both without changing shorter output. normalizer-tr refuses more than 32 KiB at once, so longer text is normalized in pieces cut at paragraph and sentence breaks (measured: no word read differently from one call; cutting at any space changed 3 places, cutting blindly 13 to 31). The decoder's attention is computed through a full T × T mask, so a single decoding pass runs out of memory at about 25 minutes of audio on 12 GB; beyond 5 minutes, audio is decoded in 2-minute windows with 272 frames of context each side. That context covers everything the decoder can see (measured: −254 to +247 frames), so in float64 the windows give exactly the single-pass audio; in float32 they differ by at most ~2e-4, 190 times less than upstream's own CPU-vs-GPU difference. Tested with 61,351 characters of prose: 63.8 minutes of audio in 5.5 minutes on an RTX 5070 Ti Laptop, with 0.40 GB of extra GPU memory at peak (upstream stops at about 30,000 characters).
Same audio as upstream: tools/compare_with_upstream.py runs upstream and this fork side by side and compares
every built-in voice through say(), plus stream(), sample by sample. Result on an RTX 5070 Ti and on its CPU:
9 / 9 bit-identical on each.
Tests (pytest tests, 24 tests) cover the hash pinning, refusal of altered, misnamed or wrong-kind files, the
encoder-less codec, the HTTP API's key check, body cap and input checks, real synthesis with all 8 voices, and a scan
that fails if torch.load, np.load, pickle, allow_pickle, huggingface_hub, speechbrain, urllib,
requests or socket appear in the package.
Files
| File | What it is |
|---|---|
model.safetensors | the TTS model: talker and code predictor (56M) |
codec.safetensors | the codec's quantizer and decoder (25M), and the silence code frame |
voices.safetensors | the 8 built-in voices: reference codes and speaker embeddings |
SHA256SUMS | hashes of the three, the same ones pinned in the package |
config.json | model facts, upstream revision and hashes |
dist/ | the built wheel and sdist of yazgi-tts-safe |
src/yazgi_tts/ | package source; weights.py is the new loading layer |
tools/ | convert_to_safetensors.py (the one-time guarded conversion), compare_with_upstream.py |
tests/ | the test suite |
docs/install.md, docs/kurulum.md | installation guide, in English and Turkish |
demo/ | a small web page to make and compare clips, standard library only |
samples/ | the clips above; samples/long-form/ holds the ten long passages and their texts |
SECURITY.md | security model and scan results |
LICENSE, NOTICE, ATTRIBUTION.md | Apache 2.0, upstream credits and the list of modifications, data attribution |
CHANGELOG.md | what this fork changed |
The model

Figure from the upstream model card, by Erkam Kavak.
- Codec: 24 kHz audio as 12.5 frames per second, each frame 16 codes from 2,048 (2.2 kbps). This fork ships the 25M decoder only.
- TTS model (56M): an autoregressive talker writes the first code of each frame, and a small code predictor fills the other 15. The voice comes from a short reference and a speaker embedding.
- Text front end: normalizer-tr 0.7 plus upstream's rules for initialisms, codes and units. Long text is split into whole sentences (up to 300 characters) and decoded in one pass.
Accuracy and speed are upstream's, since the audio is identical. Upstream reports, on Freya-TR-Eval (495 sentences, 3 seeded takes, faster-whisper large-v3 on audio band-limited to 8 kHz):
| Voice | WER % ↓ | CER % ↓ | UTMOS ↑ |
|---|---|---|---|
male-01 (best voice) | 0.90 ± 0.12 | 0.17 | 4.01 |
female-01 | 1.06 ± 0.25 | 0.20 | 3.98 |
Upstream also reports about 6× real time on a laptop CPU (Apple M5, 4 threads). We did not re-run the benchmark. On our RTX 5070 Ti Laptop, a 9 s sentence took about 0.8 s (≈ 11× real time).
Limitations
- Little emotion. It reads clearly and calmly but does not show emotion such as excitement or sympathy.
- No voice cloning in this fork. Use the 8 built-in voices. Upstream's
clone()needed a run-time download and upstream rates its similarity as weak (about 0.27 on real speakers). - Turkish only. Foreign names and words are read with Turkish letter sounds; pass
pronunciationsto fix the ones you need. - Long text has no length limit. One
YazgiTTS.say()call holds that model until it is done (about 11× real time on an RTX 5070 Ti); for many callers useYazgiPool, which takes long texts sentence by sentence. - One clip at a time per
YazgiTTS. The fast generator reuses its buffers and the seed is process-wide. For concurrent callers useYazgiPool(see Shared and live use), as the HTTP API and the demo do.
Responsible use
This model makes synthetic speech, and people who hear it should know that. Tell listeners they are hearing an AI-generated voice ("Bu görüşmede yapay zekâ ile üretilmiş bir ses kullanılmaktadır.") and label the audio you publish ("Bu ses yapay zekâ ile üretilmiştir."). Do not use it to impersonate real people or in scams. Numbers, dates and addresses go through automatic normalization; for banking, health, legal or emergency messages, have a person check the text and the audio first.
Data and licenses
Training data, as listed by upstream:
| Source | Kind | License | Hours | Used for |
|---|---|---|---|---|
| Alania synthetic speech, CC BY subset | synthetic, ~2,700 voices | CC BY 4.0 | 2,485 (TTS), 1,150-1,860 (codec) | TTS, codec |
YODAS2 Turkish (tr000) | real, YouTube | CC BY 3.0 (per video) | 500+ | codec |
| Common Voice 21.0 Turkish | real, crowd-recorded | CC0 1.0 | ~75 | codec |
| MediaSpeech Turkish | real, broadcast | CC BY 4.0 | 10 | codec |
| FLEURS Turkish (train) | real, read speech | CC BY 4.0 | 8.3 | codec |
License and credit
Apache 2.0, for the weights and the code, the same as upstream.
- Model and original code: yazgı-tts-1 by Erkam Kavak. This fork is not affiliated with or endorsed by the upstream author.
- Data: Alania Synthetic Speech TR (cloud0day3, CC BY 4.0); YODAS2 (ESPnet, Li et al., 2023; each video by its uploader, CC BY 3.0; video ids in ATTRIBUTION.md); Common Voice 21.0 (Mozilla Foundation, CC0 1.0); MediaSpeech (Kolobov et al., 2021, CC BY 4.0); FLEURS (Google, Conneau et al., 2022, CC BY 4.0). Alania's speech was generated with VoxCPM2, and part of its text comes from FineWeb-2 (ODC-By 1.0).
- Tools: normalizer-tr (Apache-2.0, text front end); SpeechBrain spkrec-resnet-voxceleb (Apache-2.0, used upstream to make the speaker embeddings).
- Evaluation (upstream): Freya-TR-Eval (Freya, CC BY 4.0) and its re-run (PatientDesk AI, Apache-2.0).
- Modifications in this fork are listed in
NOTICEandCHANGELOG.md.
Provided "as is", without warranty of any kind, under the Apache License 2.0.