Skip to main content

vosk-cli

Apache 2.0 License PyPI

This python package serves as an Vosk interface for Opencast. It allows to generate subtitles (WebVTT files) from Video and Audio sources via Vosk.

Installation

1. Install vosk-cli

To install the latest stable version of vosk-cli, run

pip install vosk-cli

Alternatively, to install the latest development version, clone this project and inside the project directory run

pip install .

2. Install dependencies

  • FFmpeg
  • ffprobe

Vosk-cli uses ffprobe to analyze and ffmpeg to preprocess input files. The easiest way to install ffmpeg is by using a package manager. If you want or need to install from source, visit FFmpeg.org/download.html and follow the instructions for your operating system.

3. Download the language model

Go to https://alphacephei.com/vosk/models and download at least the English language model. The larger models generally yield better results.

You can unzip the folder of the language model into any directory, but it is recommended to create and use a ./models folder in the project directory.

Usage

Now you are able to run vosk-cli -i <input_file_path> -o <output_file_path> -m <model_name_or_path>.

For example, if there is a video.mp4 file in your download folder and a model named vosk-model-en-us-0.22 in the ./models folder you created, you can run

vosk-cli -i ~/Downloads/video.mp4 -o text -m vosk-model-en-us-0.22

This will create a text.vtt file (which contains the transcribed captions) in your current directory.

Release files for vosk-cli 0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vosk-cli 0.3
File Size Uploaded
vosk-cli-0.3.tar.gz 10.3 kB Details

Release files / vosk-cli-0.3.tar.gz

Download URL vosk-cli-0.3.tar.gz
Size 10.3 kB
Tags Source
SHA-256 checksum
How to use checksums
9416bb0aea7fed150312e81f0f271c94b0c6185ff5e02a7d064468193f30f20c
BLAKE2b-256 checksum
How to use checksums
062ff9f0bf023f42040ee305f311c924612cbd512d7c248c298ecc7805c0e5b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.1

Release history Release notifications | RSS feed

This release

0.3 This release

1 release file

0.2

1 release file

0.1

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