2025-04-24 11:44:23 +02:00
2025-04-24 11:44:23 +02:00
2025-04-24 11:44:23 +02:00
2025-04-24 12:00:21 +02:00
2025-04-24 11:44:23 +02:00
2025-04-24 11:44:23 +02:00
2025-04-24 11:44:23 +02:00
2025-04-24 11:44:23 +02:00
2025-04-24 11:44:23 +02:00
2025-04-24 11:44:23 +02:00
2025-04-24 11:44:23 +02:00
2025-04-24 11:44:23 +02:00
2025-04-24 11:44:23 +02:00
2025-04-24 11:44:23 +02:00
2025-04-24 11:44:23 +02:00
2025-04-24 11:44:23 +02:00
2025-04-24 11:44:23 +02:00
2025-04-24 11:44:23 +02:00
2025-04-24 11:44:23 +02:00

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

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

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

Description
No description provided
Readme 38 MiB
Languages
JavaScript 40.7%
Python 34.7%
CSS 13.1%
HTML 11.5%