Minimal private Telegram bot for transcription + summaries.
- Accepts Telegram voice notes
- Accepts audio files
- Accepts video notes and short videos
- Transcribes with OpenAI
- Summarizes the transcript
- Stores the full transcript
- Returns a short summary plus a transcript link
- Local development defaults to SQLite via
DB_PATH - Upsun can use PostgreSQL automatically via
DATABASE_URLorPOSTGRESQL_*
PUBLIC_BASE_URLis optional- On Upsun, the app can derive its public base URL from
PLATFORM_ROUTES - Locally, it falls back to
http://localhost:${PORT:-8000}
WEBHOOK_SECRETis optional- If omitted, the app derives a stable secret from your bot token and Upsun project entropy when available
- You can still set
WEBHOOK_SECRETexplicitly if you want a fixed value
OPENAI_TRANSCRIBE_MODEL=gpt-4o-mini-transcribeOPENAI_SUMMARY_MODEL=gpt-5.4-mini
Use gpt-4o-transcribe instead if you want slightly better transcript quality and are fine paying more.
uv sync
uv run uvicorn main:app --reload.upsun/config.yamlstarts the app with Uvicorn on the Upsun socket.environmentmaps Upsun PostgreSQL service variables toDATABASE_URL- Transcript URLs are public but unguessable
- Only Telegram user IDs listed in
ALLOWED_TELEGRAM_USER_IDSare allowed