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

For two-speaker dialogue transcription, enable speaker labels:

nanovt input.mp4 --diarize

This uses gpt-4o-transcribe-diarize by default and writes dialogue lines such as A: ... and B: ....

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.2.0.tar.gz (44.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.2.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nanovt-0.2.0.tar.gz
  • Upload date:
  • Size: 44.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.2.0.tar.gz
Algorithm Hash digest
SHA256 c79b52f2735f930e54d5d6f0db2e5d572a70bc6e0aae92067f6e5e7714c92b64
MD5 5239759eddbd6c6be17bc751b1157bf4
BLAKE2b-256 54f682542f47ca2e15687ef3ae9c40abfea47bedf5ff4dee7c8285f2aaa6e032

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanovt-0.2.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.2.0-py3-none-any.whl.

File metadata

  • Download URL: nanovt-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 8.4 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 caf32ca4fa55334a13e0cf8ca6ad878259751de4b59e47bf9aad732e8ec4c8e2
MD5 46cf6679aba93c5445379e3e5776fd08
BLAKE2b-256 27210eb6b317bf4473ebc0c30cf2a09647f23cd2413701903b5559ab9a45e73c

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanovt-0.2.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