Giter Site home page Giter Site logo

Comments (9)

mnabihali avatar mnabihali commented on September 27, 2024

Dear Giampiero Salvi;
Did you find a solution to this problem, because I face the same problem now.

from kaldi-io-for-python.

KarelVesely84 avatar KarelVesely84 commented on September 27, 2024

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.

KarelVesely84 avatar KarelVesely84 commented on September 27, 2024

Those will return generators that return (key, value) tuples...

from kaldi-io-for-python.

mnabihali avatar mnabihali commented on September 27, 2024

from kaldi-io-for-python.

csukuangfj avatar csukuangfj commented on September 27, 2024

@mnabihali

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.

mnabihali avatar mnabihali commented on September 27, 2024

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.

KarelVesely84 avatar KarelVesely84 commented on September 27, 2024

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.

mnabihali avatar mnabihali commented on September 27, 2024

from kaldi-io-for-python.

KarelVesely84 avatar KarelVesely84 commented on September 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.