kaldi-io-for-python
'Glue' code connecting kaldi data and python.
Supported data types
- vector (integer)
- Vector (float, double)
- Matrix (float, double)
- Posterior (posteriors, nnet1 training targets, confusion networks, ...)
Examples
Reading feature scp example:
import kaldi_io
for key,mat in kaldi_io.read_mat_scp(file):
...
Writing feature ark to file/stream:
import kaldi_io
with open(ark_file,'wb') as f:
for key,mat in dict.iteritems():
kaldi_io.write_mat(f, mat, key=key)
Writing features as 'ark,scp' by pipeline with 'copy-feats':
import kaldi_io
ark_scp_output='ark:| copy-feats --compress=true ark:- ark,scp:data/feats2.ark,data/feats2.scp'
with kaldi_io.open_or_fd(ark_scp_output,'wb') as f:
for key,mat in dict.iteritems():
kaldi_io.write_mat(f, mat, key=key)
Install
- from pypi:
pip install kaldi_io`
- from sources:
git clone https://github.com/vesis84/kaldi-io-for-python.git <kaldi-io-dir>`
pip install -r requirements.txt
pip install --editable .
Note: it is recommended to set export KALDI_ROOT=<some_kaldi_dir> environment variable.
The I/O based on pipes can then contain kaldi binaries.
Unit tests
(note: these are not included in pypi package)
Unit tests are started this way:
./run_tests.sh
or by:
python3 -m unittest discover -s tests -t .
python2 -m unittest discover -s tests -t .
License
Apache License, Version 2.0 ('LICENSE-2.0.txt')
Community
- accepting pull requests with extensions on GitHub
- accepting feedback via GitHub 'Issues' in the repo
Metadata
Release files for kaldi-io 0.9.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| kaldi_io-0.9.8.tar.gz | 44.0 kB | Without provenance | Details for kaldi_io-0.9.8.tar.gz |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kaldi_io-0.9.8-py3-none-any.whl | Python 3 | none | any | Details for kaldi_io-0.9.8-py3-none-any.whl |
| kaldi_io-0.9.8-py2-none-any.whl | Python 2 | none | any | Details for kaldi_io-0.9.8-py2-none-any.whl |
Total release size: 77.4 kB
Release files / kaldi_io-0.9.8.tar.gz
| Download URL | kaldi_io-0.9.8.tar.gz |
|---|---|
| Size | 44.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
48f8057413e8800a18518e2077f1d29a40b9487b80052a496828a68817aa93dc
|
|
BLAKE2b-256 checksum How to use checksums |
c7f8d841f5d352370a3576c4339d59cc0d0c17d153b71f221798fefa05953562
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Release files / kaldi_io-0.9.8-py3-none-any.whl
| Download URL | kaldi_io-0.9.8-py3-none-any.whl |
|---|---|
| Size | 16.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e82c623df158e22be420f4efad1cee42cbb9aa446e665722441b85b27f9a5a42
|
|
BLAKE2b-256 checksum How to use checksums |
d8b53aca5c81d094a850ac1331a23d58ce868553720a892db9b0c3a9f9b4c121
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Release files / kaldi_io-0.9.8-py2-none-any.whl
| Download URL | kaldi_io-0.9.8-py2-none-any.whl |
|---|---|
| Size | 16.7 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
4e36804117072e7e8e2b66954fcb58a20de1c8e0e917ecd88b852fa2f87196ed
|
|
BLAKE2b-256 checksum How to use checksums |
90f5f018ab6949c6416beba22787a3b69245129ae99bcad42116db322f29ff4f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Security for kaldi-io 0.9.8
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.