/ Модель

Характеристики

Лицензия
Своя лицензия
Архитектура
quran-reciter-id · dense
Библиотека
reciter-identifier
Опубликована
24 окт 2026

quran-reciter-detector

Классификация аудиоАудио → label3 профессии
33скачиваний за 30 дней1лайквеса обновлены25 окт 2026

Описание модели

Составлено на русском по карточке модели и метаданным Hugging Face

Модель сопоставляет запись чтения Корана с закрытой галереей голосов и предлагает наиболее похожего зарегистрированного чтеца.

quran-reciter-detector — модель идентификации чтецов Корана, созданная ahmaher04. Она сопоставляет аудиозапись с закрытой галереей из 289 голосовых записей 243 чтецов и возвращает наиболее близкого кандидата, а также тройку кандидатов с оценками косинусного сходства. Для сравнения используются нормализованные 192-мерные векторы голосовых записей; аудиоэнкодер — NVIDIA TitaNet-Small в формате ONNX для sherpa-onnx.

Модель предназначена для определения чтеца в записи длительностью более 15 секунд; рекомендуемая длина — около 30 секунд. Связанный процесс может также определить суру и диапазон аятов с помощью отдельной модели распознавания речи и выравнивания текста, но это не является задачей данного набора эмбеддингов.

Идентификация ограничена закрытым набором записей: незарегистрированный голос должен считаться неизвестным, а высокий балл не гарантирует верное совпадение. Реверберация, телефонный звук, групповое чтение, фоновый перевод и сходство макамов ухудшают результат. Модель не подтверждает, что звук является чтением Корана, и не устанавливает риваят. Лицензия указана как other; конкретные условия в предоставленных сведениях не раскрыты.

Сценарии применения

  • поиск чтеца Корана по записи длительностью от 20 секунд
  • ранжирование трёх наиболее похожих голосов из заданной галереи
  • проверка совпадения голоса с зарегистрированной записью чтеца

Ограничения

Модель работает только с голосами, представленными в закрытой галерее; сходство и порог оценки не гарантируют правильную идентификацию. Шум, реверберация, групповое чтение, фоновый звук и короткие фрагменты снижают надёжность.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Quran Reciter Voiceprints

Closed-set identifier for 243 Quran reciters across 289 recordings, and a verse aligner for 114 surahs / 6,236 ayahs.

A clip of 15 seconds or less is refused. Pass at least 20 seconds. 30 seconds is the length this model scores: the audio is cut into 20 second windows with a 10 second hop, each window is embedded with NVIDIA TitaNet-Small, and those unit vectors are averaged the same way the gallery was enrolled. The named reciter is the nearest recording, the first candidate, including when the cosine is under 0.70.

The same clip is transcribed with tarteel-ai/whisper-base-ar-quran (downloaded on first use, not stored here) and aligned to the plain Quran in quran/ayahs.txt.gz. Clips longer than 30 seconds are split first; one pass over the whole clip returns an empty transcript. The result is a surah and an ayah span. A line that occurs in more than one place, such as the refrain of ar-Rahman, stays unknown.

This repository is the gallery, the verse index, and the scoring code. It does not contain the encoder weights, the Whisper weights, or recitation audio.

Arabic, short: المقطع لازم يكون أطول من ١٥ ثانية، والأفضل ٣٠ ثانية. النموذج يسمّي أقرب قارئ حتى لو انخفض جيب التمام عن ٠٫٧٠، ويحدد السورة والآية من النص المنطوق.

The same gallery ships inside the Muslim app as assets/reciter_id/embeddings.bin. Row order matches catalog.json → items.

Hierarchy

Gallery hierarchy

The three API calls are walked in this order. A recording is stored once.

SourceEndpointWhat it adds
Riwayatriwayat?language=ar, then reciters?language=ar&rewaya={id}20 transmissions, 289 recordings
Recent readsrecent_reads?language=ar241 reads, 0 recordings outside the 289
Full listreciters?language=ar243 reciters, used for any moshaf the riwayah walk missed
idRiwayahRecordings
1حفص عن عاصم221
2ورش عن نافع13
3خلف عن حمزة2
4البزي عن ابن كثير2
5قالون عن نافع11
6قنبل عن ابن كثير1
7السوسي عن أبي عمرو2
8قالون عن نافع من طريق أبي نشيط1
9قراءة يعقوب الحضرمي بروايتي رويس وروح2
10ورش عن نافع من طريق أبي بكر الأصبهاني1
11البزي وقنبل عن ابن كثير1
12الدوري عن الكسائي6
13الدوري عن أبي عمرو5
15شعبة عن عاصم3
16ابن ذكوان عن ابن عامر2
18ورش عن نافع من طريق الأزرق2
19هشام عن ابي عامر1
20ابن جماز عن أبي جعفر1
21المصحف المعلم5
22المصحف المجود7
Total289

