Skip to main content

nanovt

Transcribe video or audio files with OpenAI, qwen3-asr-flash, or Volcengine speech-to-text.

The script extracts audio with ffmpeg, converts it to mono 16 kHz, transcribes it, and writes a single text file. The OpenAI and qwen3-asr-flash providers split the audio into short chunks; the Volcengine provider sends the whole file in one synchronous request.

Requirements

  • Python 3.13+
  • ffmpeg
  • OPENAI_API_KEY in your environment (OpenAI provider, the default)
  • DASHSCOPE_API_KEY in your environment (qwen3-asr-flash provider)
  • VOLC_ASR_API_KEY in your environment (Volcengine provider)

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 speaker-labeled dialogue transcription, enable diarization:

nanovt input.mp4 --diarize

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

qwen3-asr-flash provider

--provider qwen runs Alibaba's qwen3-asr-flash through its DashScope OpenAI-compatible chat endpoint (one input_audio request per chunk), reusing the same WAV chunking path as the default provider. Set DASHSCOPE_API_KEY. Keep --chunk-seconds at or below 300; the model rejects longer audio. This model has no speaker diarization, so --diarize is rejected.

Volcengine provider

Volcengine's big-model ASR handles Chinese and code-switched speech well. Set VOLC_ASR_API_KEY and select the provider:

nanovt input.mp4 --provider volc --language zh --diarize

The audio is compressed to a mono 16 kHz MP3 and sent whole in one synchronous request, so no public URL is needed. --model defaults to bigmodel; override the resource id with VOLC_ASR_RESOURCE_ID (default volc.seedasr.auc). --chunk-seconds is unused for this provider. Diarized output uses the same A: ... / B: ... lines.

Development

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

Release files for nanovt 0.4.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 nanovt 0.4.0
File Size Uploaded
nanovt-0.4.0.tar.gz 49.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nanovt 0.4.0
File Interpreter ABI Platform
nanovt-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 63.8 kB

Release files / nanovt-0.4.0.tar.gz

Download URL nanovt-0.4.0.tar.gz
Size 49.5 kB
Tags Source
SHA-256 checksum
How to use checksums
70d2d32435f3bc9f366dd3712fdfd4d50b668cdc08632a1b36b945989b69ad33
BLAKE2b-256 checksum
How to use checksums
13680cf771a1b8d6b4f4ad912310c6d2ac2185cf790d7688eafb8a792ed5be68
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 2, 2026.

Transparency log

Release files / nanovt-0.4.0-py3-none-any.whl

Download URL nanovt-0.4.0-py3-none-any.whl
Size 14.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
45324d8ca7a0e2dff01d65e2e10f4b5cd76e151a5bbba6bda70119d54ad5de4f
BLAKE2b-256 checksum
How to use checksums
3445d046f494c6f42982bafd8a4d7fa358ad37e9571a5fd7714ad2ba91ef96dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 2, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

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