Beginner's question - "spk2utt and utt2spkk do not seem to match"
892 views
Skip to first unread message
Rolando Coto
unread,
Aug 14, 2017, 1:49:36 AM8/14/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to kaldi-help
Hi!
I'm starting to use Kaldi and I want to train it on my own data from a Central American Indigenous language. Because I'm just starting, I recorded myself saying a few words in the language and try to train Kaldi on that. But I am getting a few errors, the first of which is:
utils/validate_data_dir.sh: spk2utt and utt2spk do not seem to match
When I created spk2utt, I just transposed utt2spk and pretty much pasted it in there, so it should match. Does anyone have any suggestions? Thank you so much!
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to kaldi-help
I guess you must have made a mistake converting one to the other, see
utt2spk_to_spk2utt.pl and spk2utt_to_utt2spk.pl for how to convert one
into another without the possibility of error, but as the error
messages point out, it's not a good idea to put all the utterances as
the same speaker-- make it a separate speaker per utterance.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to kaldi-help, dpo...@gmail.com
Hi, Dan!
Thank you so much for your quick reply! I really appreciate it.
Unfortunately, utt2spk_to_spk2utt.pl are producing the exact same output I already have. I already tried copy-pasting their output into the files just to make sure it was working well, but run.sh gave me the same error. (I'm attaching a screen capture of the output of utt2spk_to_spkutt.pl).
(As for the single speaker problem, I will for sure give it more input data once I have at least one working demonstration model. Wouldn't the problem be independent from having just one speaker?)
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Rolando Coto, kaldi-help
Well I can see just from glancing at it that it's not right-- there is
a missing underscore (it's a space) 3 characters from the end. I
think you need to learn the basics of UNIX scripting. You may be
relying too much on copy-pasting and viewing and too little on UNIX
concepts like redirection, diff, cmp, things like that.
Rolando Coto
unread,
Aug 14, 2017, 7:17:08 PM8/14/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to kaldi-help, rolan...@gmail.com, dpo...@gmail.com
Hi, Dan!
The missing underscore was actually just me capturing the screen when the cursor was on; sorry about that. I wrote the utt2spk_to_spk2utt output directly to a file and then ran diff and cmp, and the commands said that the files were identical. I tried running run.sh on the autogenerated file, and it still didn't work (I'm attaching screen captures and relevant files). Unless there's some problem in how I named the speaker and the utterances, I don't know why I'd continue to issue the error message that spk2utt and utt2spk don't seem to match.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Rolando Coto, kaldi-help
Well there are other errors too, e.g. about the sorting order. That
might be the cause. You could try running fix_data_dir.sh on the
data-dir and see if it resolves the problem.
And as I said before, making all the utterances have the same speaker
if you don't have the speaker info is generally a bad idea.
Rolando Coto
unread,
Aug 14, 2017, 11:43:20 PM8/14/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to kaldi-help, rolan...@gmail.com, dpo...@gmail.com
I ran fix_data_dir.sh on both the training and the test data and it worked! The fix for the test data gave me the following output:
rolando@Bender:~/kaldi/egs/bribri01$ ./utils/fix_data_dir.sh data/test ./utils/fix_data_dir.sh: file data/test/spk2gender is not in sorted order or not unique, sorting it fix_data_dir.sh: kept all 225 utterances. fix_data_dir.sh: old files are kept in data/test/.backup
After that there were a few more issues, but I managed to make it recognize one word (capture attached). Thanks for your help!