Ids 14 and 17 are not in the API. Each recording is its own row. The same sheikh can appear more than once when he has more than one riwayah or style.

How a clip is scored

How one clip is scored

ValueNumber
Reciters243
Recordings289
Embedding192-d, L2 norm 1
Matrix bytes221,952 (289 × 192 × 4)
SHA-256 of embeddings.binf0c2561f7ce1d66f738819dcaee9c40362931b99695cc86226fb24dd4501d1fd
Surahs per recording6 (67, 78, 36, 55, 18, 19), then lower numbers if those are missing
Windows per surah2, starting at 8 s and 30 s, 20 s each
Recordings with all 12 clips269
Mean clips11.7
Fewest clips2
Query windows20 s, hop 10 s
Minimum cliplonger than 15 s; 30 s is the scored length
Named resultfirst of the top 3 candidates
Ayahs in the aligner6,236 across 114 surahs

Same-sheikh pairs (131): minimum cosine 0.505, median 0.901. Different-sheikh pairs (19,861, seed 0): median 0.370, 99th percentile 0.672, maximum 0.819.

What you can use it for

  • Name a reciter from a clip of at least 20 seconds, when the speaker is one of the enrolled recordings. 30 seconds is the designed length.
  • Name the surah and the ayah span the reciter is reading.
  • Show the top three candidates and the cosine, and let a person confirm.
  • Reject a clip of 15 seconds or less, silence, or a reciter who was never enrolled.

What it does not do

  • It does not verify that the audio is Quran beyond the transcript match.
  • It does not clone a voice, and it must not be used to imitate a reciter.
  • It does not identify a private person. The gallery is only these public recordings.
  • It does not pick a riwayah by itself. Each recording is its own row. The label on that row (Hafs, Warsh, a mujawwad mushaf, a teaching mushaf) is metadata from the source catalog.

Model tree

FileWhat it is
embeddings.safetensorsfloat32 matrix, shape [289, 192], key embeddings. Each row is L2-normalized.
embeddings.binThe same matrix, raw little-endian float32, row-major, no header. This is the file the app loads. SHA-256 f0c2561f7ce1d66f738819dcaee9c40362931b99695cc86226fb24dd4501d1fd.
catalog.jsonOne object per row: reciterId, recordingId, nameAr, nameEn, recordingName, plus enrollment constants.
config.jsonDimensions, threshold, top-k, encoder URL and sha256.
preprocessor_config.jsonSample rate, clip length, which surahs were enrolled.
reciter_identifier.pyLoad, rank, 20 second windows, self-test, Hub upload.
verse_locator.pyAlign an Arabic transcript to surah and ayah.
quran/ayahs.txt.gzPlain text of all 6,236 ayahs, one per line.
quran/surahs.json114 surah names (Arabic and English) and ayah counts.
handler.pyInference Endpoints entry point. Downloads the encoder on startup.
LICENSEWhat you may do with the gallery.

embeddings.safetensors and embeddings.bin are the same 221,952 bytes of floats (289 × 192 × 4). Row i belongs to catalog["items"][i].

How a clip becomes a name

  1. Audio is mono, 16 kHz, longer than 15 seconds. Under 20 seconds the call raises and names nobody. 30 seconds is the length to record.
  2. Samples are float32 in [-1, 1]. PCM16 converts with sample / 32768.
  3. The clip is sliced into 20 second windows, hop 10 seconds. A window of 15 seconds or less is dropped. Each kept window is embedded with nemo_en_titanet_small.onnx (NVIDIA TitaNet-Small, 192-d).
  4. Each window vector is L2-normalized. Their mean is L2-normalized again. Enrollment did the same with up to 12 clips per recording.
  5. The pooled vector is scored by cosine against the gallery. The top 3 rows are kept. The named reciter is the first of those rows. A cosine under 0.70 still names that recording. agreement is how many windows pick the same reciterId.
  6. Whisper (tarteel-ai/whisper-base-ar-quran) transcribes the same clip in 30 second pieces. This checkpoint has no timestamp tokens, so one shot over 30 seconds comes back empty and the verse stays unknown. verse_locator.py aligns the words onto the mushaf and returns the surah plus the ayah the clip starts on and the ayah it reaches.

A different speaker model produces vectors in another space. Those scores are meaningless against this gallery. The ONNX file must be the one named below.

Encoder

