Supported OpenFST versions?

231 views
Skip to first unread message

Arpit Aggarwal

unread,
May 23, 2020, 9:59:43 AM5/23/20
to kaldi-developers
HI,

Is the latest version of OpenFST supported or does Kaldi work only with OpenFST-1.6.7 ?

I'm working on making a DEB package of the Kaldi libraries while decoupling the build dependencies for my project Yapykaldi. The Makefile in the tools directory only downloads OpenFST-1.6.7 while the latest is 1.7.7, also as no document says which versions are supported, I'm not sure if using the latest would work.

Regards,
Arpit

Jan Trmal

unread,
May 23, 2020, 10:07:23 AM5/23/20
to kaldi-developers
I think no-one has tried... 1.6.7 is not a hard requirement, it's just the version we have tested it with.
y.

--
visit http://kaldi-asr.org/forums.html to find out how to join.
---
You received this message because you are subscribed to the Google Groups "kaldi-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kaldi-develope...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kaldi-developers/ba38651d-dded-46b6-b8af-124041e00217%40googlegroups.com.

Arpit Aggarwal

unread,
May 23, 2020, 10:14:56 AM5/23/20
to kaldi-de...@googlegroups.com
So, if I use the same tests as the CI of Kaldi and they pass, then can I assume that it works?
-Arpit


Jan Trmal

unread,
May 23, 2020, 10:17:55 AM5/23/20
to kaldi-developers
Well... I'd assume there is a high chance it might work :)
Also, IIRC the new OpenFST versions are compiling with c++17, so there might be some catch on C++ header level, but that would be found out quickly.
y.

Adam Janin

unread,
May 24, 2020, 7:19:06 PM5/24/20
to kaldi-developers
I haven't tried the very latest, but OpenFST 1.7.6 is not quite compatible with Kaldi. I got part way through a port when I got distracted by other stuff, but if there's interest, I can finish it off and do a PR.

Most of the changes were just passing std::cerr instead of &std:cerr to fstprinter.Print(), but there was also a change to how you write a StdCompactAcceptorFst (in chain-supervision.cc). Instead of calling WriteFst(), you have to convert the fst to a StdCompactAcceptorFst and then just call Write().

   Adam


On Saturday, May 23, 2020 at 7:17:55 AM UTC-7, Yenda wrote:
Well... I'd assume there is a high chance it might work :)
Also, IIRC the new OpenFST versions are compiling with c++17, so there might be some catch on C++ header level, but that would be found out quickly.
y.

On Sat, May 23, 2020 at 10:14 AM Arpit Aggarwal <ar1...@gmail.com> wrote:
So, if I use the same tests as the CI of Kaldi and they pass, then can I assume that it works?
-Arpit


On Sat, May 23, 2020 at 4:07 PM Jan Trmal <jtr...@gmail.com> wrote:
I think no-one has tried... 1.6.7 is not a hard requirement, it's just the version we have tested it with.
y.

On Sat, May 23, 2020 at 9:59 AM Arpit Aggarwal <ar1...@gmail.com> wrote:
HI,

Is the latest version of OpenFST supported or does Kaldi work only with OpenFST-1.6.7 ?

I'm working on making a DEB package of the Kaldi libraries while decoupling the build dependencies for my project Yapykaldi. The Makefile in the tools directory only downloads OpenFST-1.6.7 while the latest is 1.7.7, also as no document says which versions are supported, I'm not sure if using the latest would work.

Regards,
Arpit

--
visit http://kaldi-asr.org/forums.html to find out how to join.
---
You received this message because you are subscribed to the Google Groups "kaldi-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kaldi-de...@googlegroups.com.

--
visit http://kaldi-asr.org/forums.html to find out how to join.
---
You received this message because you are subscribed to the Google Groups "kaldi-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kaldi-de...@googlegroups.com.

--
visit http://kaldi-asr.org/forums.html to find out how to join.
---
You received this message because you are subscribed to the Google Groups "kaldi-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kaldi-de...@googlegroups.com.

Kirill 'kkm' Katsnelson

unread,
Jun 10, 2020, 7:03:57 AM6/10/20
to kaldi-developers
FWIW, I'm currently using 1.6.9. It just works.

 -kkm

Miroslav Janosik

unread,
Jun 15, 2020, 5:27:55 PM6/15/20
to kaldi-developers
Hi

I tried to use windows kaldi with openfst 1.7.2.1 (compiles) and OpenBlas 0.3.9 (produced a lot of errors for me), I did not get to fix OpenBlas compilation so I did not get to compile kaldi with openfst 1.7.2.

On CentOS I got few compilation issues with openfst 1.7.2 (error: redeclaration ‘‘Weight fst::Power()...') which could be fixed easily. Used OpenBlas 0.3.9, and during compilation of kaldi I got some "error: template with C linkage" errors with OpenBlas lapack includes.

After spending some time with that I returned back to use the openfst 1.6.7 and OpenBlas 0.3.5 which work just fine on both platforms.

  with regards, Miro

Dňa sobota, 23. mája 2020 15:59:43 UTC+2 Arpit Aggarwal napísal(a):

Nickolay Shmyrev

unread,
Jun 16, 2020, 5:00:35 PM6/16/20
to kaldi-developers
My patch to upgrade to 1.7.7 is here:


it works fine for decoder, but there are some differences in compact fst test. Compact fsts were reworked in 1.7.7

1.7.7 also has an issue with cross-compilation due to changes on configure.ac. I hope it will be fixed.

Arlo Faria

unread,
May 27, 2021, 11:01:51 PM5/27/21
to kaldi-de...@googlegroups.com
Hi!  I just wanted to share some experiences upgrading OpenFST, since it seems this has come up in #4533 recently.

Starting at the current Kaldi using OpenFST 1.7.2, the changes in #4096 to upgrade to 1.7.7 mostly applied for upgrading to 1.7.9 as well.  (It needs an additional change for SymbolTable::iterator using std::string instead of char*.)  While the upgraded software seems to work fine, it appears that the ngram FST binary format changed.  For example, if Gr.fst is produced by mkgraph_lookahead.sh (e.g. “small” Vosk models) with 1.6.7, it cannot be properly used with 1.7.9.  There’s a workaround: just re-serialize Gr.fst using fstprint to convert it to text format, followed by fstcompile to convert it to the newer binary format.
 
We then looked at upgrading Kaldi to use the latest OpenFST 1.8.1. It required relatively trivial changes to rename some variables (FLAGS_* became FST_FLAGS_*) and change some types (std::string instead of char*).  Of course, the complication is that OpenFST 1.8+ requires C++17.  While gcc --std=c+=17 will build and test Kaldi just fine (albeit with a ton of warnings), Apple’s clang12 fails because std::random_shuffle is supposed to be removed from C++17.  Resolving that seems non-trivial, as it’s the broader problem of avoiding std::rand, which seems to be used in a lot of places throughout Kaldi.

Hope this helps!

--
visit http://kaldi-asr.org/forums.html to find out how to join.
---
You received this message because you are subscribed to the Google Groups "kaldi-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kaldi-develope...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kaldi-developers/95ce1e4f-e135-4a84-99af-b3f04cb87434o%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages