About recitation data
Every recitation on QUL comes as audio files plus segment data — the timestamps that
say which word is being recited at which moment. Segments are what lets you highlight words as the
audio plays.
Recitations come in one of two shapes:
Surah by surah (gapless)
- 114 audio files, one per surah.
- Each file plays the whole surah without pauses between ayahs.
- Segments tell you where each ayah starts and ends inside that one long file.
Ayah by ayah (gapped)
- 6,236 audio files, one per ayah.
- Each file contains a single ayah, so you can play one ayah without downloading a whole surah.
- Segments are relative to the start of that ayah's own file.
A segment is a three-number array: [word position, start in ms, end in ms].
Word positions start at 1 and match the word order of the ayah.
Data format
Ayah by ayah
{
"surah": 1,
"ayah": 1,
"audio_url": "https://.../001001.mp3",
"segments": [
[1, 361, 1051],
[2, 1051, 1622]
]
}
Surah by surah
Keyed by surah:ayah. timestamp_from and timestamp_to locate the
ayah inside the surah's audio file; the word timings inside segments use the same clock.
{
"1:1": {
"segments": [
[1, 361, 1051],
[2, 1051, 1622],
[3, 1662, 2763],
[4, 2803, 4385]
],
"duration_sec": 4,
"duration_ms": 4224,
"timestamp_from": 361,
"timestamp_to": 4585
}
}