https://github.com/elan-ev/vosk-cli
https://github.com/elan-ev/vosk-cli
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/elan-ev/vosk-cli
- Owner: elan-ev
- License: apache-2.0
- Created: 2021-07-29T12:55:00.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-12-03T22:33:57.000Z (over 1 year ago)
- Last Synced: 2025-04-30T21:13:57.184Z (about 2 months ago)
- Language: Python
- Size: 34.2 KB
- Stars: 3
- Watchers: 5
- Forks: 9
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vosk-cli

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](https://pypi.org/project/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
- ffprobeVosk-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](https://ffmpeg.org/download.html) and follow the instructions for your operating system.### 3. Download the language model
Go to [https://alphacephei.com/vosk/models](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 -o -m `.
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.