Filenemo_en_titanet_small.onnx
ArchitectureNVIDIA TitaNet-Small, exported for sherpa-onnx
Size40,257,283 bytes
SHA-256ad4a1802485d8b34c722d2a9d04249662f2ece5d28a7a039063ca22f515a789e
URLhttps://github.com/k2-fsa/sherpa-onnx/releases/download/speaker-recongition-models/nemo_en_titanet_small.onnx

The release tag is spelled speaker-recongition-models upstream. That spelling is the real URL.

TitaNet was trained as a general speaker embedding model, including English speech. It is used here only as a frozen feature extractor. Nothing in TitaNet was fine-tuned on these reciters. Separation comes from the enrolled gallery, not from a classifier head.

Quick start

pip install numpy
python reciter_identifier.py --self-test

Expected line:

ok 289 voices, 243 reciters, dim 192, threshold 0.7

Score a vector you already computed with the same encoder:

from reciter_identifier import ReciterIdentifier
import numpy as np

gallery = ReciterIdentifier.from_pretrained(".")  # or "USER/quran-reciter-id"
matches, best = gallery.identify(np.load("clip_embedding.npy"))
if best is None:
    print("unknown", [(m.voice.name_en, round(m.score, 3)) for m in matches])
else:
    print(best.voice.name_ar, best.voice.name_en, best.voice.recording_name, best.score)

Score a wav. This installs the runtime and downloads the encoder once:

pip install numpy sherpa-onnx soundfile
python reciter_identifier.py --download-encoder nemo_en_titanet_small.onnx
python reciter_identifier.py --wav clip.wav --encoder nemo_en_titanet_small.onnx

clip.wav must be mono Quran recitation longer than 15 seconds (20 minimum, 30 preferred). Resample to 16 kHz if the file is something else. Exit code 2 means the reciter is unknown. The verse line is printed when Whisper is installed.

From the Hub, after upload:

from reciter_identifier import ReciterIdentifier

gallery = ReciterIdentifier.from_pretrained("USER/quran-reciter-id")

Decision rule

Best cosineMeaning
any cosine, candidates existName the first candidate. The reciter id is that row's reciterId.
no candidatesUnknown. Silence or a vector that does not rank.
windows disagreeagreement is under 0.5. The name is still the first candidate.
15 seconds or lessRefused. No name, no score.
20 to 30 secondsOne or two windows. 30 seconds gives two overlapping 20 second windows.

Fifteen seconds was not a stable voiceprint against this gallery. The enrollment clips are 20 seconds, so a query shorter than that is a different kind of vector. Record 30 seconds. The extra time is what the second window and the ayah aligner both use.

Top-k is 3 so a near tie can be shown. Only rank 1 is an automatic accept, and only above the threshold, and only when the windows agree.

Surah and ayah

verse_locator.py loads quran/ayahs.txt.gz (plain text, one ayah per line, 6,236 lines) and quran/surahs.json.

  1. Drop diacritics. Fold alef variants to ا, ى and ئ to ي, ة to ه, ؤ to و.
  2. If the transcript is long enough and starts with the basmalah, drop those four words so the match is the verse after it. Al-Fatihah keeps its basmalah in the index, because there it is ayah 1.
  3. Slide 5-word grams (4 if the transcript is shorter, 3 if it is only a few words) across the whole mushaf, including grams that cross an ayah boundary.
  4. Each gram votes for where the transcript starts. The start with the most votes wins. A tie is unknown. A vote share under 0.34 is unknown unless one place has at least 3 hits and at least twice the next place, which keeps a clip Whisper only heard in part. الحمد لله رب العالمين is a tie: it is ayah 1:2 and also 10:10, 39:75, and 40:65. The next words in a 30 second clip break that tie.
  5. The hit is surah / ayah at the first matched word, and end_surah / end_ayah at the last word. A 30 second murattal clip often covers more than one ayah, so the span is the result, not a single number.
from verse_locator import VerseLocator

hit = VerseLocator().locate("قل هو الله أحد الله الصمد")
# surah 112, ayah 1, end_ayah 2, Al-Ikhlas

From a wav, after pip install torch transformers:

from verse_locator import transcribe, VerseLocator
from reciter_identifier import ReciterIdentifier

gallery = ReciterIdentifier.from_pretrained(".")
text = transcribe("clip.wav")  # downloads tarteel-ai/whisper-base-ar-quran
found = gallery.identify_wav("clip.wav", "nemo_en_titanet_small.onnx", transcript=text)
print(found.reciter, found.verse)

identify_wav prints the verse on its own when you pass --wav. If PyTorch or transformers is not installed, the reciter result still returns and the verse line says the transcript was skipped.

