Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion failure in fstmakecontextsyms utility #3134

Closed
ghost opened this issue Mar 18, 2019 · 5 comments
Closed

Assertion failure in fstmakecontextsyms utility #3134

ghost opened this issue Mar 18, 2019 · 5 comments

Comments

@ghost
Copy link

ghost commented Mar 18, 2019

The usage example provided in the code comment at fstmakecontextsym.cc doesn't work giving an assertion failure:

$ fstmakecontextsyms phones.txt ilabels.int > context_syms.txt
fstmakecontextsyms phones.txt ilabels.int
ASSERTION_FAILED (fstmakecontextsyms[5.5.246-7a1908]:CreateILabelInfoSymbolTable():context-fst.cc:348) Assertion failed: (!info.empty() && !info[0].empty())

[ Stack-Trace: ]
kaldi::MessageLogger::LogMessage() const
kaldi::KaldiAssertFailure_(char const*, char const*, int, char const*)
fst::CreateILabelInfoSymbolTable(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, fst::SymbolTable const&, std::string, std::string)
main
__libc_start_main
fstmakecontextsyms() [0x4034e9]

Aborted

OTH, according the online documentation, the first item of the ilabel_info object is supposed to be an empty vector. Just inverting the check !info[0].empty() seems to fix the issue. Here is the commit in my branch for the reference https://github.com/dorozhkin-stc/kaldi/commit/0afbadb25883f0f46f2f05dcb54f9d142e5e9d3e.

@danpovey
Copy link
Contributor

Can you please make a PR for that?
We don't often run that code so I guess I can just about believe this was a bug (although I'm surprised it was never encountered before).

@danpovey danpovey reopened this Mar 18, 2019
@danpovey
Copy link
Contributor

sorry, my mouse is acting up.

@ghost
Copy link
Author

ghost commented Mar 19, 2019

OK, this is my PR: #3142
CI has failed to build

kaldi-online.a(online-audio-source.o): In function `kaldi::OnlinePaSource::Callback(void const*, void*, long, PaStreamCallbackTimeInfo const*, unsigned long)':
/home/travis/build/kaldi-asr/kaldi/src/online/online-audio-source.cc:161: undefined reference to `PaUtil_GetRingBufferWriteAvailable'
/home/travis/build/kaldi-asr/kaldi/src/online/online-audio-source.cc:164: undefined reference to `PaUtil_WriteRingBuffer'
kaldi-online.a(online-audio-source.o): In function `OnlinePaSource':
/home/travis/build/kaldi-asr/kaldi/src/online/online-audio-source.cc:71: undefined reference to `PaUtil_InitializeRingBuffer'
kaldi-online.a(online-audio-source.o): In function `kaldi::OnlinePaSource::Read(kaldi::Vector<float>*)':
/home/travis/build/kaldi-asr/kaldi/src/online/online-audio-source.cc:122: undefined reference to `PaUtil_GetRingBufferReadAvailable'
/home/travis/build/kaldi-asr/kaldi/src/online/online-audio-source.cc:122: undefined reference to `PaUtil_GetRingBufferReadAvailable'
/home/travis/build/kaldi-asr/kaldi/src/online/online-audio-source.cc:138: undefined reference to `PaUtil_ReadRingBuffer'

but I guess this is not my fault.

@jtrmal
Copy link
Contributor

jtrmal commented Mar 19, 2019 via email

@kkm000
Copy link
Contributor

kkm000 commented Mar 19, 2019

Fixed by #3142.

@kkm000 kkm000 closed this as completed Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants