gcp-transcribe
Cloud-based MP3 transcription CLI built on Google Speech-to-Text v2 (Chirp 2). Submit a job, get a job ID back, then poll for status and fetch results when ready.
- Async batch workflow for long-form audio
- Multilingual via Chirp 2 (any BCP-47 language Chirp 2 supports)
- Outputs
.txt,.json, and optional.srt - Jobs survive across CLI invocations and reboots
Prerequisites
- Python 3.10+
- A Google Cloud account with billing enabled
- The
gcloudCLI installed locally
Set up Google Cloud
You can do this in the Google Cloud Console or entirely from the terminal. The CLI flow:
1. Create or select a project
# Create a new project
gcloud projects create <your-project-id> --name="Transcribe"
# Or pick an existing one
gcloud projects list
gcloud config set project <your-project-id>
2. Enable billing
A billing account must be linked to the project. List your billing accounts and link one:
gcloud billing accounts list
gcloud billing projects link <your-project-id> \
--billing-account=<billing-account-id>
(Or do this once in the Console under Billing → Link a billing account.)
3. Enable the required APIs
gcloud services enable \
speech.googleapis.com \
storage.googleapis.com \
--project=<your-project-id>
4. Authenticate
This tool uses Application Default Credentials, so you don't need a service-account key for local use:
gcloud auth application-default login
gcloud auth application-default set-quota-project <your-project-id>
The user account you log in with needs roles that allow Speech-to-Text recognition plus bucket and object management on the staging bucket. For personal use, Owner or Editor on the project is sufficient. For tighter scoping, the minimum is:
roles/speech.clientroles/storage.admin(orstorage.objectAdmin+storage.bucketAdminif you'd rather not grant full admin)
Running in CI or a server? Create a service account, grant the same roles, download a JSON key, and point
GOOGLE_APPLICATION_CREDENTIALSat it instead of runninggcloud auth ....
Install
pip install gcp-transcribe
Or from source:
git clone https://github.com/bengeos/gcp-transcribe.git
cd gcp-transcribe
pip install -e .
Configure
Create a .env file in your working directory (or export these as environment variables):
GCP_PROJECT_ID=your-gcp-project-id
GCP_REGION=us-central1
GCS_BUCKET=your-staging-bucket
DEFAULT_LANGUAGES=en-US
| Key | Default | Notes |
|---|---|---|
GCP_PROJECT_ID |
— | Required. |
GCP_REGION |
us-central1 |
Must be a Chirp 2-supported region. |
GCS_BUCKET |
<project-id>-transcription |
Auto-created on first run if it doesn't exist. |
DEFAULT_LANGUAGES |
en-US |
Comma-separated BCP-47 codes. |
Verify everything is wired up:
transcribe doctor
Usage
Submit a job
transcribe submit audio.mp3
# → prints a job ID
Multiple files in one job:
transcribe submit a.mp3 b.mp3 c.mp3
Override languages per call:
transcribe submit audio.mp3 -l en-US -l es-ES
Check status
transcribe status <job-id>
State is one of running, done, failed, fetched.
Fetch the transcript
transcribe result <job-id> --out ./transcripts
Adds subtitles:
transcribe result <job-id> --out ./transcripts --srt
GCS staging objects are deleted after a successful fetch. Use --keep-remote to retain them.
Other commands
transcribe list # all known jobs
transcribe forget <job-id> # remove a job from the local manifest
transcribe doctor # verify config + GCP auth
Costs
Chirp 2 batch transcription is roughly $0.016 per minute of audio. A 3-hour file ≈ $2.88.
Limitations
- No speaker diarization (not supported by Chirp 2 in batch mode).
- Each file is capped at the Speech-to-Text v2 batch limit (currently 8 hours per file).
License
MIT
Metadata
Release files for gcp-transcribe 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gcp_transcribe-0.1.1.tar.gz | 9.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gcp_transcribe-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.2 kB
Release files / gcp_transcribe-0.1.1.tar.gz
| Download URL | gcp_transcribe-0.1.1.tar.gz |
|---|---|
| Size | 9.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
037bad4226c462678988fd187c1cd2b991611b919deed4f599832f8947a77b14
|
|
BLAKE2b-256 checksum How to use checksums |
5361e0dc98fc070faf3e79d11c40a5dca99664189bcda285bb529e7100f40cbe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 25, 2026.
Transparency logRelease files / gcp_transcribe-0.1.1-py3-none-any.whl
| Download URL | gcp_transcribe-0.1.1-py3-none-any.whl |
|---|---|
| Size | 11.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0725aa8efccc3338a975ef075a9dbb892f232ea296a1826434f1ab3fc11544e6
|
|
BLAKE2b-256 checksum How to use checksums |
565b30777eab9fc77f0a58e61cbd123d4b55b50d06299452141cb63dbb2e59da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 25, 2026.
Transparency log