Menu

Using my own features

Help
2015-07-07
2015-07-08
  • Eric Camalo

    Eric Camalo - 2015-07-07

    Hi there,
    I know KALDI is able to use user defined features so I tried to use my own frontend and generated my own features but when I used $delta_opts in feats="ark,s,cs:apply-cmvn..." on monophone to eliminate the effect of deltas, the accuracy is dramatically lower in compare to HTK. IS there any reason for that? Is it the only thing that I need to do?
    Next on train_deltas.sh for eliminating the deltas, (this time for triphone) I added "--delta-opts "--delta-order=0"" to feats="ark,s,cs:apply-cmvn..." and it made the job failed with this error log:


    acc-tree-stats --ci-phones=1:2:3:4:5:6:7:8:9:10:11:12:13:14:15 exp/mono0a_ali/final.mdl "ark,s,cs:apply-cmvn --utt2spk=ark:data/train_si84_half/split8/1/utt2spk scp:data/train_si84_half/split8/1/cmvn.scp scp:data/train_si84_half/split8/1/feats.scp ark:- | add-deltas --delta-opts --delta-order=0 ark:- ark:- |" "ark:gunzip -c exp/mono0a_ali/ali.1.gz|" exp/tri1/1.treeacc

    Started at Tue Jul 7 16:11:03 EDT 2015

    acc-tree-stats --ci-phones=1:2:3:4:5:6:7:8:9:10:11:12:13:14:15 exp/mono0a_ali/final.mdl 'ark,s,cs:apply-cmvn --utt2spk=ark:data/train_si84_half/split8/1/utt2spk scp:data/train_si84_half/split8/1/cmvn.scp scp:data/train_si84_half/split8/1/feats.scp ark:- | add-deltas --delta-opts --delta-order=0 ark:- ark:- |' 'ark:gunzip -c exp/mono0a_ali/ali.1.gz|' exp/tri1/1.treeacc
    apply-cmvn --utt2spk=ark:data/train_si84_half/split8/1/utt2spk scp:data/train_si84_half/split8/1/cmvn.scp scp:data/train_si84_half/split8/1/feats.scp ark:-

    Add deltas (typically to raw mfcc or plp features
    Usage: add-deltas [options] in-rspecifier out-wspecifier

    Options:
    --delta-order : Order of delta computation (int, default = 2)
    --delta-window : Parameter controlling window for delta computation (actual window size for each delta order is 1 + 2*delta-window-size) (int, default = 2)
    --truncate : If nonzero, first truncate features to this dimension. (int, default = 0)

    Standard options:
    --config : Configuration file to read (this option may be repeated) (string, default = "")
    --help : Print out usage message (bool, default = false)
    --print-args : Print the command line arguments (to stderr) (bool, default = true)
    --verbose : Verbose level (higher->more logging) (int, default = 0)

    Command line was: add-deltas --delta-opts --delta-order=0 ark:- ark:-
    ERROR (add-deltas:Read():parse-options.cc:375) Invalid option --delta-opts
    ERROR (add-deltas:Read():parse-options.cc:375) Invalid option --delta-opts

    [stack trace: ]
    kaldi::KaldiGetStackTrace()
    kaldi::KaldiErrorMessage::~KaldiErrorMessage()
    kaldi::ParseOptions::Read(int, char const const)
    add-deltas(main+0x1c1) [0x451f15]
    /lib64/libc.so.6(__libc_start_main+0xfd) [0x31b6e1ed5d]
    add-deltas() [0x451c99]

    LOG (acc-tree-stats:main():acc-tree-stats.cc:149) Accumulated stats for 0 files, 0 failed due to no alignment, 0 failed for other reasons.
    LOG (acc-tree-stats:main():acc-tree-stats.cc:152) Number of separate stats (context-dependent states) is 0
    WARNING (acc-tree-stats:Close():kaldi-io.cc:446) Pipe gunzip -c exp/mono0a_ali/ali.1.gz| had nonzero return status 13
    WARNING (acc-tree-stats:Close():kaldi-io.cc:446) Pipe apply-cmvn --utt2spk=ark:data/train_si84_half/split8/1/utt2spk scp:data/train_si84_half/split8/1/cmvn.scp scp:data/train_si84_half/split8/1/feats.scp ark:- | add-deltas --delta-opts --delta-order=0 ark:- ark:- | had nonzero return status 65280

    Accounting: time=0 threads=1

    Ended (code 1) at Tue Jul 7 16:11:03 EDT 2015, elapsed time 0 seconds


    Could anybody help me in this regard?
    Thanks in advanced

     
    • Daniel Povey

      Daniel Povey - 2015-07-07

      The form "--delta-opts "--delta-order=0"" would be used on the command
      line of train_deltas.sh, not added as a modification to the script.
      You'd just want --delta-order=0 if modifying the script. The option
      format of the scripts requires a space, but of the c++ programs
      requires an "=" sign.
      Dan

      On Tue, Jul 7, 2015 at 1:37 PM, Eric Camalo roozbeh412@users.sf.net wrote:

      Hi there,
      I know KALDI is able to use user defined features so I tried to use my own
      frontend and generated my own features but when I used $delta_opts in
      feats="ark,s,cs:apply-cmvn..." on monophone to eliminate the effect of
      deltas, the accuracy is dramatically lower in compare to HTK. IS there any
      reason for that? Is it the only thing that I need to do?
      Next on train_deltas.sh for eliminating the deltas, (this time for triphone)
      I added "--delta-opts "--delta-order=0"" to feats="ark,s,cs:apply-cmvn..."
      and it made the job failed with this error log:


      acc-tree-stats --ci-phones=1:2:3:4:5:6:7:8:9:10:11:12:13:14:15
      exp/mono0a_ali/final.mdl "ark,s,cs:apply-cmvn
      --utt2spk=ark:data/train_si84_half/split8/1/utt2spk
      scp:data/train_si84_half/split8/1/cmvn.scp
      scp:data/train_si84_half/split8/1/feats.scp ark:- | add-deltas --delta-opts
      --delta-order=0 ark:- ark:- |" "ark:gunzip -c exp/mono0a_ali/ali.1.gz|"
      exp/tri1/1.treeacc

      Started at Tue Jul 7 16:11:03 EDT 2015

      acc-tree-stats --ci-phones=1:2:3:4:5:6:7:8:9:10:11:12:13:14:15
      exp/mono0a_ali/final.mdl 'ark,s,cs:apply-cmvn
      --utt2spk=ark:data/train_si84_half/split8/1/utt2spk
      scp:data/train_si84_half/split8/1/cmvn.scp
      scp:data/train_si84_half/split8/1/feats.scp ark:- | add-deltas --delta-opts
      --delta-order=0 ark:- ark:- |' 'ark:gunzip -c exp/mono0a_ali/ali.1.gz|'
      exp/tri1/1.treeacc
      apply-cmvn --utt2spk=ark:data/train_si84_half/split8/1/utt2spk
      scp:data/train_si84_half/split8/1/cmvn.scp
      scp:data/train_si84_half/split8/1/feats.scp ark:-

      Add deltas (typically to raw mfcc or plp features
      Usage: add-deltas [options] in-rspecifier out-wspecifier

      Options:
      --delta-order : Order of delta computation (int, default = 2)
      --delta-window : Parameter controlling window for delta computation (actual
      window size for each delta order is 1 + 2*delta-window-size) (int, default =
      2)
      --truncate : If nonzero, first truncate features to this dimension. (int,
      default = 0)

      Standard options:
      --config : Configuration file to read (this option may be repeated) (string,
      default = "")
      --help : Print out usage message (bool, default = false)
      --print-args : Print the command line arguments (to stderr) (bool, default =
      true)
      --verbose : Verbose level (higher->more logging) (int, default = 0)

      Command line was: add-deltas --delta-opts --delta-order=0 ark:- ark:-
      ERROR (add-deltas:Read():parse-options.cc:375) Invalid option --delta-opts
      ERROR (add-deltas:Read():parse-options.cc:375) Invalid option --delta-opts

      [stack trace: ]
      kaldi::KaldiGetStackTrace()
      kaldi::KaldiErrorMessage::~KaldiErrorMessage()
      kaldi::ParseOptions::Read(int, char const const)
      add-deltas(main+0x1c1) [0x451f15]
      /lib64/libc.so.6(__libc_start_main+0xfd) [0x31b6e1ed5d]
      add-deltas() [0x451c99]

      LOG (acc-tree-stats:main():acc-tree-stats.cc:149) Accumulated stats for 0
      files, 0 failed due to no alignment, 0 failed for other reasons.
      LOG (acc-tree-stats:main():acc-tree-stats.cc:152) Number of separate stats
      (context-dependent states) is 0
      WARNING (acc-tree-stats:Close():kaldi-io.cc:446) Pipe gunzip -c
      exp/mono0a_ali/ali.1.gz| had nonzero return status 13
      WARNING (acc-tree-stats:Close():kaldi-io.cc:446) Pipe apply-cmvn
      --utt2spk=ark:data/train_si84_half/split8/1/utt2spk
      scp:data/train_si84_half/split8/1/cmvn.scp
      scp:data/train_si84_half/split8/1/feats.scp ark:- | add-deltas --delta-opts
      --delta-order=0 ark:- ark:- | had nonzero return status 65280

      Accounting: time=0 threads=1

      Ended (code 1) at Tue Jul 7 16:11:03 EDT 2015, elapsed time 0 seconds


      Could anybody help me in this regard?
      Thanks in advanced


      Using my own features


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/kaldi/discussion/1355348/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       
    • Jan "yenda" Trmal

      Re the second question:
      the command line should not be add-deltas --delta-opts --delta-order=0
      it should be just add-deltas--delta-order=0
      y

      On Tue, Jul 7, 2015 at 4:37 PM, Eric Camalo roozbeh412@users.sf.net wrote:

      Hi there,
      I know KALDI is able to use user defined features so I tried to use my own
      frontend and generated my own features but when I used $delta_opts in
      feats="ark,s,cs:apply-cmvn..." on monophone to eliminate the effect of
      deltas, the accuracy is dramatically lower in compare to HTK. IS there any
      reason for that? Is it the only thing that I need to do?
      Next on train_deltas.sh for eliminating the deltas, (this time for
      triphone) I added "--delta-opts "--delta-order=0"" to
      feats="ark,s,cs:apply-cmvn..." and it made the job failed with this error
      log:


      acc-tree-stats --ci-phones=1:2:3:4:5:6:7:8:9:10:11:12:13:14:15

      exp/mono0a_ali/final.mdl "ark,s,cs:apply-cmvn
      --utt2spk=ark:data/train_si84_half/split8/1/utt2spk
      scp:data/train_si84_half/split8/1/cmvn.scp
      scp:data/train_si84_half/split8/1/feats.scp ark:- | add-deltas --delta-opts
      --delta-order=0 ark:- ark:- |" "ark:gunzip -c exp/mono0a_ali/ali.1.gz|"
      exp/tri1/1.treeacc

      Started at Tue Jul 7 16:11:03 EDT 2015

      acc-tree-stats --ci-phones=1:2:3:4:5:6:7:8:9:10:11:12:13:14:15
      exp/mono0a_ali/final.mdl 'ark,s,cs:apply-cmvn
      --utt2spk=ark:data/train_si84_half/split8/1/utt2spk
      scp:data/train_si84_half/split8/1/cmvn.scp
      scp:data/train_si84_half/split8/1/feats.scp ark:- | add-deltas --delta-opts
      --delta-order=0 ark:- ark:- |' 'ark:gunzip -c exp/mono0a_ali/ali.1.gz|'
      exp/tri1/1.treeacc
      apply-cmvn --utt2spk=ark:data/train_si84_half/split8/1/utt2spk
      scp:data/train_si84_half/split8/1/cmvn.scp
      scp:data/train_si84_half/split8/1/feats.scp ark:-

      Add deltas (typically to raw mfcc or plp features
      Usage: add-deltas [options] in-rspecifier out-wspecifier

      Options:
      --delta-order : Order of delta computation (int, default =
      2)
      --delta-window : Parameter controlling window for delta
      computation (actual window size for each delta order is 1 +
      2*delta-window-size) (int, default = 2)
      --truncate : If nonzero, first truncate features to
      this dimension. (int, default = 0)

      Standard options:
      --config : Configuration file to read (this option
      may be repeated) (string, default = "")
      --help : Print out usage message (bool, default =
      false)
      --print-args : Print the command line arguments (to
      stderr) (bool, default = true)
      --verbose : Verbose level (higher->more logging) (int,
      default = 0)

      Command line was: add-deltas --delta-opts --delta-order=0 ark:- ark:-
      ERROR (add-deltas:Read():parse-options.cc:375) Invalid option --delta-opts
      ERROR (add-deltas:Read():parse-options.cc:375) Invalid option --delta-opts

      [stack trace: ]
      kaldi::KaldiGetStackTrace()
      kaldi::KaldiErrorMessage::~KaldiErrorMessage()
      kaldi::ParseOptions::Read(int, char const const)
      add-deltas(main+0x1c1) [0x451f15]
      /lib64/libc.so.6(__libc_start_main+0xfd) [0x31b6e1ed5d]
      add-deltas() [0x451c99]

      LOG (acc-tree-stats:main():acc-tree-stats.cc:149) Accumulated stats for 0
      files, 0 failed due to no alignment, 0 failed for other reasons.
      LOG (acc-tree-stats:main():acc-tree-stats.cc:152) Number of separate stats
      (context-dependent states) is 0
      WARNING (acc-tree-stats:Close():kaldi-io.cc:446) Pipe gunzip -c
      exp/mono0a_ali/ali.1.gz| had nonzero return status 13
      WARNING (acc-tree-stats:Close():kaldi-io.cc:446) Pipe apply-cmvn
      --utt2spk=ark:data/train_si84_half/split8/1/utt2spk
      scp:data/train_si84_half/split8/1/cmvn.scp
      scp:data/train_si84_half/split8/1/feats.scp ark:- | add-deltas --delta-opts
      --delta-order=0 ark:- ark:- | had nonzero return status 65280

      Accounting: time=0 threads=1

      Ended (code 1) at Tue Jul 7 16:11:03 EDT 2015, elapsed time 0 seconds


      Could anybody help me in this regard?
      Thanks in advanced


      Using my own features


      Sent from sourceforge.net because you indicated interest in <
      https://sourceforge.net/p/kaldi/discussion/1355348/>

      To unsubscribe from further messages, please visit <
      https://sourceforge.net/auth/subscriptions/>

       
  • Eric Camalo

    Eric Camalo - 2015-07-08

    Thanks it worked perfect.
    Now on aligning of tri1, it fails with this error message;
    run.pl: 8 / 8 failed, log is in exp/tri1_ali_si84/log/align.*.log
    but "exp/tri1_ali_si84" directory is not generated. Could you please tell me why it is not generated? or how can I have access to that log?

     
    • Daniel Povey

      Daniel Povey - 2015-07-08

      Hm.
      I suspect that that directory does exist but you did not see it
      somehow. Or possibly a weird permissions or umask issue.
      Dan

      On Tue, Jul 7, 2015 at 8:41 PM, Eric Camalo roozbeh412@users.sf.net wrote:

      Thanks it worked perfect.
      Now on aligning of tri1, it fails with this error message;
      run.pl: 8 / 8 failed, log is in exp/tri1_ali_si84/log/align.*.log
      but "exp/tri1_ali_si84" directory is not generated. Could you please tell me
      why it is not generated? or how can I have access to that log?


      Using my own features


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/kaldi/discussion/1355348/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       
  • Eric Camalo

    Eric Camalo - 2015-07-08

    Thanks Dan and Jan for all your helps. The problem was because of a permission issue.
    Now for decoding the dimension of my data is tripled.
    Here is the error:
    ERROR (gmm-latgen-faster:LogLikelihoodZeroBased():decodable-am-diag-gmm.cc:50) Dim mismatch: data dim = 117 vs. model dim = 39
    WARNING (gmm-latgen-faster:~HashList():util/hash-list-inl.h:116) Possible memory leak: 1022 != 1024: you might have forgotten to call Delete on some Elems
    Do you have any idea what can do this to my data?

     
    • Daniel Povey

      Daniel Povey - 2015-07-08

      It looks like the delta-opts are not being passed in to the decoding
      script- most likely because you hacked the training script instead of
      adding "--delta-opts "--delta-order=0"" on the command line of the
      train_deltas.sh script.
      Dan

      On Wed, Jul 8, 2015 at 10:22 AM, Eric Camalo roozbeh412@users.sf.net wrote:

      Thanks Dan and Jan for all your helps. The problem was because of a
      permission issue.
      Now for decoding the dimension of my data is tripled.
      Here is the error:
      ERROR
      (gmm-latgen-faster:LogLikelihoodZeroBased():decodable-am-diag-gmm.cc:50) Dim
      mismatch: data dim = 117 vs. model dim = 39
      WARNING (gmm-latgen-faster:~HashList():util/hash-list-inl.h:116) Possible
      memory leak: 1022 != 1024: you might have forgotten to call Delete on some
      Elems
      Do you have any idea what can do this to my data?


      Using my own features


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/kaldi/discussion/1355348/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       
  • Eric Camalo

    Eric Camalo - 2015-07-08

    On monophone script, this option doesn't exist by default so I just modified feats on train_mono.sh that is:
    feats="ark,s,cs:apply-cmvn $cmvn_opts --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas $delta_opts ark:- ark:- |"
    and defined delta_opts on the beginning of code then called this script from command line by "--delta-opts "--delta-order=0"". Is this wrong?

     
    • Daniel Povey

      Daniel Povey - 2015-07-08

      If you put the string
      --delta-order=0
      into a file exp/mono/delta_opts (or whatever the directory is) the
      decoding should work.
      You need to be willing to look a little into the scripts. this is not
      rocket science.
      Dan

      On Wed, Jul 8, 2015 at 11:07 AM, Eric Camalo roozbeh412@users.sf.net wrote:

      On monophone script, this option doesn't exist by default so I just modified
      feats on train_mono.sh that is:
      feats="ark,s,cs:apply-cmvn $cmvn_opts --utt2spk=ark:$sdata/JOB/utt2spk
      scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas
      $delta_opts ark:- ark:- |"
      and defined delta_opts on the beginning of code then called this script from
      command line by "--delta-opts "--delta-order=0"". Is this wrong?


      Using my own features


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/kaldi/discussion/1355348/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/