Enrollment

Built by tools/reciter_id/build_catalog.py in the Muslim app repo.

Source index: https://www.mp3quran.net/api/v3/reciters (Arabic names and English names). Each moshaf entry is one recording: its own server, surah list, and riwayah or style.

The builder reads three endpoints, in order, and keeps each recording once:

  • https://www.mp3quran.net/api/v3/riwayat?language=ar then reciters?language=ar&rewaya={id} for every riwayah
  • https://www.mp3quran.net/api/v3/recent_reads?language=ar
  • https://www.mp3quran.net/api/v3/reciters?language=ar

For every recording that has audio:

  1. Prefer six surahs from this list, in order, skipping any the recording does not contain: 67, 78, 36, 55, 18, 19. If that is not enough, fill with other surah numbers below 100, then with whatever remains. Cap at six surahs.
  2. Download the first 2,000,000 bytes of {server}{surah:03d}.mp3.
  3. Decode with ffmpeg to mono 16 kHz. Take 20 seconds starting at 8 seconds, and another 20 seconds starting at 30 seconds when the partial file is long enough. The first window falls back to the opening if 8 seconds is past the end. Drop a window under 8 seconds.
  4. Embed each clip with TitaNet-Small. L2-normalize each vector. Average the vectors for that recording. L2-normalize the average. That average is the stored row.

A recording with no usable clip is left out. Re-running the script skips a recording whose six surahs were already tried (reciterId:recordingId).

Held-out checks, when they were run, used a surah from 20, 56, 59, 76, 34, 32 that was not one of the six enrollment surahs. Those probe files are not in this repository.

Gallery

289 rows, 243 reciters, 23 reciters with more than one recording. The busiest reciter in the file has 13 recordings (different riwayat, not 13 copies of the same reading).

Style, from recordingName:

StyleRows
Murattal (مرتل)272
Mujawwad (مجود)7
Teaching mushaf (معلم)6
Other wording4

The riwayah split, one row per API id, is the table under Hierarchy. Those counts add up to 289. A name search for "ورش" is larger than riwayah 2 because paths 10 and 18 are separate ids.

Ids match the mp3quran.net reciter id and moshaf id used by the app. recordingName is the catalog string as published by that API, usually Arabic, often repeated (حفص عن عاصم - مرتل).

Geometry of the gallery

All 289 rows have L2 norm 1 within 1e-6.

Cosine between two different recordings of the same reciter (131 pairs):

minimum0.505
10th percentile0.698
median0.901
mean0.858

Cosine between recordings of different reciters (19,861 random pairs, seed 0):

median0.370
mean0.372
99th percentile0.672
99.9th percentile0.752
maximum0.819
pairs ≥ 0.7095 (about 0.48%)

Same-person rows are usually close, and different people are usually far, but the tails overlap. That is why the unit of enrollment is the recording, not a single averaged vector per person. Mujawwad and murattal of one sheikh can sit far apart (the minimum same-person cosine is 0.50). Averaging them would blur both.

A few different-reciter pairs still exceed 0.70 inside the gallery. A query that lands in that overlap can be wrong even when the score clears the threshold. Show the recording name, not only the person, and keep the top three.

Evaluation

This is not a trained classifier, so there is no epoch, loss, or validation split in the usual sense. The operating point comes from the app:

On a search against this 289-voice gallery, a surah that had not been used for enrollment matched the correct reciter at 0.73 or above. Two misses in that check topped out at 0.65, which the threshold rejects. The clip list and the per-name table from that run are not stored here, so this card does not claim a precision or a recall.

What the shipped files do prove, and what python reciter_identifier.py --self-test checks:

  • shape is (289, 192)
  • 243 distinct reciterIds
  • every row is a unit vector
  • row 0 (Abdulbasit Abdulsamad, recording 51) scores cosine 1.0 against itself
  • a zero vector returns no matches

Do not read the in-gallery pair statistics as an accuracy number. Those pairs are enrollment vectors against each other, not fresh recordings.

