Spaces:
Running on Zero
Running on Zero
File size: 9,274 Bytes
198de68 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | # FAQ
- [What is this?](#what-is-this)
- [What can it do?](#what-can-it-do)
- [What can it *not* do?](#what-can-it-not-do)
- [Which riwayat are supported?](#which-riwayat-are-supported)
- [How does it work?](#how-does-it-work)
- [What errors are flagged?](#what-errors-are-flagged)
- [How do I know what it's good and bad at?](#how-do-i-know-what-its-good-and-bad-at)
- [Which model should I use — Base or Large?](#which-model-should-i-use--base-or-large)
- [How much audio can it handle?](#how-much-audio-can-it-handle)
- [How long does it take?](#how-long-does-it-take)
- [GPU/CPU limits and accounts](#gpucpu-limits-and-accounts)
- [Can I batch process many clips, or a full mushaf?](#can-i-batch-process-many-clips-or-a-full-mushaf)
- [Can I run it locally/offline?](#can-i-run-it-locallyoffline)
- [Can I use the API?](#can-i-use-the-api)
- [Can I use what comes out of it?](#can-i-use-what-comes-out-of-it)
- [What happens to my uploads?](#what-happens-to-my-uploads)
- [How do I give feedback?](#how-do-i-give-feedback)
## What is this?
An alignment tool for Quran recitation audio. You give it a recording, it splits
the audio into segments and tells you which verses and words are in each one —
with timestamps you can use for captions or verse alignment.
It is part of **[QUD](https://qud.dev)** (Quranic Universal Deep Data Development
Technologies), an open ecosystem advancing Quran technology — shared foundations,
reviewed and maintained over time, so Quran-tech projects stop rebuilding the same
groundwork from scratch. The Aligner is one project in that ecosystem, alongside many others.
## What can it do?
- **Match audio to the Quran text.** It works against the real mushaf text, not a
free-form transcript, so it never invents words.
- **Find where the reciter stops (waqf).** Segments are cut at the reciter's own
pauses, not at fixed intervals.
- **Word-level timestamps** for captions and highlighting.
- **Handle repetitions naturally.** When a reciter goes back and repeats a phrase
or verse, the alignment follows along instead of breaking.
- **Cope with noisy or low-quality recordings** — phone mics, room echo, and hiss, particularly with Tibyan Large.
- **Handle short non-Quran interruptions** — ta'awwudh, basmalah, salawat, short
prayer transitions are usually detected or filtered out.
- **Flag its own uncertainty.** Anything it isn't sure about is marked for review
rather than silently guessed.
## What can it *not* do?
- **It cannot detect recitation mistakes.** It assumes the recitation is correct
and follows along. It will notice *missing* words or verses, because it expects
continuous recitation — but it will not tell you a word was mispronounced or
substituted.
- **It is not a general Arabic transcriber.** Dhikr, du'a, khutbah, lectures, and
Arabic speech in general are out of scope.
- **Long non-Quran speech is a weak spot.** Tarawih recordings with extended
speech between portions, or long non-Quran passages, may produce errors.
- **Extremely fast recitation (hadr) is a weak spot.** The pauses are very short,
so many waqf boundaries can get missed.
## Which riwayat are supported?
Four: **Hafs**, **Warsh**, **Qalun**, and **Shu'bah**. Alignment quality is
essentially the same across all four. Word-level timing is most accurate for
Hafs and Shu'bah; Warsh and Qalun word timings can be a little less precise.
## How does it work?
Roughly:
1. The recording is cleaned up and listened to for pauses, which mark where one
segment ends and the next begins.
2. A speech model listens to each segment and writes down the *sounds* it hears —
not words, just phonetics.
3. Those sounds are matched against the actual Quran text to work out what word range was recited, under context of continuous recitation.
## What errors are flagged?
Errors are usually visible, not silent — check anything flagged before you use it.
Most errors are either a **failed alignment** or a **low-confidence** result (usually under 80%), and they are marked in the interface. Confidence >80% is marked green, lower "needs review" is marked yellow, red ones probably have errors.
Missing words (Qura'n sequential gaps) are explicitly marked in the relevant segment(s).
## How do I know what it's good and bad at?
Check the [**Quran Alignment Benchmark leaderboard**](https://huggingface.co/spaces/QUD-Technologies/quran-alignment-leaderboard) —
a public, independent benchmark for Quran-alignment systems. Given a recording,
it scores a system's output against a word-level ground truth across three
tasks (alignment, waqf segmentation, and word timing). This system's
results are on it alongside other systems, so you can see where it's strong and
where it isn't.
New corpus audio, scoring/metric changes, and other improvements to the
leaderboard itself are welcome — see its repo for how to contribute or submit
a system.
## Which model should I use — Base or Large?
Start with Base for clear audio. Use Large for noisy, live, or
otherwise difficult recordings. Retranscribe can switch models while reusing
the existing boundaries.
## How much audio can it handle?
Up to about **12 hours** in one go. Longer audio is not an issue, it gets the same quality and treatment.
## How long does it take?
Typically a few seconds on GPU, up to a minute for longer clips. On CPU, can be a few seconds up to 5 minutes for longer clips.
## GPU/CPU limits and accounts
The app runs on Hugging Face **ZeroGPU**, which gives every visitor a free daily
GPU allowance. How much you get depends on your Hugging Face account:
| Account | Daily GPU time |
|---|---|
| Not signed in | 2 minutes |
| Free account | 5 minutes |
| PRO | 40 minutes (extensible) |
Your allowance resets 24 hours after your first GPU use of the day. Signing in
to Hugging Face is the single easiest way to get more. Details and current
numbers:
<https://huggingface.co/docs/hub/spaces-zerogpu>
GPU requests are leased one per call — each call independently requests a GPU
slot rather than sharing one, and up to 16 can run in parallel; the schedule is
Hugging Face's, not ours. The queue wait is typically a few seconds.
**When your GPU quota runs out, nothing is lost.** The alignment moves to the
**CPU** by itself and finishes there — slower on long audio, and rate-limited to
keep it fair.
## Can I batch process many clips, or a full mushaf?
Yes. A few things help depending on scale:
- **Many individual clips.** Prefer the native **batch endpoint**
(`POST /api/v1/batches`, then `POST /api/v1/batches/{batch_id}/items/{item_id}/audio/stream`
per clip) over spamming the single-clip align endpoints yourself. It shares
one set of settings (padding, riwayah, split, timestamps) across every item
and lets the server handle allocation and scheduling as a job rather than as
N unrelated requests. See
[`docs/client_api.md`](client_api.md) and `/api/v1/docs` for the full
request shape.
- **A full mushaf, especially from a known reciter.** Consider submitting it to
[**Quranic Universal Audio**](https://audio.qud.dev/) instead of running it through this API yourself. It's the sibling QUD
project maintaining the canonical recitation catalog and timestamps dataset —
submissions there go through extra review and quality checks the raw API
output doesn't get, and the result becomes part of a shared, reusable dataset
everyone benefits from.
## Can I run it locally/offline?
No, sorry — the models/sdk are private. Use the webapp, API, or get in touch.
## Can I use the API?
Yes, and it documents itself — the full reference, with every endpoint and an
in-page "try it" button, is at **[/api/v1/docs](/api/v1/docs)**
([alternative layout](/api/v1/redoc), or the raw
[OpenAPI schema](/api/v1/openapi.json) if you generate a client from it).
## License / terms of use
Outputs (segments and word timestamps, from the app, the downloads and the
API) are licensed under the [**QUA Dataset License**](https://github.com/QUD-Technologies/quranic-universal-audio/blob/main/LICENSE):
- Use them freely, including in commercial products, but any feature built on them
must be available in full to every user at no extra charge — not behind, restricted to or enhanced in a paid tier — in an app that is itself free to get. Other, unrelated features may be paid, and ads may not interrupt or
block the recitation.
- Don't sell or republish the outputs, raw or converted. Models trained on them may
be published, under the same license.
- Credit **QUD Technologies – Quranic Universal Audio**.
## What happens to my uploads?
Uploaded audio and the alignment results are logged, mainly to debug and improve
the results. Recordings may also be used for automated, machine-only improvement of
the aligner — they are not listened to by people. They are never published or
shared. To have your uploads deleted, get in touch (below).
## How do I give feedback?
Get in touch — feel free to reach out on Discord (https://discord.com/invite/cZ3V2FynXz), or [open a discussion](https://huggingface.co/spaces/QUD-Technologies/quranic-universal-aligner/discussions).
Please include the recitation and roughly where it went wrong, so it can be
reproduced.
|