Production-ready audio transcription service with user authentication and organized file storage.
- Install dependencies:
pip install -r requirements.txt- Configure environment:
cp .env.example .env
# Edit .env with your credentials- Run the API:
python api.pyPOST /register- Create user accountPOST /login- Get access tokenPOST /upload- Upload audio filePOST /transcribe/{filename}- Process audio fileGET /files- List user filesGET /transcriptions- Get transcription historyGET /download/{filename}- Download results
# Register user
curl -X POST "http://localhost:8000/register" \
-H "Content-Type: application/json" \
-d '{"username": "user1", "email": "user@example.com", "password": "password123"}'
# Login
curl -X POST "http://localhost:8000/login" \
-H "Content-Type: application/json" \
-d '{"username": "user1", "password": "password123"}'
# Upload file (use token from login)
curl -X POST "http://localhost:8000/upload" \
-H "Authorization: Bearer YOUR_TOKEN" \
-F "file=@audio.mp3"
# Transcribe
curl -X POST "http://localhost:8000/transcribe/audio.mp3" \
-H "Authorization: Bearer YOUR_TOKEN"