hetchyy's picture
deploy qua@b45c26c5
198de68 verified
|
Raw History Blame Contribute Delete
1.31 kB
# Quranic Universal Aligner — API
> **Full reference:** [/api/v1/docs](/api/v1/docs) · [ReDoc](/api/v1/redoc) · [OpenAPI schema](/api/v1/openapi.json)
```bash
curl -X POST https://qud-technologies-quranic-universal-aligner.hf.space/api/v1/align/audio \
-F audio=@recitation.mp3
```
No API key.
## License
Every alignment, timing and segmentation response carries `"license": "qua-dataset-1.0"`
([QUA Dataset License](https://github.com/QUD-Technologies/quranic-universal-audio/blob/main/LICENSE)):
features built on the outputs must be free to every user, and the outputs may not be
sold or republished.
## Sessions
An alignment returns an `audio_id` that keeps the audio warm for a few hours, so
`split`, `realign` and `timestamps` on it skip the upload. A `404 session_not_found`
means it expired — align again.
## GPU allowance
GPU runs have a daily allowance per caller. When it runs out the request finishes on the
CPU and the response carries `"device": "CPU"` plus a `warning`. Pass `device=CPU` to
skip the GPU attempt.
## Streaming
`/align/audio/stream`, `/align/url/stream` and `/sessions/{audio_id}/realign/stream`
return the same body as `text/event-stream`: `progress` events, then one `result` — or
one `error` event carrying the `status` the plain route would have returned.