Comments (9)
Dear Giampiero Salvi;
Did you find a solution to this problem, because I face the same problem now.
from kaldi-io-for-python.
Hi,
the solution is:
kaldi_io.read_ali_ark('ali-to-pdf exp/mono_ali/final.mdl "ark:gunzip -c exp/mono_ali/ali.1.gz|" ark:- |')
This will convert the alignment to PDF-id format and dump it in binary format to be read by your python on-the-fly...
If you already dumped the 'ASCII-text' alingments, this is your command:
kaldi_io.read_ali_ark('mono_ali.1.pdf.txt')
Let me know, if you experience any problems...
Karel
from kaldi-io-for-python.
Those will return generators that return (key, value)
tuples...
from kaldi-io-for-python.
from kaldi-io-for-python.
Maybe you are interested in kaldi pybind for the next generation kaldi.
We have wrapped kaldi io to Python. For example, to read alignment information,
you can use kaldi.read_vec_int
.
You can find an example usage here:
https://github.com/kaldi-asr/kaldi/blob/pybind11/src/pybind/tests/test_io_util.py#L21
Note that it is on the pybind11
branch instead of the master
branch.
from kaldi-io-for-python.
Thanks all, but another problem I want to read the
kaldi featuers (feat.scp) and apply cmvn, utt2speak and delta features how can I do this with kaldi_io
from kaldi-io-for-python.
Hi, you can do this by reading from a pipeline with "apply-cmvn" and "add-deltas" binaries in it. Look into GMM training scripts to see how the 'pipeline-string' looks like. Then you use this as filename when reading with 'kaldi-io-for-python'. Make sure that the 'pipeline-string' has '|' at the end.
from kaldi-io-for-python.
from kaldi-io-for-python.
Hi, this happens because 'fmllr' features are already normalized from earlier stage of processing. So we don't do CMVN on top of them... (actually the 'power' of cmvn is already contained in 'fmllr', both are affine transforms of feature spaces: cmvn has a diagonal matrix, fmllr has a full matrix. however the way these two are estimated is very different...)
K.
from kaldi-io-for-python.
Related Issues (20)
- Exit code 255 with open_or_fd HOT 2
- appended scp and ark file HOT 2
- Only load small parts of a big file HOT 2
- which function is equal to copy-matrix? HOT 1
- Query on wav.scp reader - Streaming audio HOT 1
- Modifications to $PATH if $KALDI_ROOT is not set HOT 8
- Raise the BUG about kaldi_io.UnknownMatrixHeader
- About AssertionError
- Reading scp files created by subsegment_data_dir.sh HOT 1
- Writing features as 'ark,scp' by pipeline with 'copy-feats' HOT 2
- `read_ali_ark` crashes when reading gzipped file
- "Failed to read vector from stream. : Expected token FV, got W"
- Parse matrix range in read_mat()
- Nnet example files
- how to read from wav.scp
- Supporting Lattice HOT 2
- hardcoded path
- I met a error when I use the read_vec_int_ark function HOT 1
- Add tags for releases HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kaldi-io-for-python.