01 / 09
Maqamat
Names the maqam — the melodic mode — of a Quran recitation from the voice alone, then helps you copy a reciter a phrase at a time. All of it runs on the device; nothing is uploaded.
It listens to one voice — yours, through the microphone, or a recording you give it — and names the maqam after about thirty seconds, and only once one reading is clearly ahead of the rest. The second mode cuts a reciter’s recording into phrases short enough to hold in your head: you hear one, recite it back, and your line is drawn over his.
The analysis runs in the browser. Pitch is tracked with YIN, gathered into a distribution, and read from every pitch the voice dwelt on as a possible tonic; a small trained model — 61 numbers per maqam, small on purpose — scores each reading. Your own recitations are never kept.
What I built
Naming the maqam
- Pitch tracking with YIN over the microphone stream, read at the recording’s own sample rate whatever the browser hands over.
- Tells the reciter when the voice reaches the microphone too faintly or too loudly to be read.
- Names nothing in the first thirty seconds, and declines to name a maqam when none is far enough ahead.
- Marks where a recording moves from one maqam to another, half a minute at a time.
The model
- Hand-written templates named the right maqam 57% of the time on real recitation; I replaced them with templates trained on labelled recordings.
- Trained in Python with NumPy, with the search for the tonic inside the loss, so the weights fit the question the site actually asks.
- Checked against the site’s own TypeScript scorer, so the numbers reported in training are the numbers the page produces.
- Tested on recordings by more than a hundred reciters it had not heard: when it names a maqam, it is right more than 19 times in 20.
Copying a reciter
- Cuts a recording into phrases; you recite alone or along with him, and your line is drawn over his.
- A different key, or a whole octave, is your voice and not a mistake, so it is not counted against you.
- Plays him slower at his own pitch, repeats a phrase, and keeps your best on each phrase on the device.
Everything around it
- Every string in Arabic and English, the Arabic written the way a reciter would say it rather than translated word for word.
- Installs as an app and works with no connection.