Skip to main content

Black Bolt

Word-level speech transcription with a choice of ASR backend:

--provider Who transcribes the words Word times
sarvam Sarvam saaras (Indic + English) wav2vec2 alignment (Sarvam REST has no word timestamps)
deepgram Deepgram Listen native words, optionally re-aligned
openai OpenAI whisper-1 / gpt-4o-transcribe native words on whisper-1, otherwise alignment
opensource local faster-whisper (the original WhisperX ASR) wav2vec2 alignment

The rest of the pipeline is the same for every provider:

  1. Load audio as 16 kHz mono
  2. Voice-activity detection, then merge speech into ≤30 s chunks (Sarvam REST max)
  3. Send each chunk to the chosen provider
  4. Force-align the transcript onto the waveform with wav2vec2 → per-word start / end

Alignment, VAD (pyannote/silero), and the local Whisper path are adapted from WhisperX.

Install

Cloud providers only (energy VAD, no GPU stack):

pip install -e .

Word alignment (required for Sarvam and opensource word times):

pip install -e '.[align]'

Pyannote VAD (same detector WhisperX uses):

pip install -e '.[vad]'

Local Whisper + alignment + pyannote:

pip install -e '.[opensource]'

ffmpeg must be on PATH.

CLI

export SARVAM_API_KEY=...
black-bolt talk.wav --provider sarvam --language hi

export DEEPGRAM_API_KEY=...
black-bolt talk.wav --provider deepgram --model nova-3

export OPENAI_API_KEY=...
black-bolt talk.wav --provider openai --model whisper-1

black-bolt talk.wav --provider opensource --model large-v2 --device cuda

Useful flags:

  • --no_align — skip wav2vec2; Deepgram / OpenAI whisper-1 still emit native word times
  • --vad_method auto|energy|pyannote|silero|fixed
  • --chunk_size 30 — hard-capped at 30 s
  • --mode transcribe|translate|verbatim|translit|codemix — Sarvam only
  • -f json|srt|vtt|txt|tsv|all

Python

from black_bolt import transcribe

result = transcribe(
    "talk.wav",
    provider="sarvam",
    language="hi",
    api_key="...",          # or SARVAM_API_KEY
)
for word in result["word_segments"]:
    print(f"{word['start']:.2f}-{word['end']:.2f} {word['word']}")

result["segments"] is sentence-level after alignment. Each segment has a words list.

Environment

Provider Env var
Sarvam SARVAM_API_KEY
Deepgram DEEPGRAM_API_KEY
OpenAI OPENAI_API_KEY
pyannote VAD / diarization HF_TOKEN (or --hf_token)

Publish to PyPI

Pushes to main run .github/workflows/publish.yml: tests, then python -m build, then upload to pypi.org. The same version is not uploaded twice (skip-existing).

Auth (pick one):

  1. Trusted publishing (recommended). On pypi.org → Publishing, add a GitHub pending publisher:
    • PyPI project name: black_boltx
    • Owner / repo: your GitHub org and black_bolt
    • Workflow: publish.yml
    • Environment: pypi
  2. API token. Create a PyPI token and add it to the repo as the PYPI_API_TOKEN secret. The workflow already reads that secret.

Bump version in pyproject.toml before a release, or PyPI will skip the upload.

Notes

  • Sarvam REST does not return word timestamps (only phrase spans). Black Bolt always runs wav2vec2 after Sarvam to get word times.
  • Translated text (--mode translate on Sarvam, or English translation in general) cannot be force-aligned to the original audio. Use --no_align.
  • Overlapping speakers are still a weak point, same as WhisperX.

Metadata

Release files for black-boltx 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for black-boltx 1.0.0
File Size Uploaded Provenance Actions
black_boltx-1.0.0.tar.gz 16.5 MB Without provenance Details for black_boltx-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for black-boltx 1.0.0
File Interpreter ABI Platform Actions
black_boltx-1.0.0-py3-none-any.whl Python 3 none any Details for black_boltx-1.0.0-py3-none-any.whl

Total release size: 33.0 MB

Release files / black_boltx-1.0.0.tar.gz

Download URL black_boltx-1.0.0.tar.gz
Size 16.5 MB
Tags Source
SHA-256 checksum
How to use checksums
c947a4c361b16615d87c6a8bd8e64b22882b354d2699875828335b32091e16c9
BLAKE2b-256 checksum
How to use checksums
cc808507fba8b9c911f273ba7241025a3b06d9e2498fb440b8db1a4ec8a1368d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / black_boltx-1.0.0-py3-none-any.whl

Download URL black_boltx-1.0.0-py3-none-any.whl
Size 16.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
52b6c90124f46f1c52b59ea70442b198b7252e5806a5e8d9ecd9f68227f3a256
BLAKE2b-256 checksum
How to use checksums
e58f41d18121ec32a6b1f6a435e979c9bb1b5accf13859e202ba3d71602878c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for black-boltx 1.0.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page