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:
- Load audio as 16 kHz mono
- Voice-activity detection, then merge speech into ≤30 s chunks (Sarvam REST max)
- Send each chunk to the chosen provider
- 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 / OpenAIwhisper-1still 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):
- 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
- PyPI project name:
- API token. Create a PyPI token and add it to the repo as the
PYPI_API_TOKENsecret. 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 translateon 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.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 | Provenance | Actions |
|---|---|---|---|---|
| black_boltx-1.0.1.tar.gz | 16.5 MB | Without provenance | Details for black_boltx-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| black_boltx-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for black_boltx-1.0.1-py3-none-any.whl |
Total release size: 33.0 MB
Release files / black_boltx-1.0.1.tar.gz
| Download URL | black_boltx-1.0.1.tar.gz |
|---|---|
| Size | 16.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e9c5191132015a060464e6d4eb3711c78acfeb7fc40f216e5dd09452e91a8391
|
|
BLAKE2b-256 checksum How to use checksums |
49204e4bbb924619ca57b39094ef0a3ee2c209a0d70c9a0e0bc0d2e368a15ecf
|
| 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.1-py3-none-any.whl
| Download URL | black_boltx-1.0.1-py3-none-any.whl |
|---|---|
| Size | 16.5 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
49ec738362d6c848c9708755a1e6053db805e1d50462464b85401bfcf60b93d2
|
|
BLAKE2b-256 checksum How to use checksums |
69a2f6a2493cae85fc028565c8eebe0777e217a69149260579b6e08bf43f4a2e
|
| 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.1
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.