NarratifAI / README.md
Consulawtech's picture
Switch to Docker SDK (Python 3.11) β€” guarantees pyannote/speechbrain diarization
9fe4f5d verified
|
Raw History Blame Contribute Delete
2.57 kB
---
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