Comments (8)
Hi Quentin,
yes, getting kaldi tools to $PATH is necessary, so that they can be used in the 'pipeline filenames':
kaldi_io.read_mat('sum-matrix ... | scale-matrix ... - |')
And, yes, i could eventually put it into a try
block, and show an annoying warning if Kaldi is not found...
So you don't use kaldi at all, you are just importing the its data formats in another project?
Am i correct?
K.
from kaldi-io-for-python.
In what way was it failing to you? Do you use Linux, or other OS?
K.
from kaldi-io-for-python.
I modified it a bit, please let me know if it solves you problem:
d6f9d9f
from kaldi-io-for-python.
So you don't use kaldi at all, you are just importing the its data formats in another project?
Am i correct?
I have already computed all the features I needed with Kaldi scripts, I am indeed just using your code for loading the generated files
In what way was it failing to you? Do you use Linux, or other OS?
This section in particular is problematic:
if not 'KALDI_ROOT' in os.environ:
# Default! To change run python with 'export KALDI_ROOT=/some_dir python'
os.environ['KALDI_ROOT']='/mnt/matylda5/iveselyk/Tools/kaldi-trunk'
I had some problems with the encodings and was trying to traceback what was going wrong. At some point, I echo'ed my environment and saw a lot of weird things had been added to my $PATH
, including a folder that did not exist in my filesystem... Turns out the code above was the reason.
I think that instead of adding this to the environment variable, which will only work for you, you should raise an error. In fact, setting $KALDI_ROOT
and having Kaldi bins in the $PATH
is not always necessary to use most functions in your script, so it's probably best to check and raise when Kaldi is necessary and ignore otherwise.
from kaldi-io-for-python.
i don't understand, how extending $PATH can cause problems with encodings... even if there is a path added that does not exist, it should not cause any failures IMHO...
and having the $PATH extended only sometimes would not be user friendly... having kaldi binaries on $PATH is an important and very handy/powerful feature...
from kaldi-io-for-python.
It does not cause problems with the encoding
from kaldi-io-for-python.
I'll add that it's a bit weird to include a hardcoded path that will almost certainly not exist for anyone else. If $KALDI_ROOT
is really required but it's not set, it's better to throw an error than to silently set it to a path that won't necessarily exist.
from kaldi-io-for-python.
Well, it depends. For some use-cases running kaldi binaries in pipe commands is not necessary.
In this case setting $KALDI_ROOT
is not necessary. Only in the "advanced" cases with pipes it becomes necessary.
So both "modes" make sense, depending on the circumstances...
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
- Reading target (alignment) files HOT 9
- 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.