Wenet STT Python
Beta Software
Simple Python library, distributed via binary wheels with few direct dependencies, for easily using WeNet models for speech recognition.
Requirements:
- Python 3.7+
- Platform: Linux x64 (Windows is a work in progress; MacOS may work; PRs welcome)
- Python package requirements:
cffi,numpy - Wenet Model (must be "runtime" format)
- Several are available ready-to-go on this project's releases page and below.
Models:
| Model | Download Size |
|---|---|
| gigaspeech_20210728_u2pp_conformer | 549 MB |
| gigaspeech_20210811_conformer_bidecoder | 540 MB |
Usage
from wenet_stt import WenetSTT
decoder = WenetSTT(WenetSTT.build_config('model_dir'))
import wave
with wave.open('tests/test.wav', 'rb') as wav_file:
wav_samples = wav_file.readframes(wav_file.getnframes())
assert decoder.decode(wav_samples).strip().lower() == 'it depends on the context'
Also contains a simple CLI interface for recognizing wav files:
$ python -m wenet_stt decode model test.wav
IT DEPENDS ON THE CONTEXT
$ python -m wenet_stt decode model test.wav test.wav
IT DEPENDS ON THE CONTEXT
IT DEPENDS ON THE CONTEXT
$ python -m wenet_stt -h
usage: python -m wenet_stt [-h] {decode} ...
positional arguments:
{decode} sub-command
decode decode one or more WAV files
optional arguments:
-h, --help show this help message and exit
Installation/Building
Recommended installation via wheel from pip (requires a recent version of pip):
python -m pip install wenet_stt
To build package for use locally:
python setup.py bdist_wheel
To build package for publishing:
building/dockcross-manylinux2014-x64 bash building/build-wheel-dockcross.sh manylinux2014_x86_64
Author
- David Zurow (@daanzu)
License
This project is licensed under the GNU Affero General Public License v3 (AGPL-3.0-or-later). See the LICENSE file for details. If this license is problematic for you, please contact me.
Acknowledgments
- Contains and uses code from WeNet, licensed under the Apache-2.0 License, and other transitive dependencies (see source).
Metadata
Release files for wenet-stt 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| wenet_stt-0.2.0-py2.py3-none-win_amd64.whl | Python 3, Python 2 | none | Windows x86-64 | Details for wenet_stt-0.2.0-py2.py3-none-win_amd64.whl |
| wenet_stt-0.2.0-py2.py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | Python 2, Python 3 | none | Linux glibc 2.17+ x86-64 | Details for wenet_stt-0.2.0-py2.py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
Total release size: 151.9 MB
Release files / wenet_stt-0.2.0-py2.py3-none-win_amd64.whl
| Download URL | wenet_stt-0.2.0-py2.py3-none-win_amd64.whl |
|---|---|
| Size | 59.8 MB |
| Tags | Python 2 Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
14d466b1efcf4366978e148edf0a7f2b9cdd2ed9d0f88dcb6a82ee9ad8b6c671
|
|
BLAKE2b-256 checksum How to use checksums |
3c0233da2c9c4b6f19eea1db24122a1b353c44771b815dc624dc42ad89631a4d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.11
|
Release files / wenet_stt-0.2.0-py2.py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | wenet_stt-0.2.0-py2.py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 92.1 MB |
| Tags | Linux glibc 2.17+ x86-64 Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
c2130149d767243929f0c54162df70458898c787d0d66b1b6c9d1191935f95be
|
|
BLAKE2b-256 checksum How to use checksums |
2b453b026c292755365374c707e69b7f12ab136f8902428ce5b3e7b487257c51
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.11
|
Security for wenet-stt 0.2.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.