au / README.md
diac133's picture
Upload 3 files
e88c0b0 verified
|
Raw
History Blame Contribute Delete
2.3 kB
---
title: Auris Nigerian Accented ASR
emoji: πŸŽ™οΈ
colorFrom: purple
colorTo: gray
sdk: gradio
app_file: app.py
pinned: false
---
# Auris transcription service
Wraps [`NCAIR1/NigerianAccentedEnglish`](https://huggingface.co/NCAIR1/NigerianAccentedEnglish)
(a Whisper-small fine-tune on Nigerian-accented English) as a Gradio app running on
free ZeroGPU hardware, for the Auris app's chunked recording pipeline.
## API
Exposed as the `/transcribe` endpoint (see the Space's "Use via API" link once running).
- Inputs: `audio` (file/blob), `secret` (string β€” must match the `API_SECRET` below)
- Output: transcript text
- Errors (bad secret, no audio, transcription failure) surface as Gradio errors, which
the `@gradio/client` caller sees as a `status` event with `stage: "error"`.
Called from Node via `@gradio/client`'s `Client.submit()`, not raw HTTP β€” this gives the
caller real queue/cold-start visibility (`stage: "pending"`, `eta`, `position`) instead of
a single opaque request.
## Configuration
Set both of these as **Space secrets** (Settings β†’ Variables and secrets):
- `HF_TOKEN` β€” a HuggingFace access token (Read scope, with **"Read access to contents of
all public gated repos you can access"** enabled) belonging to an account that has
requested/been granted access on the
[model page](https://huggingface.co/NCAIR1/NigerianAccentedEnglish). Without this the
app starts but every call fails with a gated-repo error.
- `API_SECRET` β€” a shared secret of your choosing, so random visitors to this public
Space can't burn through your ZeroGPU quota. The calling backend must send the same
value as the `secret` input.
## Hardware
Must be created with **ZeroGPU** hardware (the only free GPU tier as of writing).
Model weights load once at startup (CPU); each call moves the model to the allocated
GPU for the duration of that call and back to CPU afterward, since ZeroGPU only grants
GPU access for the lifetime of a single `@spaces.GPU`-decorated call.
If the build or first call fails with a torch/CUDA compatibility error, check HF's
current [ZeroGPU docs](https://huggingface.co/docs/hub/spaces-zerogpu) for the
currently-supported `torch` version range and pin it in `requirements.txt` β€” package
versions drift over time and aren't pinned here.