Comments (13)
from openfst.
It's supposed to be more portable, although it's not required by the standard and left to the implementation as to which mode can or cannot be changed. But IIRC, it worked with MSVC. I'll check and let you know.
from openfst.
FYI, I fixed this issue, at least for my use cases. The changes are small, but spread out. @kkm000 Do you want a PR, or is it not important enough?
from openfst.
FYI, I fixed this issue, at least for my use cases. The changes are small, but spread out. @kkm000 Do you want a PR, or is it not important enough?
I may meet the same problem when I use kaldi under the cygwin enviroment, can u show your solution. Thank you very much. Below is my case
utils/make_lexicon_fst.pl --pron-probs $tmpdir/lexiconp.txt $sil_prob $silphone | \
fstcompile --isymbols=$dir/phones.txt --osymbols=$dir/words.txt \
--keep_isymbols=false --keep_osymbols=false | \
fstarcsort --sort_type=olabel > $dir/L.fst || exit 1;
and the error information
ERROR: GenericRegister::GetEntry: No such file or directory
ERROR: MutableFst::Read: Unknown FST type "vector" (arc type = "standard"): standard input
from openfst.
Oops, I've been lax in sending this in. I'll try to post it today.
from openfst.
@brucelin Should be fixed in #23. Also, some binaries with this fix are available if you download and unpack (with zip) the wheels for https://github.com/daanzu/kaldi-active-grammar.
from openfst.
@daanzu Thank you very much. I will try it.
from openfst.
Thanks for discovering the issue and the patch, and I'm sorry--was really busy last couple months.
I remember there was a way to deal with the text/binary streams using std::freopen
, do you think it would be a better approach if it works?
If
filename
is a null pointer, then the function attempts to reopen the file that is already associated with stream (it is implementation defined which mode changes are allowed in this case)
So it should be like std::freopen(nullptr, "wb", stdout);
. I recall it did the trick.
from openfst.
Neat, I don't recall knowing about the std::freopen
approach. It's been awhile since I wrote the patch, so I can't remember exactly why I chose this approach. I can say that it appears to have been working perfectly for me for the past 7 months, however.
from openfst.
Blocked-By: #30
from openfst.
Repro:
$ printf '0 1 10 10\n1\n' | fstcompile | xxd -u -s64
Linux output (ok):
00000040: 0000 0000 807F 0100 0000 0000 0000 0A00
00000050: 0000 0A00 0000 0000 0000 0100 0000 0000
00000060: 0000 0000 0000 0000 0000
Windows output (bug):
00000040: 0000 0000 807F 0100 0000 0000 0000 0D0A
00000050: 0000 000D 0A00 0000 0000 0000 0100 0000
00000060: 0000 0000 0000 0000 0000 0000
from openfst.
Repro 2. On a Windows machine, save the binary generated by fstcompile:
$ printf '0 1 10 10\n1\n'
0 1 10 10
1
$ printf '0 1 10 10\n1\n' | fstcompile | gzip | base64 -w0
H4sIAAAAAAAAA7v2d1MdGwMDQ1lqckl+EQeQVVySmJeSWJTCxAABzAyNUVkMCMDEgA4a6hmhLF4uGAECjGgqAUmO7J5sAAAA
Switch to Linux terminal, and do the reverse, unencode, ungzip, fstprint:
$ echo 'H4sIAAAAAAAAA7v2d1MdGwMDQ1lqckl+EQeQVVySmJeSWJTCxAABzAyNUVkMCMDEgA4a6hmhLF4uGAECjGgqAUmO7J5sAAAA' | base64 -d | gunzip | ./fstprint
0 65536 2573 658688
1
The result is nonsense.
from openfst.
Fixed in #32
from openfst.
Related Issues (20)
- Problem reading FAR file from farcompilestrings HOT 7
- Error reading SymbolTable HOT 3
- ERROR: Unknown file read mode when reading VectorFst HOT 6
- Feature request: Publish package on chocolatey HOT 4
- About the license of this repo HOT 2
- Building openfst and getting 36 errors, Please help me HOT 2
- Build errors on vector-fst.h line 611 when using Visual Studio 14 2015 HOT 3
- Cannot find source file when building from source with Cmake HOT 9
- Error reading Kaldi's GrammarFst HOT 5
- kkm: Bring the upstream up to date HOT 1
- Implement memory-mapped files
- Build ngram and other extensions HOT 4
- Proposed fixes for building with CMake and Clang-cl on Windows with HAVE_BIN=OFF HOT 7
- Access denied: Unable to start the program .../ALL_BUILD HOT 1
- Can't run on windows-xp HOT 1
- Cannot open include file: 'dlfcn.h': No such file or directory HOT 1
- OpenFST 1.8.0 port HOT 2
- Cross compile error when using mingw. HOT 15
- openfst DLL LoadLibrary stuck HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openfst.