opensource-spraakherkenning-nl / Kaldi_NL

Code related to the Dutch instance and user groups of the KALDI speech recognition toolkit
http://www.opensource-spraakherkenning.nl
Apache License 2.0
64 stars 16 forks source link

Weird problem on Ubuntu 18.04 in file local/flist2scp.sh #9

Closed insad closed 3 years ago

insad commented 5 years ago

Running decode.sh on a Fedora installation, there is no problem.

Running decode.sh on an Ubuntu 18.04 installation gives the following error:

    local/flist2scp.sh: line 35: ${#lines[@]-1}: bad substitution

I got the code working simply substituting line 35 in file local/flist2scp.sh by:

    numjobs=${#lines[@]}

which gives me a value of "1" if I have only 1 job (weird why in Fedora you have to substract 1 from the result as in the original code -- as there this gives also "1" having only 1 job....)

insad commented 5 years ago

Investigating a bit more, I think it is simply a code bug where Fedora doesn't complain about, but Ubuntu does. Imho line 35 should simply be:

      numjobs=${#lines[@]}
proycon commented 3 years ago

It seems your suggestion was implemented a while back already but the issue wasn't closed yet, doing so now.