Transcription Service
Transcription Service
Follow this guide after completing the optional transcription setup steps in the main README.
1. Prepare a virtual environment
cd apps/transcription
python -m venv env
Activate the environment:
- Windows
env\Scripts\activate
- macOS/Linux
source env/bin/activate
Using VS Code? Run
Python: Select Interpreter
and point it atenv/bin/python
(orenv\Scripts\python.exe
on Windows).
Install dependencies:
pip install -r requirements.txt
2. Configure Modal
Create a Modal account if you do not have one.
Authenticate the CLI:
python -m modal setup
Run a local test (optional):
modal run transcription.py
Deploy the transcription function:
modal deploy transcription.py
3. Provide Cloudflare R2 secrets
The deployed function downloads audio from Cloudflare R2, transcribes it with Whisper, and deletes the object afterwards. Set these environment variables as a Modal secret:
CLOUDFLARE_ACCOUNT_ID=your-account-id
R2_ACCESS_KEY_ID=your-access-key-id
R2_SECRET_ACCESS_KEY=your-secret-access-key
R2_BUCKET_NAME=opencut-transcription
- Visit the Modal Secrets dashboard.
- Create a custom secret named
opencut-r2-secrets
. - Use Import .env and paste the variables from your
.env.local
file.
You are now ready to trigger automatic captions inside OpenCut.
Last updated on