- Python 100%
|
|
||
|---|---|---|
| scripts | ||
| tests | ||
| vosk | ||
| .gitignore | ||
| pyproject.toml | ||
| README.md | ||
| setup.py | ||
platypush-vosk
platypush-vosk is a repackaged build of the upstream vosk==0.3.45
Python package. It keeps the upstream import package name, console entry point,
dependencies, and bundled native libvosk library, but publishes the
distribution under a different PyPI name.
This package includes the JSON transcriber fix described in
https://github.com/alphacep/vosk-api/issues/2025. The patched code changes
the JSON formatter from appending to an undefined monologue["text"] variable
to appending each transcript chunk to monologues["text"].
Install
pip install platypush-vosk
Importing remains unchanged:
from vosk import Model, KaldiRecognizer
Repackage upstream wheels (recommended)
To build wheels for all platforms supported by upstream vosk==0.3.45
without rebuilding the native library:
python scripts/repackage_wheels.py
The script downloads each upstream platform wheel (x86_64, aarch64, armv7l,
macOS universal2, Windows), applies the transcriber patch, and writes the
resulting platypush-vosk wheels to dist/.
Release to PyPI
Upload all platform wheels in one go with twine:
pip install twine
twine upload dist/*
This publishes a wheel for each supported architecture, so users on any
platform get the correct native libvosk binary automatically via
pip install platypush-vosk.
Build a single-platform wheel from source
If you have a local libvosk library placed in vosk/ you can build a wheel
for the current (or a cross-compiled) platform:
python -m pip install build
python -m build --wheel
Override the target platform with environment variables:
VOSK_SYSTEM=Linux VOSK_ARCHITECTURE=64bit VOSK_MACHINE=aarch64 \
python -m build --wheel