Datasets:
Persian Text Pool for TTS
Unvocalized Persian sentences, built as the input pool for training a Persian diacritization (harakat) model. Text only — no audio. Total repo ~473 MB.
TL;DR — vocalizing? use pool_100k
from datasets import load_dataset
ds = load_dataset("MSVG1989/persian-text-pool-tts", split="train") # default config = pool_100k
for r in ds:
vocalize(r["id"], r["raw"]) # `raw` = the unmarked text
100,000 sentences. 50/50 formal-informal, 45% spoken / 55% audiobook, spread over all 11,012 books, mean 17.8 words. Nothing else needs to be filtered or balanced.
Repo layout
Every source lives in its own numbered folder, and every stage of the pipeline is kept, so any decision can be revisited without re-downloading 342 GB.
data/
01_spoken_thomcles/ spontaneous spoken Persian (podcasts, interviews)
full/ 103613 rows every extracted row, no filtering
selected/ 71786 rows filters applied
02_audiobook_fidibo/ audiobook prose, 11,012 books
full/ 312681 rows raw audio-chunk rows, BEFORE sentence splitting
sentences/ 814773 rows after splitting, BEFORE filtering
selected/ 517341 rows filters applied
03_pool_100k_balanced/ ** the deliverable **
all/ 100000 rows the balanced pool
from_spoken/ 45000 rows its spoken half, split out for inspection
from_audiobook/ 55000 rows its audiobook half
jsonl/ gzipped JSONL of every folder above, for line-oriented pipelines
code/ the entire pipeline that produced this
samples/ 400 rows in plain text, if you just want to read some
MANIFEST.json every count, filter, threshold, seed and source revision
Which config do I load?
| config | rows | use it when |
|---|---|---|
pool_100k (default) |
100000 | you are vocalizing. Balanced and ready |
pool_100k_from_spoken |
45000 | you want to inspect or train on just the spoken half |
pool_100k_from_audiobook |
55000 | same, audiobook half |
all_selected |
589127 | you want the entire filtered pool, unbalanced |
spoken_selected |
71786 | spoken Persian only |
audiobook_selected |
517341 | audiobook prose only |
spoken_full |
103613 | you want to change a spoken filter |
audiobook_sentences |
814773 | you accept the sentence splitting but want different filters |
audiobook_full |
312681 | you want to redo the sentence splitting itself |
pool_100k* and every selected config share one identical schema, so they
concatenate freely. audiobook_sentences and the two full configs carry their own
source-shaped schemas.
full vs sentences vs selected vs pool
full— raw extraction, no filtering. Contains fragments, boilerplate and over-long rows. Kept so no filter decision is irreversible.sentences(audiobook only) — audio chunks stitched and split into sentences, but before any filter. Kept because the splitting and the filtering are separate decisions and you may want to revisit only one.selected— filters applied per source. Clean, but unbalanced: audiobook alone is 517341 rows, 84% formal, which would swamp the spoken register.pool_100k_balanced— a balanced, diversity-spread draw from bothselectedsets. This is the deliverable.
Where it came from
Both sources were extracted from markmuller/fidibo_normalize_part1_part5,
revision 91bebf08fc8628fb3f2e52a4ed67b7ff7bfb2edf.
That repo is 683 GB of 16 kHz TTS audio, not a text corpus. Text is roughly
0.07% of its bytes — 0.30 MB of text inside a 447 MB shard. Extraction meant
streaming ~342 GB (measured 252 MB/s on 16 parallel connections, ~23 minutes),
keeping the text columns and discarding the audio. It has no dataset card and no
license; the only non-.arrow file at its root is .gitattributes.
Two upstream details worth recording:
- Despite the name, parts 2, 3 and 4 do not exist in that repo — only 1 and 5.
- Every corpus appears twice, as
X_normalizedandX_normalized_h. The_hvariants carrytext_harakatfrom an older, weaker model (confidence-filtered atmin_conf=0.6) and were deliberately excluded — the whole point here is to re-vocalize from scratch. They also holdharakat_word_conf, an unfiltered per-word confidence array, which may be worth revisiting later for routing low-confidence words to an arbitrator model.
01 — spoken_thomcles
History, politics, economics and science podcasts and interviews: spontaneous
spoken Persian, heavily colloquial (میره, ایشون, بخواد, میشه, رو) and
largely unpunctuated, because it is transcribed speech. 390.9 hours of audio behind
103613 rows.
Rows kept whole, not split. With almost no punctuation, splitting yielded only 0.16 usable sentences per row; the median row is already 22 words.
02 — audiobook_fidibo
Audiobook prose: formal written narration with quoted colloquial dialogue, fully punctuated, 11012 distinct books.
These rows needed real work. The upstream rows are audio chunks, not sentences —
median 46 words, up to 154, starting and ending mid-sentence. So per book we sort by
audio segment index, stitch consecutive segments back together — never across an
index gap, which means missing audio and would create a false join — split on
.؟!؛, and keep only sentences with a real boundary at both ends. That turned
312681 chunks into 814773 candidate sentences at a median of 12–13 words.
The text field trap
Upstream ships three text fields and they are not interchangeable:
| field | what it is |
|---|---|
text |
TTS-normalized: numbers verbalized (۱۰ → ده), ZWNJ repaired (خانه ها → خانهها). This is what we used. |
text_raw |
pre-normalization, keeps bare digits. Differs from text on 429/1062 spoken rows but only 5/485 audiobook rows |
text_plain |
punctuation stripped (audiobook only); differs on 485/485 rows |
A diacritizer cannot mark digits, so text is the only correct choice. text_raw
would have shipped numerals into the vocalizer; text_plain would have destroyed the
punctuation that makes sentence splitting possible.
Fields
| field | meaning |
|---|---|
id |
stable — th-<shard>-r<row> (spoken), fid<part>-<book8>-s<n> (audiobook) |
raw |
the sentence, harakat stripped — the vocalization input |
register |
formal / informal — a proxy, see limitation 2 |
domain |
spoken_podcast or audiobook |
source |
upstream repo, config and revision |
n_words |
whitespace word count of raw |
selected_by |
full filter signature, for reproducibility |
register_score |
colloquial-marker rate the register label came from |
lex_coverage |
fraction of tokens in the project's 123,112-word lexicon |
had_source_harakat |
true if the upstream text already carried marks |
text_with_source_marks |
the original marked text, where it existed |
book |
book/recording id — null for every spoken row, see limitation 3 |
duration_s, mos_ovr |
duration and DNSMOS of the aligned audio (spoken only) |
asr_cer_max, asr_wer_max |
worst ASR error among the chunks a sentence came from (audiobook only) — a text-reliability signal, not filtered on |
run_len |
how many audio chunks were stitched to make the sentence (audiobook only) |
src_shard, src_row |
exact provenance upstream |
Selection
Seed 42 throughout; every row records its own selected_by.
| step | spoken | audiobook |
|---|---|---|
| in | 103613 rows | 814773 sentences |
| length outside 8–30 words | −28463 | −279822 |
| lexicon coverage below floor | −2978 (floor 0.75) | −16651 (floor 0.80) |
| exact duplicate | −305 | −760 |
| near-duplicate (5-gram MinHash, J ≥ 0.55) | −81 | −198 |
| gold-494 exact / near | −0 / −0 | −0 / −1 |
| selected | 71786 (69.3%) | 517341 (63.5%) |
The lexicon floors differ on purpose. The floor is set at ~P5 of each source's
own coverage distribution — the same way the project's pipeline/collect.py
calibrates per stratum. Spoken measured P05 0.765 → floor 0.75; audiobook sentences
measured P05 0.818 → floor 0.80. Copying one number to both would have been wrong in
one direction or the other.
The length filter is the dominant cut in both, deliberately: the long tail is
audio-bounded runs that cannot be split reliably, the short tail is fragments like
فصل نهم کتاب. Dedup is what removes podcast boilerplate — one sponsor read appeared
14 times, a show intro 11 times.
The held-out gold set is excluded
The 494 hand-reviewed sentences of the project's evaluation corpus are excluded by exact match and by token-set Jaccard ≥ 0.55. This removed 0 rows from spoken and 1 from audiobook — the gold set is news, forum, e-commerce and classical verse, which barely intersects podcasts and audiobooks. The check runs regardless, so the guarantee holds as sources are added. Never train on those 494; they are the ruler.
How the 100k was drawn
Quotas first, then round-robin across groups — one sentence per book/shard per pass — so the draw spreads as widely as the quota allows instead of emptying a few books:
| cell | quota | drawn from | groups used | max per group |
|---|---|---|---|---|
| spoken / informal | 30,000 | 54,581 | 97 / 97 shards | 310 |
| spoken / formal | 15,000 | 17,205 | 97 / 97 shards | 155 |
| audiobook / informal | 20,000 | 84,116 | 9,022 books | 3 |
| audiobook / formal | 35,000 | 433,225 | 10,931 books | 4 |
Result: 50,000 informal / 50,000 formal, 45,000 spoken / 55,000 audiobook, all 11,012 books represented, mean 17.8 words.
Spoken is held at 45% deliberately — it is the register the project's gold corpus has most of, and no earlier collection sampled real speech. The 17.8-word mean is close to the gold corpus's 17.3 on purpose: downstream per-sentence vocalization cost scales with length, and the cost model was calibrated on sentences that size.
Limitations — read before training on this
No literary or verse register exists here at all. The project's gold corpus has 108 literary sentences (poetry, lyrics, proverbs, classical verse). This pool is podcast speech and audiobook prose; nothing in it resembles them. Literary coverage must come from elsewhere — this pool cannot replace a Ganjoor-style collector.
The
registerlabels are a proxy, not annotation. Colloquial-marker rate over tokens, thresholded at 0.02, validated against the 494 gold sentences: accuracy 0.756, informal precision 0.941, recall 0.629. Soinformalis reliable;formalis not — a short informal sentence carrying no marker lands informal. The true informal share is higher than reported. Do not quote the register balance without this caveat.Spoken rows have no per-show identifier.
Thomcles_normalizedships neithermetricsnor a non-nullaudio.path, sobookis null for every spoken row and sentences cannot be capped per podcast. A prolific show may be over-represented invisibly. The only lever was a per-shard proxy across 97 shards, which is what the 100k draw uses. The audiobook source has no such problem — it has a real book key.Sentence boundaries came from audio. Audiobook sentences are bounded at both ends by punctuation, so they are genuine sentences. Spoken rows are not — they begin and end where the audio segment did, which can be mid-sentence.
7.06% of spoken rows arrived already carrying harakat from the upstream pipeline. Stripped for
raw, preserved intext_with_source_marks. Stripping also normalises a few letters, e.g.اصلاً→اصلا,کِیل→کیل.ASR error metrics are carried but not filtered on. Audiobook text came from forced alignment against audio;
asr_cer_max/asr_wer_maxexpose how bad the worst contributing chunk was (upstream median CER ≈ 0.023). If you want a stricter pool, filter on these — we deliberately did not, to keep the filter set to the ones we could justify from measurement.
Reproducing
code/ holds the whole pipeline:
python3 extract.py Thomcles_normalized extract/thomcles.jsonl # stream, keep text, drop audio
python3 segment.py extract/fid1.jsonl extract/fid1_seg.jsonl # audiobook only
python3 select2.py extract/thomcles.jsonl spoken_podcast sel/thomcles --lex 0.75
python3 select2.py extract/fid1_seg.jsonl,extract/fid5_seg.jsonl audiobook sel/fidibo --lex 0.80
python3 pool.py sel/pool_100k.jsonl
python3 publish3.py
Needs the project's words.jsonl (123,112 words) and corpus/corpus.jsonl (the 494
gold sentences) alongside, plus read access to the gated upstream repo.
License
The upstream repo carries no license and no dataset card. No license is asserted here and none is granted. This is derived text redistributed for research on Persian diacritization, gated pending clarification from the upstream owner. Ask before using it for anything else.
- Downloads last month
- -