With segments

The With Segment tag in the Quran recitation resources of QUL is used to indicate recitations for which segment data is available. This data provides precise timestamps for each word in an Ayah, marking their start and end times.

Uses of Segment Data

  • Highlight currently playing words during Quran recitation.
  • Synchronize the visual text display with recited audio.
  • Facilitate learning tools that require precise word tracking.

Structure

We have segment data for both Ayah-by-Ayah and Surah-by-Surah recitations.

  • Ayah-by-Ayah Recitation: Provides segment data for each word in an Ayah.
  • Surah-by-Surah Recitation: Provides start and end timestamps for each Ayah within a Surah recitation, as well as timestamps for individual Ayah words.

Example Data

Ayah-by-Ayah Recitation

{
  "surah": 1,
  "ayah": 1,
  "segments": [
    [1, 0, 960],
    [2, 970, 1420],
    [3, 1430, 2670],
    [4, 2680, 6210]
  ]
}
   

Surah-by-Surah Recitation

{
  "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
  }
}