Skip to main content

CLI tool to extract audio from video files and transcribe it with OpenAI speech-to-text.

Project description

nanovt

Transcribe video or audio files with OpenAI speech-to-text.

The script extracts audio with ffmpeg, converts it to mono 16 kHz WAV, splits it into short chunks, transcribes each chunk with OpenAI, and writes a single text file.

Requirements

  • Python 3.13+
  • ffmpeg
  • OPENAI_API_KEY in your environment

Installation

From PyPI:

pip install nanovt

Or install it as an isolated uv tool:

uv tool install nanovt

Usage

nanovt input.mp4

By default, input.mp4 writes input.txt.

To force a language, pass an optional language code. For example, English:

nanovt input.mp4 --language en

If --language is omitted, the model detects the language automatically.

Other useful options:

nanovt input.mp4 --chunk-seconds 180 --retries 3
nanovt input.mp4 --output transcript.txt
nanovt input.mp4 --keep-temp

Development

uv sync --group dev
uv run pytest
uv run nanovt input.mp4

Releasing

Before the first release, confirm:

  • The PyPI distribution name nanovt is available.
  • The repository, homepage, and issue tracker URLs.
  • PyPI Trusted Publishing is configured for this repository, workflow publish.yml, and environment pypi.

Bump the version in pyproject.toml, then build and check locally:

uv build
uvx twine check dist/*

Commit the version bump, tag the release, and push the tag:

git tag v0.1.0
git push origin v0.1.0

The Publish GitHub Actions workflow builds, verifies, and publishes the release to PyPI through Trusted Publishing. Approve the pypi environment if reviewers are configured.

Project details


Download files

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

Source Distribution

nanovt-0.1.0.tar.gz (42.4 kB view details)

Uploaded Source

Built Distribution

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

nanovt-0.1.0-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file nanovt-0.1.0.tar.gz.

File metadata

  • Download URL: nanovt-0.1.0.tar.gz
  • Upload date:
  • Size: 42.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nanovt-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5325443536ff3a98460cbd56463a27a7b6b565d31a3addbd73a5b14e08bceb6d
MD5 c5e30217de5a6060e66dc7662a87e4cb
BLAKE2b-256 a654f68eef43f6b9b4e44068568c58f687437841ae1c10fb43e5336d0961f439

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanovt-0.1.0.tar.gz:

Publisher: publish.yml on undefined443/nanovt

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

File details

Details for the file nanovt-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: nanovt-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nanovt-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a6242f827438aa2e0404f7712179da2e00356fb1de36f77c9ab5014752674b2e
MD5 2cd81c8b26637499af3a82bb6224733d
BLAKE2b-256 0f4e49c872fce289d19f8fd87b611a09354d6685d243d0494fb3486088e362c3

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanovt-0.1.0-py3-none-any.whl:

Publisher: publish.yml on undefined443/nanovt

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