Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -28,132 +28,109 @@ tags:
|
|
| 28 |
<p align="center">
|
| 29 |
<img src="https://img.shields.io/badge/Audio%20Format-Opus%20(16kHz,%2032kbps)-emerald?style=for-the-badge&logo=opus" alt="Opus Format">
|
| 30 |
<img src="https://img.shields.io/badge/Total%20Reciters-34-blue?style=for-the-badge" alt="Total Reciters">
|
| 31 |
-
<img src="https://img.shields.io/badge/
|
| 32 |
-
<img src="https://img.shields.io/badge/
|
|
|
|
| 33 |
</p>
|
| 34 |
|
| 35 |
---
|
| 36 |
|
| 37 |
## π Overview
|
| 38 |
|
| 39 |
-
**Quranic Recitation Dataset (Word-by-Word Sync)** is a highly optimized, production-ready dataset containing high-quality audio recitations of the Holy Quran synchronized
|
| 40 |
|
| 41 |
-
This dataset features **34 world-renowned reciters**, with every
|
| 42 |
|
| 43 |
---
|
| 44 |
|
| 45 |
## π Key Features
|
| 46 |
|
| 47 |
-
* **
|
| 48 |
-
* **
|
| 49 |
-
* **
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
* **Word-Level Accuracy**
|
| 53 |
|
| 54 |
---
|
| 55 |
|
| 56 |
-
## π‘ CDN
|
| 57 |
|
| 58 |
-
This dataset is
|
| 59 |
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
Format your endpoint URL as follows:
|
| 64 |
-
```text
|
| 65 |
-
https://huggingface.co/datasets/zaibihassan/Quranic-Recitation-Data/resolve/main/{Reciter Name}/{Surah Number}/{File}
|
| 66 |
```
|
| 67 |
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
|
| 73 |
-
|
| 74 |
-
|
|
|
|
|
|
|
| 75 |
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
const cdnUrl = "https://huggingface.co/datasets/zaibihassan/Quranic-Recitation-Data/resolve/main/Alijon%20Qari/001/001.pb";
|
| 79 |
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
// Decode the binary payload using protobuf.js
|
| 86 |
-
const message = SurahTimestamps.decode(uint8Array);
|
| 87 |
-
const timingData = SurahTimestamps.toObject(message);
|
| 88 |
-
|
| 89 |
-
console.log("Loaded High-Performance Timings:", timingData);
|
| 90 |
-
}
|
| 91 |
```
|
| 92 |
-
</details>
|
| 93 |
-
|
| 94 |
-
<details>
|
| 95 |
-
<summary><b>2. Streaming Audio Natively in HTML</b></summary>
|
| 96 |
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 102 |
```
|
| 103 |
-
|
|
|
|
|
|
|
|
|
|
| 104 |
|
| 105 |
---
|
| 106 |
|
| 107 |
## π Dataset Structure
|
| 108 |
|
| 109 |
-
The dataset is organized
|
| 110 |
|
| 111 |
-
|
| 112 |
-
1. `
|
| 113 |
-
2. `
|
| 114 |
-
3. `[SurahNumber].pb` - The binary Protocol Buffer timestamp mappings.
|
| 115 |
|
| 116 |
-
```
|
| 117 |
Quranic-Recitation-Data/
|
| 118 |
βββ Abdul Basit Abdul Samad (Mujawwad β Hafs)/
|
| 119 |
β βββ 001/
|
| 120 |
-
β β βββ 001.opus
|
| 121 |
-
β β
|
| 122 |
-
β β βββ 001.pb
|
| 123 |
β βββ 002/
|
| 124 |
-
β .
|
| 125 |
-
|
|
|
|
| 126 |
βββ Mishari Rashid Al Afasy (Murattal β Hafs)/
|
| 127 |
-
|
|
|
|
| 128 |
```
|
| 129 |
|
| 130 |
---
|
| 131 |
|
| 132 |
-
## β±οΈ Timing Data Schema
|
| 133 |
-
|
| 134 |
-
The timing data maps a specific Verse (Ayah) ID to an array of word segments.
|
| 135 |
-
Each segment contains 4 values:
|
| 136 |
-
1. `word_index_0_based`: The word index starting from 0.
|
| 137 |
-
2. `word_index_1_based`: The word index starting from 1.
|
| 138 |
-
3. `timestamp_from`: The start time of the word in milliseconds.
|
| 139 |
-
4. `timestamp_to`: The end time of the word in milliseconds.
|
| 140 |
-
|
| 141 |
-
### JSON Example (`001.json`):
|
| 142 |
-
```json
|
| 143 |
-
{
|
| 144 |
-
"1:1": {
|
| 145 |
-
"segments": [
|
| 146 |
-
[0, 1, 9410, 10050],
|
| 147 |
-
[1, 2, 10130, 11030],
|
| 148 |
-
[2, 3, 11070, 12580],
|
| 149 |
-
[3, 4, 12660, 15360]
|
| 150 |
-
]
|
| 151 |
-
}
|
| 152 |
-
}
|
| 153 |
-
```
|
| 154 |
|
| 155 |
-
|
| 156 |
-
|
|
|
|
| 157 |
```protobuf
|
| 158 |
syntax = "proto3";
|
| 159 |
package recitation;
|
|
@@ -161,8 +138,8 @@ package recitation;
|
|
| 161 |
message WordSegment {
|
| 162 |
int32 word_index_0_based = 1;
|
| 163 |
int32 word_index_1_based = 2;
|
| 164 |
-
int32 timestamp_from = 3;
|
| 165 |
-
int32 timestamp_to = 4;
|
| 166 |
}
|
| 167 |
|
| 168 |
message VerseSegments {
|
|
@@ -170,35 +147,61 @@ message VerseSegments {
|
|
| 170 |
}
|
| 171 |
|
| 172 |
message SurahTimestamps {
|
| 173 |
-
map<string, VerseSegments> verses = 1;
|
| 174 |
}
|
| 175 |
```
|
| 176 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 177 |
---
|
| 178 |
|
| 179 |
-
##
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
| # |
|
| 184 |
-
|---|---|---|
|
| 185 |
-
| 1 | Abdul Basit Abdul Samad (Mujawwad β Hafs) |
|
| 186 |
-
| 2 | Abdul Basit Abdul Samad (Murattal β Hafs) |
|
| 187 |
-
| 3 | Abdul Rahman Al Sudais (Murattal β Hafs) |
|
| 188 |
-
| 4 | Abdullah Hamad Abu Sharida |
|
| 189 |
-
| 5 | Abu Bakr Al Shatri (Murattal β Hafs) |
|
| 190 |
-
| 6 | Ahmed ibn Ali Al Ajmy |
|
| 191 |
-
| 7 |
|
| 192 |
-
| 8 |
|
| 193 |
-
| 9 | Alzain Mohammad Ahmad |
|
| 194 |
-
| 10 | Ayman Suwaid (Muallim) |
|
| 195 |
-
| 11 | Badr Al Turki |
|
| 196 |
-
| 12 |
|
| 197 |
-
| 13 |
|
| 198 |
-
| 14 | Hani Ar Rifai (Murattal β Hafs) |
|
| 199 |
-
| 15 |
|
| 200 |
-
| 16 | Khalid Al Jalil (Murattal β Hafs) |
|
| 201 |
-
| 17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 202 |
|
| 203 |
---
|
| 204 |
|
|
@@ -206,7 +209,7 @@ This dataset encompasses a diverse range of recitation styles (Murattal, Mujawwa
|
|
| 206 |
|
| 207 |
**License:** `Apache-2.0`
|
| 208 |
|
| 209 |
-
This dataset is completely free and open-source for personal, educational, and commercial projects under the **Apache License 2.0**. You are
|
| 210 |
|
| 211 |
**Attribution:**
|
| 212 |
While not strictly required by the license, we appreciate attribution linking back to this dataset to support the ongoing development of open-source Islamic infrastructure.
|
|
|
|
| 28 |
<p align="center">
|
| 29 |
<img src="https://img.shields.io/badge/Audio%20Format-Opus%20(16kHz,%2032kbps)-emerald?style=for-the-badge&logo=opus" alt="Opus Format">
|
| 30 |
<img src="https://img.shields.io/badge/Total%20Reciters-34-blue?style=for-the-badge" alt="Total Reciters">
|
| 31 |
+
<img src="https://img.shields.io/badge/Timing%20Format-Protocol%20Buffers-violet?style=for-the-badge" alt="Protobuf">
|
| 32 |
+
<img src="https://img.shields.io/badge/CDN-Cloudflare%20Edge-orange?style=for-the-badge&logo=cloudflare" alt="Cloudflare CDN">
|
| 33 |
+
<img src="https://img.shields.io/badge/License-Apache%202.0-green?style=for-the-badge" alt="License">
|
| 34 |
</p>
|
| 35 |
|
| 36 |
---
|
| 37 |
|
| 38 |
## π Overview
|
| 39 |
|
| 40 |
+
**Quranic Recitation Dataset (Word-by-Word Sync)** is a highly optimized, production-ready dataset containing high-quality audio recitations of the Holy Quran synchronized at the **word-by-word** level.
|
| 41 |
|
| 42 |
+
This dataset features **34 world-renowned reciters**, with every Surah (114 chapters) mapped precisely to millisecond-accurate word timestamps. It is designed for modern Islamic mobile and web applications β served via a **Cloudflare Edge CDN** with native range-request support for instant audio streaming and seeking.
|
| 43 |
|
| 44 |
---
|
| 45 |
|
| 46 |
## π Key Features
|
| 47 |
|
| 48 |
+
* **34 Reciters Γ 114 Surahs** β totaling **3,876 audio files** with matching timing data.
|
| 49 |
+
* **Optimized Audio** β Mono-channel, 16kHz, 32kbps `.opus` format. Exceptional clarity at ultra-low bandwidth.
|
| 50 |
+
* **Per-Surah Architecture** β Each surah is a single `.opus` file. Seek to any ayah using the timing data β no need to download individual ayah files.
|
| 51 |
+
* **Protocol Buffer Timing** β Binary `.pb` timing files are ~33% smaller than JSON and parse instantly in any language.
|
| 52 |
+
* **Cloudflare Edge CDN** β Files are served from `recitation-cdn.mughalistian.workers.dev` with edge caching, CORS, and native HTTP `206 Partial Content` for mobile audio seeking.
|
| 53 |
+
* **Word-Level Accuracy** β Timestamps map to standard Uthmani script word indices, enabling karaoke-style highlighting.
|
| 54 |
|
| 55 |
---
|
| 56 |
|
| 57 |
+
## π‘ CDN Access
|
| 58 |
|
| 59 |
+
This dataset is served via a **Cloudflare Worker** that proxies HuggingFace with aggressive edge caching. You never need to download the 17GB repository locally.
|
| 60 |
|
| 61 |
+
### Base URL
|
| 62 |
+
```
|
| 63 |
+
https://recitation-cdn.mughalistian.workers.dev
|
|
|
|
|
|
|
|
|
|
| 64 |
```
|
| 65 |
|
| 66 |
+
### URL Format
|
| 67 |
+
```
|
| 68 |
+
{BASE_URL}/{slug}/{surah_number}.{opus|pb}
|
| 69 |
+
```
|
| 70 |
|
| 71 |
+
### Quick Examples
|
| 72 |
+
```bash
|
| 73 |
+
# Audio β Mishari Rashid Al-Afasy, Surah Al-Fatihah
|
| 74 |
+
curl https://recitation-cdn.mughalistian.workers.dev/mishari-rashid-al-afasy-murattal-hafs/001.opus
|
| 75 |
|
| 76 |
+
# Timing β Same reciter, same surah (Protocol Buffer)
|
| 77 |
+
curl https://recitation-cdn.mughalistian.workers.dev/mishari-rashid-al-afasy-murattal-hafs/001.pb
|
|
|
|
| 78 |
|
| 79 |
+
# Range Request (for mobile seeking)
|
| 80 |
+
curl -H "Range: bytes=0-1024" \
|
| 81 |
+
https://recitation-cdn.mughalistian.workers.dev/mishari-rashid-al-afasy-murattal-hafs/001.opus
|
| 82 |
+
# β 206 Partial Content β
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 83 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
|
| 85 |
+
### CDN Features
|
| 86 |
+
| Feature | Details |
|
| 87 |
+
|---|---|
|
| 88 |
+
| **Edge Caching** | `max-age=31536000, immutable` (1 year) |
|
| 89 |
+
| **Range Requests** | Native `206 Partial Content` support |
|
| 90 |
+
| **CORS** | `Access-Control-Allow-Origin: *` |
|
| 91 |
+
| **Stale Fallback** | `stale-if-error=604800` (7 days) |
|
| 92 |
+
| **Fallback Origin** | Direct HuggingFace if CDN cache misses |
|
| 93 |
+
|
| 94 |
+
### Direct HuggingFace Fallback
|
| 95 |
+
If the CDN is unavailable, you can fetch directly from HuggingFace:
|
| 96 |
```
|
| 97 |
+
https://huggingface.co/datasets/zaibihassan/Quranic-Recitation-Data/resolve/main/{Folder Name}/{Surah}/{File}
|
| 98 |
+
```
|
| 99 |
+
|
| 100 |
+
> **Note:** Folder names on HuggingFace contain spaces and special characters (e.g., `Mishari Rashid Al Afasy (Murattal β Hafs)`). The CDN slug mapping handles this automatically.
|
| 101 |
|
| 102 |
---
|
| 103 |
|
| 104 |
## π Dataset Structure
|
| 105 |
|
| 106 |
+
The dataset is organized by **Reciter Folder** β **Surah Number (001β114)**.
|
| 107 |
|
| 108 |
+
Each surah folder contains two files:
|
| 109 |
+
1. `{surah}.opus` β Per-surah audio file (full surah in one file)
|
| 110 |
+
2. `{surah}.pb` β Protocol Buffer word-by-word timing data
|
|
|
|
| 111 |
|
| 112 |
+
```
|
| 113 |
Quranic-Recitation-Data/
|
| 114 |
βββ Abdul Basit Abdul Samad (Mujawwad β Hafs)/
|
| 115 |
β βββ 001/
|
| 116 |
+
β β βββ 001.opus (Full Surah Al-Fatihah audio)
|
| 117 |
+
β β βββ 001.pb (Word timestamps for all ayahs)
|
|
|
|
| 118 |
β βββ 002/
|
| 119 |
+
β β βββ 002.opus
|
| 120 |
+
β β βββ 002.pb
|
| 121 |
+
β βββ ...
|
| 122 |
βββ Mishari Rashid Al Afasy (Murattal β Hafs)/
|
| 123 |
+
βββ Alijon Qari/
|
| 124 |
+
βββ ...
|
| 125 |
```
|
| 126 |
|
| 127 |
---
|
| 128 |
|
| 129 |
+
## β±οΈ Timing Data Schema (Protocol Buffers)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 130 |
|
| 131 |
+
The `.pb` timing files map every verse in a surah to word-level timestamps.
|
| 132 |
+
|
| 133 |
+
### Protocol Buffer Schema (`recitation.proto`)
|
| 134 |
```protobuf
|
| 135 |
syntax = "proto3";
|
| 136 |
package recitation;
|
|
|
|
| 138 |
message WordSegment {
|
| 139 |
int32 word_index_0_based = 1;
|
| 140 |
int32 word_index_1_based = 2;
|
| 141 |
+
int32 timestamp_from = 3; // milliseconds from start of surah
|
| 142 |
+
int32 timestamp_to = 4; // milliseconds from start of surah
|
| 143 |
}
|
| 144 |
|
| 145 |
message VerseSegments {
|
|
|
|
| 147 |
}
|
| 148 |
|
| 149 |
message SurahTimestamps {
|
| 150 |
+
map<string, VerseSegments> verses = 1; // key = "surah:ayah" (e.g., "1:1")
|
| 151 |
}
|
| 152 |
```
|
| 153 |
|
| 154 |
+
### How It Works
|
| 155 |
+
|
| 156 |
+
Each `.pb` file contains a `SurahTimestamps` message with all verses of that surah. The timestamps are **relative to the start of the surah audio file**, so you can:
|
| 157 |
+
|
| 158 |
+
1. Load the surah `.opus` audio
|
| 159 |
+
2. Decode the `.pb` timing data
|
| 160 |
+
3. To play a specific ayah, seek the audio to `verses["1:3"].segments[0].timestamp_from` milliseconds
|
| 161 |
+
4. Highlight words in real-time as `currentTimeMs` falls between each segment's `timestamp_from` and `timestamp_to`
|
| 162 |
+
|
| 163 |
---
|
| 164 |
|
| 165 |
+
## π CDN Slug Map
|
| 166 |
+
|
| 167 |
+
The CDN uses URL-friendly slugs that map to the actual folder names on HuggingFace:
|
| 168 |
+
|
| 169 |
+
| # | CDN Slug | Folder Name |
|
| 170 |
+
|---|---|---|
|
| 171 |
+
| 1 | `abdul-basit-abdul-samad-mujawwad-hafs-949` | Abdul Basit Abdul Samad (Mujawwad β Hafs) |
|
| 172 |
+
| 2 | `abdul-basit-abdul-samad-murattal-hafs-962` | Abdul Basit Abdul Samad (Murattal β Hafs) |
|
| 173 |
+
| 3 | `abdul-rahman-al-sudais-murattal-hafs` | Abdul Rahman Al Sudais (Murattal β Hafs) |
|
| 174 |
+
| 4 | `abdullah-hamad-abu-sharida` | Abdullah Hamad Abu Sharida |
|
| 175 |
+
| 5 | `abu-bakr-al-shatri-murattal-hafs` | Abu Bakr Al Shatri (Murattal β Hafs) |
|
| 176 |
+
| 6 | `ahmed-ibn-ali-al-ajmy` | Ahmed ibn Ali Al Ajmy |
|
| 177 |
+
| 7 | `alijon-qari` | Alijon Qari |
|
| 178 |
+
| 8 | `alnufais` | Alnufais |
|
| 179 |
+
| 9 | `alzain-mohammad-ahmad` | Alzain Mohammad Ahmad |
|
| 180 |
+
| 10 | `ayman-suwaid-muallim` | Ayman Suwaid (Muallim) |
|
| 181 |
+
| 11 | `badr-al-turki` | Badr Al Turki |
|
| 182 |
+
| 12 | `bandar-baleela` | Bandar Baleela |
|
| 183 |
+
| 13 | `fatih-seferagic` | Fatih Seferagic |
|
| 184 |
+
| 14 | `hani-ar-rifai-murattal-hafs` | Hani Ar Rifai (Murattal β Hafs) |
|
| 185 |
+
| 15 | `idris-abkar` | Idris Abkar |
|
| 186 |
+
| 16 | `khalid-al-jalil-murattal-hafs` | Khalid Al Jalil (Murattal β Hafs) |
|
| 187 |
+
| 17 | `khalifa-al-tunaiji-murattal-hafs` | Khalifa Al Tunaiji (Murattal β Hafs) |
|
| 188 |
+
| 18 | `maher-al-muaiqly-murattal-hafs` | Maher Al Muaiqly (Murattal β Hafs) |
|
| 189 |
+
| 19 | `mahmoud-khalil-al-husary-mujawwad-hafs` | Mahmoud Khalil Al Husary (Mujawwad β Hafs) |
|
| 190 |
+
| 20 | `mahmoud-khalil-al-husary-murattal-hafs` | Mahmoud Khalil Al Husary (Murattal β Hafs) |
|
| 191 |
+
| 21 | `mahmoud-khalil-al-husary-murattal-hafs-v2` | Mahmoud Khalil Al Husary (Murattal β Hafs β V2) |
|
| 192 |
+
| 22 | `mishari-rashid-al-afasy-murattal-hafs` | Mishari Rashid Al Afasy (Murattal β Hafs) |
|
| 193 |
+
| 23 | `mohamed-al-tablawi-murattal-hafs` | Mohamed Al Tablawi (Murattal β Hafs) |
|
| 194 |
+
| 24 | `muhammad-al-luhaidan` | Muhammad Al Luhaidan |
|
| 195 |
+
| 25 | `muhammad-siddiq-al-minshawi-kids` | Muhammad Siddiq Al Minshawi (Kids) |
|
| 196 |
+
| 26 | `muhammad-siddiq-al-minshawi-murattal-hafs` | Muhammad Siddiq Al Minshawi (Murattal β Hafs) |
|
| 197 |
+
| 27 | `nabil-ar-rifai` | Nabil Ar Rifai |
|
| 198 |
+
| 28 | `noreen-siddiq-duri-an-abu-amr` | Noreen Siddiq (Duri 'an Abu Amr) |
|
| 199 |
+
| 29 | `raad-mohammad-al-kurdi` | Raad Mohammad Al Kurdi |
|
| 200 |
+
| 30 | `saad-al-ghamdi-murattal-hafs` | Saad Al Ghamdi (Murattal β Hafs) |
|
| 201 |
+
| 31 | `saud-al-shuraim-murattal-hafs` | Saud Al Shuraim (Murattal β Hafs) |
|
| 202 |
+
| 32 | `surah-recitation-hady-toure` | Surah Recitation β Hady Toure |
|
| 203 |
+
| 33 | `tawfeeq-bin-saeed-as-sawaaigh` | Tawfeeq bin Saeed As Sawaaigh |
|
| 204 |
+
| 34 | `yasser-al-dosari-murattal-hafs` | Yasser Al Dosari (Murattal β Hafs) |
|
| 205 |
|
| 206 |
---
|
| 207 |
|
|
|
|
| 209 |
|
| 210 |
**License:** `Apache-2.0`
|
| 211 |
|
| 212 |
+
This dataset is completely free and open-source for personal, educational, and commercial projects under the **Apache License 2.0**. You are encouraged to integrate this directly into mobile apps (Flutter, React Native, iOS, Android) and web platforms.
|
| 213 |
|
| 214 |
**Attribution:**
|
| 215 |
While not strictly required by the license, we appreciate attribution linking back to this dataset to support the ongoing development of open-source Islamic infrastructure.
|