Skip to main content

sttx

sttx is a standalone Linux CPU transcription command. It normalizes one audio/video file with ffmpeg, runs NVIDIA Parakeet TDT 0.6B v3 through the sherpa-onnx Python bindings, and writes timestamped JSON and plain text transcripts.

Installation

sttx officially supports Linux and requires Python 3.11, 3.12, or 3.13. Its native dependencies also publish macOS and Windows packages, but sttx uses Unix process-group APIs and its process lifecycle is currently tested only on Linux.

Install ffmpeg

Install ffmpeg separately and make sure it is available on PATH. The application invokes it for every input, including WAV files that already have the target format.

Install sttx from PyPI

Install the published sttx package from PyPI:

python -m pip install sttx
sttx --version

This installs the sttx console command and its Python runtime dependencies.

Quickstart

sttx recording.mp4

The default output directory is ./transcriptions. For recording.mp4, a successful run prints these two paths to stdout and writes both files:

transcriptions/recording.json
transcriptions/recording.txt

Existing output files are replaced atomically.

Command-line interface

The complete public surface is:

sttx [-h] [-o STEM] [-d DIR] [--model-dir DIR] [-v] [--debug] [--log-format {text,json}] [--version] media
  • media — required positional path to one local audio/video file.
  • -h, --help — show usage and exit.
  • -o STEM, --output-name STEM — output filename stem. The program adds .json and .txt; a path or an existing suffix is rejected.
  • -d DIR, --outdir DIR — output directory. Relative paths are resolved from the current directory; the default is ./transcriptions.
  • --model-dir DIR — use a local, offline model bundle instead of acquiring model assets.
  • -v, --verbose — write elapsed-time pipeline stage messages and live transcription progress to stderr. Text logs include a 20-character ASCII bar, processed audio position, real-time factor, estimated time remaining, and a final duration/real-time-factor summary. In an interactive terminal, an elapsed-time prefix and progress bar redraw in place ten times per second; redirected stderr receives readable line-oriented progress snapshots.
  • --debug — enable pipeline progress plus diagnostic details on stderr: ffmpeg arguments, the normalized WAV path, model source and asset paths/sizes, stage timings, live ASR scan/VAD/decode activity, reported language, word counts, and an aggregate ASR summary. It includes a traceback for unexpected failures and never prints transcript content.
  • --log-format {text,json} — format enabled stderr diagnostics as human text (the default) or JSON Lines. JSON records have stable event and elapsed_seconds fields plus event-specific data such as stage, audio_seconds, percent, and eta_seconds; use it with -v or --debug for machine-consumable pipeline telemetry.
  • --version — print sttx 0.1.1 and exit.

There is no language option: the model reports a language when available and the JSON writer falls back to "auto".

Streams and exit codes

On a successful transcription, stdout contains exactly two newline-separated paths, JSON first and TXT second. The application writes diagnostics to stderr: argument usage/errors, environment or runtime errors, the no-speech warning, optional verbose stage and live-progress messages, and debug diagnostics. --help and --version are the usual argparse exceptions: their informational text is printed to stdout and they exit successfully.

With --log-format json, enabled diagnostic records are one JSON object per stderr line. Successful invocations still print only the two output paths to stdout. Argument usage, --help, --version, and signal cancellation retain their normal argparse or cancellation text behavior.

The process exits with:

  • 0 — transcription completed, including a silence/no-speech input.
  • 1 — input or environment failure (for example an unreadable file, unavailable ffmpeg, missing model asset, or output filesystem failure).
  • 2 — argument/usage failure or transcription/decode failure.
  • 130 — clean cancellation after SIGINT.
  • 143 — clean cancellation after SIGTERM.

Errors are emitted on stderr with an error: prefix. A cancellation also prints a short cancellation diagnostic on stderr. Temporary normalized audio is removed during success, failure, and signal cleanup.

Model acquisition and cache

Without --model-dir, the first run resolves the floating repository csukuangfj/sherpa-onnx-nemo-parakeet-tdt-0.6b-v3-int8 and downloads its missing Parakeet assets into the Hugging Face cache. The Silero VAD asset is stored in the local sttx cache. Model revision and download size are not fixed promises and may change over time.

Warm-cache behavior is sticky and local-only first: an existing complete local snapshot is used without a refresh request. Network acquisition is attempted only when the local snapshot is missing or incomplete. The Silero VAD file is also reused from its local sttx cache once present; it is not refreshed on a normal warm run.

For an offline run, --model-dir must point to a flat directory containing the complete five-file bundle below. These exact filenames are required and each file must be readable and non-empty; extra files are not consumed:

encoder.int8.onnx
decoder.int8.onnx
joiner.int8.onnx
tokens.txt
silero_vad.onnx

Output files

The JSON file is UTF-8, uses two-space indentation, and keeps non-ASCII text unescaped. Its text field is the segment text joined with single spaces. duration, start, and end are rounded to two decimal places; segment IDs start at zero.

For example, one short transcript may be:

{
  "task": "transcribe",
  "language": "auto",
  "duration": 3.2,
  "text": "Hello world.",
  "segments": [
    {
      "id": 0,
      "start": 0.0,
      "end": 3.2,
      "text": "Hello world."
    }
  ]
}

The matching TXT file contains exactly the value of JSON text, with no additional newline or other bytes:

Hello world.

Silence/no speech is a successful result with text: "", an empty segments array, and warning: no speech detected on stderr.

Development

From a source checkout, Poetry creates the project's virtual environment in .venv/:

poetry install
poetry env info --path
poetry check
poetry run pytest
poetry run python -m compileall -q src tests
poetry run sttx --help
poetry run sttx --version
poetry build

Attribution and licensing

sttx source code is licensed under the GNU General Public License v3.0 only. Third-party software and model assets remain subject to their own terms; see NOTICE.md for attribution and primary upstream license links.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sttx-0.1.1.tar.gz (36.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sttx-0.1.1-py3-none-any.whl (37.0 kB view details)

Uploaded Python 3

File details

Details for the file sttx-0.1.1.tar.gz.

File metadata

  • Download URL: sttx-0.1.1.tar.gz
  • Upload date:
  • Size: 36.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sttx-0.1.1.tar.gz
Algorithm Hash digest
SHA256 94f97c5d995c85c0e8ed627bee2bcee9ae663ef05e72a86fda8f70a45299c467
MD5 b9fdbebc76e322e14a19477fdfa756df
BLAKE2b-256 99f371fd490aa8e52c5e9525429a166c2776f7e9d9c4e6e6cfd81c6a2975e6be

See more details on using hashes here.

Provenance

The following attestation bundles were made for sttx-0.1.1.tar.gz:

Publisher: release.yml on Korridzy/sttx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sttx-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: sttx-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 37.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sttx-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 006dc2d37bbab1213e9afb1e37b1b68e4e6566b8fdd1760d093196bf7c4de96a
MD5 c0e9126b1129ac64fc67c54514841922
BLAKE2b-256 367ab6fbb5c87502ebce6474e6560f5eded3510116e5a3ffa97f72bc379670fa

See more details on using hashes here.

Provenance

The following attestation bundles were made for sttx-0.1.1-py3-none-any.whl:

Publisher: release.yml on Korridzy/sttx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page