Spaces:
Paused
Paused
File size: 2,566 Bytes
d32c023 04684e6 9fe4f5d d32c023 04684e6 d32c023 04684e6 d32c023 04684e6 92de2e7 04684e6 92de2e7 04684e6 92de2e7 04684e6 92de2e7 04684e6 92de2e7 04684e6 92de2e7 04684e6 92de2e7 04684e6 | 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 | ---
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
|