nttcslab-sp / kaldiio

A pure python module for reading and writing kaldi ark files
Other
248 stars 35 forks source link

matrix slices differ between KALDI and kaldiio #44

Closed kazu-hama closed 4 years ago

kazu-hama commented 4 years ago

Hi, I want to use the kaldiio library to read feats.scp, but when slices are included in feats.scp file, KALDI-command and kaldiio-function give different results.

This shell script(test.sh) reproduces the problem:

#!/bin/bash
matrix-dim /path/to/test.ark:6[3:5]
python3 -c 'import kaldiio; print(kaldiio.load_mat("/path/to/test.ark:6[3:5]").shape)'

Execution result:

$ test.sh
matrix-dim /path/to/test.ark:6[3:5]
3       20
(2,20)

thanks.

nttcslab-sp-admin commented 4 years ago

Thanks. I didn't realize it. This is a fatal bug and fixed in the current version.

kazu-hama commented 4 years ago

Thanks for your reply, it now work well.