kkm000 / openfst

Port of the OpenFST library to Windows
http://www.openfst.org/
Other
69 stars 38 forks source link

Could not load file error #11

Closed Excalib88 closed 6 years ago

Excalib88 commented 6 years ago

Hello. I am sorry, but i have problem with openfst and Kaldi. Who can help me please. I cannot load HCLG model on Windows https://pastebin.com/NtaswnAA Do you can say about commits 1.6.5 version which will be normal?

Log: LOG (online2-wav-nnet3-latgen-faster.exe[5.4-win]:kaldi::nnet3::ModelCollapser::Collapse():......\src\nnet3\nnet-utils.cc:1314) Added 1 components, removed 2 LOG (online2-wav-nnet3-latgen-faster.exe[5.4-win]:kaldi::nnet3::CompileLooped():......\src\nnet3\nnet-compile-looped.cc:334) Spent 0.0298299 seconds in looped compilation. ERROR: ConstFst::Read: Read failed: ERROR (online2-wav-nnet3-latgen-faster.exe[5.4-win]:fst::ReadFstKaldiGeneric():......\src\fstext\kaldi-fst-io.cc:82) Could not read fst from 'D:\mansurov_da\Desktop\kaldi\kaldi-ru-0.5\exp\tdnn\graph\HCLG.fst'

kkm000 commented 6 years ago

Thanks for the report! I added some trivial support for memory image FST loading (which ConstFst uses), but it has no specific unit tests for it, so I am worrying. It was done past 1.6.5.1 for sure. Can you tell from what Git SHA1 did you get the OpenFST source? Alternatively, is it much hassle to update to the latest 1.6.7.1 (beware it was tested only with VS 2017 compiler)? I think it should just work.

Can you also do me a favor and paste the log snippet into this ticket? This way others can search for the error text and find it.

Excalib88 commented 6 years ago

When i read documentation in kaldi i saw that there is line in which wrote this text: "We support only openfst-1.6.5 for now." Do you think that 1.6.7.1 version will build?

kkm000 commented 6 years ago

I believe the message is outdated, and perhaps about the lowest supported version. I think 1.6.7 is ok.

Excalib88 commented 6 years ago

Thanks for your work! I will try!

kkm000 commented 6 years ago

Sure, but let me know please if it worked for you.

Excalib88 commented 6 years ago

I tried to use 1.6.7.1 version, It commit`s header is "Try automatigaly locating Windwos 10 SDK". I have a lot of errors. image But i cannot this errors when i build 1.6.5 version

kkm000 commented 6 years ago

This is not so much helpful. Please post errors from the Output window, at least the few starting lines.

Are you using CMake or the supplied sln and vcxproj files? If CMake, you might need to retarget the generated projects to a version of the Windows SDK that you have (either 8.1 or 10.0.x.x any version will work).

Excalib88 commented 6 years ago

I used sln and renamed libfst.lib to fst.lib and moved into openfst\build_output\src\lib\Release\fst.lib . Now i update Windows SDK on last version ( 10.0.17134.0) when i uploaded, i believe, everything will be fine! Thanks

kkm000 commented 6 years ago

I can see if it compiles with Kaldi for me, but only tomorrow. In your screenshot I see that the compiler is not happy about the NaturalWeight template, and this is one of the areas they certainly touched upstream.

kkm000 commented 6 years ago

I do not believe updating the SDK would help. At the very least, I will be much surprised if it will. :)

Excalib88 commented 6 years ago

I have a list errors(attached) kaldi-err.txt or https://pastebin.com/8YWKZiWM

Excalib88 commented 6 years ago

I am sorry, did you can build kaldi?

kkm000 commented 6 years ago

I just pushed a change to the winport branch that should fix the build for you. There is a pending fix in Kaldi to address this API change (kaldi-asr/kaldi#2313), but the upstream change does not make much sense by itself, so I am just reverting to the old code into the Windows port.

I am also looking into a peculiar problem with the binaries, with some weight types not registering correctly for IO.

kkm000 commented 6 years ago

Any luck with the port? Did it compile for you this time?

BTW, I've seen your other question on the Kaldi PR. As @jtrmal mentioned, online binaries cannot be compiled on Windows, because there are too many system dependencies (real time audio API is entirely different, for one). Just wondering, why do you need them?

kkm000 commented 6 years ago

I'm closing this as fixed due to inactivity. Please LMK if it was not.