A lightweight FastAPI + HTML/JS app for recording, uploading, and viewing audio with transcripts β built to support indigenous language documentation starting with the Ogiek community.
# ποΈ Ogiek Language Recorder
A lightweight web app for recording, uploading, and viewing audio clips with transcripts β built to support language documentation efforts starting with the Ogiek community.
## β
Features
- π€ Record audio directly from the browser
- π Add an optional transcript
- πΎ Store audio files locally during development
- π View recordings with timestamps + transcript
- π FastAPI backend + vanilla HTML/CSS/JS frontend
- ποΈ SQLite for easy local setup
- π§ Navigation between pages
## ποΈ Tech Stack
### Backend
- FastAPI
- SQLite (development)
- SQLAlchemy
- Uvicorn
### Frontend
- HTML
- CSS
- JavaScript (no frameworks)
## π Project Structure
```
project-root/
βββ backend/
β βββ main.py # FastAPI app
β βββ models.py # SQLAlchemy models
β βββ database.py # DB config
β βββ schemas.py # (Optional) Pydantic schemas
β βββ uploads/
β βββ audio/ # Stored audio files
β
βββ frontend/
β βββ index.html # Recording page
β βββ view.html # Recordings list
β βββ styles.css # Shared styling
β βββ script.js # Recording + upload logic
β βββ view.js # List + playback logic
β
βββ README.md
```
## βοΈ Setup & Run (Dev Mode)
### 1οΈβ£ Create & activate a virtual environment
```bash
python -m venv venv
source venv/bin/activate # macOS/Linux
venv\Scripts\activate # Windows
```
### 2οΈβ£ Install dependencies
```bash
pip install fastapi uvicorn sqlalchemy
```
### 3οΈβ£ Run the backend
From the project root:
```bash
uvicorn backend.main:app --reload
```
Backend will start at: `
localhost`
### 4οΈβ£ Open the frontend
You can:
- Just open `frontend/index.html` and `frontend/view.html` in the browser, or
- Serve with a simple HTTP server if needed
## π API Endpoints
| Method | Endpoint | Description |
|--------|----------|-------------|
| POST | `/api/upload-audio` | Upload audio + transcript |
| GET | `/api/list-recordings` | List all saved entr β¦