2026-02-14 21:46:48 -07:00
2026-02-14 21:46:48 -07:00
2026-02-14 21:13:12 -07:00
2026-02-14 19:10:03 -07:00
2026-02-14 10:45:01 -07:00
2026-02-14 16:23:34 -07:00
2026-02-14 21:39:08 -07:00

Backend (Audio -> Whisper -> Supabase)

This backend:

  1. accepts an audio file,
  2. transcribes it with OpenAI Whisper (whisper-1),
  3. stores transcript text in Supabase posts.transcribed_text,
  4. links categories in post_categories.

Install

pip install -r requirements.txt

Environment variables

  • OPENAI_API_KEY
  • SUPABASE_URL
  • SUPABASE_SERVICE_ROLE_KEY (use service-role key on backend only)
  • UPLOAD_DIR (default: uploads)
  • PORT (default: 5000)

Run

python speech_to_text.py

Endpoints

  • GET /health
  • GET /health/db
  • POST /upload-audio

Upload example

curl -X POST http://localhost:5000/upload-audio \
  -F "file=@sample.mp3" \
  -F "user_id=1" \
  -F "title=My oral history" \
  -F "category_ids=1,4" \
  -F "is_private=false"

Required tables in Supabase

Your Supabase Postgres project should already contain:

  • users
  • posts
  • post_categories
  • categories

Note: user_id must exist in users before upload.

Description
No description provided
Readme GPL-3.0 19 MiB
Languages
JavaScript 61.8%
Python 37.1%
Dockerfile 0.8%
HTML 0.3%