Skip to main content

audio-transcribe-cli

Local CLI for audio/video transcription using the Soniox API. Generates SRT subtitles and a self-contained HTML editor — no server, no database, no cloud storage required.

Prerequisites

Install

cd audio-transcribe-cli
pip install .

For an editable / development install:

pip install -e .

Environment Setup

cp .env.example .env
# Edit .env and set SONIOX_API_KEY

Or export directly:

export SONIOX_API_KEY=your_key_here

Usage

transcribe — Transcribe an audio or video file

atcli transcribe path/to/recording.mp4

With reference PDF documents (used to build Soniox context for better accuracy):

atcli transcribe recording.mp4 --context slides.pdf --context notes.pdf

With free-text hints and explicit language hints:

atcli transcribe recording.mp4 --hints "Technical meeting about Kubernetes" --language en,ja

Specify output path and skip the HTML viewer:

atcli transcribe recording.mp4 --output /tmp/output.srt --no-view

Use LLM-powered keyword extraction from reference docs:

atcli transcribe recording.mp4 \
  --context reference.pdf \
  --llm-api-key $OPENAI_API_KEY \
  --llm-endpoint https://api.openai.com/v1

Options:

Flag Default Description
--context / -c — PDF reference doc(s); repeatable
--hints "" Free-text added to Soniox context
--language auto Comma-separated language hints (en,ja,vi)
--output / -o <input>.srt SRT output path
--view / --no-view --view Open HTML viewer after transcription
--api-key $SONIOX_API_KEY Soniox API key
--llm-api-key $OPENAI_API_KEY LLM API key for keyword extraction
--llm-endpoint $OPENAI_ENDPOINT LLM endpoint URL

view — Open an existing SRT in the HTML viewer

atcli view path/to/subtitles.srt

This generates subtitles_viewer.html next to the SRT and opens it in your browser. Use the file picker in the viewer to load the corresponding media file.

HTML Viewer Features

  • Two-panel layout: editable subtitle table (left) + media player (right)
  • Click any row to seek the player to that position
  • Current subtitle highlighted during playback with on-video overlay
  • Editable index, start/end timing, and text fields
  • Add / delete subtitle rows
  • Export SRT button — downloads the current edited state as a .srt file
  • Fully self-contained (no internet required, opens via file://)

How It Works

  1. Extracts audio stream if input is a video file (ffmpeg, no re-encoding)
  2. Builds a Soniox context dict from PDF reference docs (keyword extraction)
  3. Splits audio into 30–60 s segments at silence points
  4. Uploads and transcribes each segment via the Soniox async API
  5. Merges all tokens with correct time offsets, groups into subtitle blocks
  6. Resolves <split:N> tags for long sentences into separate cues
  7. Writes the final SRT file
  8. Generates a self-contained HTML viewer and opens it in your browser

Project Structure

src/atcli/
├── cli.py                 # Typer entry point
├── core/
│   ├── soniox_client.py   # Soniox HTTP client (upload, transcribe, cleanup)
│   ├── audio_segmenter.py # ffmpeg-based silence-aware segmentation
│   ├── context_extractor.py  # PDF → keywords → Soniox context dict
│   ├── token_assembler.py # Soniox tokens → subtitle blocks
│   ├── subtitle_generator.py # blocks → SRT/VTT text + split-tag resolver
│   └── html_viewer.py     # Self-contained HTML editor generator
└── utils/
    └── logger.py          # Rich-based logger

Metadata

Release files for audio-transcribe-cli 0.1.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 audio-transcribe-cli 0.1.0
File Size Uploaded Provenance Actions
audio_transcribe_cli-0.1.0.tar.gz 29.4 kB With provenance Details for audio_transcribe_cli-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for audio-transcribe-cli 0.1.0
File Interpreter ABI Platform Actions
audio_transcribe_cli-0.1.0-py3-none-any.whl Python 3 none any Details for audio_transcribe_cli-0.1.0-py3-none-any.whl

Total release size: 64.4 kB

Release files / audio_transcribe_cli-0.1.0.tar.gz

Download URL audio_transcribe_cli-0.1.0.tar.gz
Size 29.4 kB
Tags Source
SHA-256 checksum
How to use checksums
bfadf9bea44ff0ef36c1a38848b17796ea7d9f5632a96c7658f8e0c44d5cfa65
BLAKE2b-256 checksum
How to use checksums
bc28a65a275b214cf111c01a1476e8889f729b46a56a6689a5c4e6b282cba6fe
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 May 21, 2026.

Transparency log

Release files / audio_transcribe_cli-0.1.0-py3-none-any.whl

Download URL audio_transcribe_cli-0.1.0-py3-none-any.whl
Size 35.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f1e6ec823c153918a1959e5d07d630f307cb6986b3e479ea51e2c2c65ab95601
BLAKE2b-256 checksum
How to use checksums
825c98b3aae7411b8b2813d17bec1ca4ea33a971c53215d07de8c3a0856077e8
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 May 21, 2026.

Transparency log

Security for audio-transcribe-cli 0.1.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for audio_transcribe_cli-0.1.0.tar.gz

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 May 21, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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