--- title: NarratifAI ASR emoji: 🎙 colorFrom: purple colorTo: indigo sdk: docker pinned: false hardware: t4-small license: mit short_description: Speech-to-text with Whisper + speaker diarization tags: - asr - speech-to-text - whisper - speaker-diarization - nigerian-languages models: - openai/whisper-tiny - openai/whisper-small - openai/whisper-medium - openai/whisper-large-v3 - pyannote/speaker-diarization-3.1 fullWidth: true --- # 🎙 NarratifAI ASR Production speech-to-text with speaker diarisation, Nigerian language support (Yoruba, Hausa, Igbo), and Claude AI post-processing. ## Endpoints (Flutter / REST clients) | Method | Path | Purpose | |--------|------|---------| | `POST` | `/transcribe` | Submit audio → `{job_id, status: "processing"}` (202) | | `GET` | `/result/{job_id}` | Poll for completed transcript | | `GET` | `/progress/{job_id}` | Chunk progress `{current, total, percent}` | | `POST` | `/minutes` | AI meeting minutes from segments | | `POST` | `/minutes/docx` | Word document download | | `GET` | `/health` | Liveness check | ## Web Demo Open `/ui` for the Gradio interface. ## Secrets required Set in **Space Settings → Variables and secrets**: | Secret | Description | |--------|-------------| | `HF_TOKEN` | HuggingFace token (pyannote diarisation model) | | `ANTHROPIC_API_KEY` | Claude AI for enhancement & minutes | | `SUPABASE_URL` | Supabase project URL | | `SUPABASE_SERVICE_ROLE_KEY` | Supabase service-role key (bypasses RLS) | | `PAYSTACK_SECRET_KEY` | Paystack subscription webhooks | ## Project structure ``` asr_system/ ├── hf_app.py # HF Space entry point (REST API + Gradio at /ui) ├── app.py # FastAPI REST API (Modal / local) ├── gradio_app.py # Gradio UI ├── modal_app.py # Modal.com deployment ├── config/settings.yaml └── src/ ├── audio_processor/ # validator, converter, chunker ├── models/ # registry, asr_pipeline ├── transcription/ # engine ├── diarization/ # pyannote wrapper └── output/ # formatter (TXT/JSON/SRT/VTT/CSV) ``` ## Running locally ```bash pip install -r requirements.txt # FastAPI REST API python app.py --api --port 7860 # Gradio UI only python gradio_app.py ``` ## Nigerian Language support Yoruba (`yo`), Igbo (`ig`), and Hausa (`ha`) auto-upgrade to `whisper-large-v3` on GPU and receive Claude AI tone-mark restoration after transcription. ## License MIT — see LICENSE