Update 2025-04-24_11:44:19

This commit is contained in:
oib
2025-04-24 11:44:23 +02:00
commit e748c737f4
3408 changed files with 717481 additions and 0 deletions

50
README.md Normal file
View File

@ -0,0 +1,50 @@
# dicta2stream
A FastAPI-based audio streaming and upload backend with user registration, quota management, and abuse logging.
## Features
- User registration and magic link login
- Audio upload with music/singing detection
- Per-user storage quota
- Admin stats endpoint
- Abuse/violation logging
## Setup
### Requirements
- Python 3.11+
- PostgreSQL (or compatible DB)
### Installation
```sh
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
```
### Environment Variables
Create a `.env` file in the project root with:
```
DATABASE_URL=postgresql://user:pass@localhost:5432/dictastream
ADMIN_SECRET=your_admin_secret
```
### Running
```sh
uvicorn main:app --reload
```
### Directory Structure
- `main.py` — FastAPI entrypoint
- `register.py`, `magic.py`, `upload.py`, `redirect.py` — routers
- `models.py` — SQLModel ORM models
- `database.py` — DB session/engine
- `static/` — static HTML/JS/CSS assets
### Notes
- By default, audio uploads are stored in `/data` and streams in `/srv/streams` (change in code as needed).
- Ollama music/singing detection requires a local Whisper API at `localhost:11434`.
- Abuse logs are written to `log.txt`.
## License
MIT