Limitations

  • Closed set. A reciter who is not in catalog.json must come back unknown. A confident wrong name means the voice landed near someone who is enrolled. Treat 0.70 as a gate, not as certainty.
  • One style ≠ the person. Matching recording A does not prove the clip is that riwayah. It means this voiceprint was the nearest.
  • Channel and production. Studio reverb, telephone audio, a group reciting together, or a translation playing under the recitation will move the vector. The enrollment audio is clean mp3 of a single reciter.
  • Shared openings. Many reciters begin with the same isti‘adhah and basmalah. Enrollment starts at 8 seconds to reduce that. A query that is only the opening is a weak test.
  • Maqam overlap. Different reciters in the same maqam can score higher than the different-person median. Length helps. Score a 30 second clip, not a 15 second one.
  • English-oriented encoder. TitaNet-Small was not trained as a Quran model. It still separated these voices well enough to ship. A smaller WeSpeaker model was tried and collapsed different reciters together, which is why it is not used.
  • Names. English names are the API's transliteration (Maher Al Meaqli, Abdelaziz sheim). Arabic names are the ones to show to Arabic readers. Neither string was hand-corrected in this release.
  • Catalog drift. mp3quran.net can add reciters or replace a recording. This gallery is a snapshot. New voices stay unknown until someone rebuilds and publishes a new revision.
  • Not a religious source. A match does not certify tajweed, the riwayah, or that the clip is a complete ayah.

Ethics

The enrolled people are public reciters, and the clips are public Quran recordings. That does not make the tool a general speaker-ID system.

  • Do not enroll private users into a published copy of this gallery.
  • Do not use a low score as an accusation.
  • Do not synthesize speech in a reciter's voice from these vectors. The vectors are not a vocoder, and the license forbids impersonation anyway.
  • If you show a name, show the score or say that the score cleared 0.70. If it did not, say unknown.

Rights

Recording copyright stays with the reciters and the publishers. mp3quran.net is the index that was queried. This repo redistributes 192 numbers per recording, not the mp3.

The encoder file is NVIDIA TitaNet-Small via the sherpa-onnx release. Download it from the URL above. Its license is separate (NVIDIA NeMo models are distributed as CC-BY-4.0; sherpa-onnx is Apache-2.0). This repository does not relicense those weights.

The gallery and the Python in this folder are under the Quran Reciter Voiceprint License: identification use is allowed, standalone resale of the vectors is not, and impersonation is not.

Publish to the Hugging Face Hub

From this directory, after huggingface-cli login or with HF_TOKEN set:

pip install -U "huggingface_hub>=0.26" numpy
python reciter_identifier.py --publish YOUR_USER/quran-reciter-id

Add --private for a private model repo. The command creates the repo if it is missing and uploads every file here except caches.

Equivalent CLI:

huggingface-cli repo create quran-reciter-id --type model
huggingface-cli upload YOUR_USER/quran-reciter-id . --repo-type model \
  --commit-message "Publish the Quran reciter voiceprint gallery"

The model page reads this README.md as the model card, including the YAML block at the top. After the upload, set the discussion and the license widget if the Hub asks. license: other is intentional, because the terms are the file LICENSE, not a stock SPDX id.

Optional Inference Endpoint: point it at the uploaded repo and set the entrypoint to handler.py. The first start downloads about 40 MB of encoder weights into the instance. Send base64 wav:

{"inputs": {"audio": "<base64 wav>", "format": "wav"}}

The response has match (or null), unknown, threshold, and candidates.

Reproduce

From the app repository, with ffmpeg and the ONNX file at tools/reciter_id/models/nemo_en_titanet_small.onnx:

python3 -m venv tools/reciter_id/.venv
tools/reciter_id/.venv/bin/pip install -r tools/reciter_id/requirements.txt
tools/reciter_id/.venv/bin/python tools/reciter_id/build_catalog.py

That rewrites assets/reciter_id/. Rebuild this folder from those two files so embeddings.bin stays byte-compatible with the app. Do not change row order without changing catalog.json in the same commit.

A probe of held-out surahs, without writing them into the gallery:

tools/reciter_id/.venv/bin/python tools/reciter_id/build_catalog.py --probe 30

Citation

@misc{quran-reciter-voiceprints-2026,
  title        = {Quran Reciter Voiceprints},
  year         = {2026},
  howpublished = {Hugging Face model},
  note         = {289 TitaNet-Small voiceprints for 243 Quran reciters.
                  Closed-set cosine identification at threshold 0.70.}
}

Encoder:

@inproceedings{koluguri2022titanet,
  title     = {{TitaNet}: Neural Model for Speaker Representation with
               1D Depth-Wise Separable Convolutions and Global Context},
  author    = {Koluguri, Nithin Rao and Park, Taejin and Ginsburg, Boris},
  booktitle = {ICASSP},
  year      = {2022}
}

Runtime and ONNX export: sherpa-onnx speaker recognition models. Catalog index: mp3quran.net API v3.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · reciter-identifier · audio-classification

Можно запустить

Подбираем GPU…

Класс архитектуры
ReciterIdentifier
Ревизия весов
05f3b6e

0 моделей