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",
    model="saaras:v4",
    timestamps=True,        # word-level; Hermes uses no_align=not timestamps
    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 utterance-level after alignment. Each segment has a words list (word, start, end, score) — the shape Hermes reads for timestamps=true.

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.3

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.3
File Size Uploaded Provenance Actions
black_boltx-1.0.3.tar.gz 16.5 MB Without provenance Details for black_boltx-1.0.3.tar.gz

Built distribution (wheel)

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

Total release size: 33.0 MB

Release files / black_boltx-1.0.3.tar.gz

Download URL black_boltx-1.0.3.tar.gz
Size 16.5 MB
Tags Source
SHA-256 checksum
How to use checksums
c0a2eb844f9b528c814aaa09bbb6374bf7dcaeb9bfbbf5437000aa071c042083
BLAKE2b-256 checksum
How to use checksums
007bb99b359b3e68c2c804a41ef80ce6ff5cf832b6f4a2f2327b676c7c0b42f1
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.3-py3-none-any.whl

Download URL black_boltx-1.0.3-py3-none-any.whl
Size 16.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
2d0d0ae95e2b1a13789e55a155a5d1e42ea97ee6c16d25834970baa4ca3ef118
BLAKE2b-256 checksum
How to use checksums
a1e760de642e0d0cd2ef6b26225e3745dbf085e374dc59961be7d92a275eefb7
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.3

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