This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all: farcompose | |
CXXFLAGS=-O2 -std=c++11 | |
LDFLAGS=-L/usr/local/lib -L/usr/local/lib/fst | |
farcompose: farcompose.o | |
$(CXX) $^ -o $@ $(LDFLAGS) $(LDLIBS) -lfst -lfstfar | |
clean: | |
rm -rf *.o farcompose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: src/Makefile | |
=================================================================== | |
--- src/Makefile (revision 3967) | |
+++ src/Makefile (working copy) | |
@@ -92,7 +92,7 @@ | |
# delete or comment out the lines below. | |
OPENFST_VER = $(shell grep 'PACKAGE_VERSION' ../tools/openfst/Makefile | sed -e 's:.*= ::') | |
test_dependencies: | |
- @[ "$(OPENFST_VER)" == '1.2.10' ] || [ "$(OPENFST_VER)" == '1.3.2' ] || [ "$(OPENFST_VER)" == '1.3.4' ] || { echo "You now need openfst-1.2.10. Do: cd ../tools; svn update; ./install.sh; cd ../src; make depend; make"; exit 1; }; | |
+ @[ "$(OPENFST_VER)" == '1.4.0' ] || { echo "You now need openfst-1.4.0. Do: cd ../tools; svn update; ./install.sh; cd ../src; make depend; make"; exit 1; }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all: lattice4-arc.so | |
CXXFLAGS+=-O2 -g -fPIC | |
#For OSX 10.9 uncomment fhe following | |
# | |
#CXXFLAGS+=-stdlib=libstdc++ | |
#LDFLAGS+=-stdlib=libstdc++ | |
lattice4-arc.so: lattice-arc.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all: | |
EXTRA_CXXFLAGS = -Wno-mismatched-tags -Wno-sign-compare \ | |
-L../../tools/openfst-1.3.2/src/extensions/far/.libs \ | |
-lfstfar -lfstfarscript | |
include ../kaldi.mk | |
BINFILES = far-to-lattice |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Compile something like this | |
//g++ main.cc -o main -O2 -lfst | |
#include <iostream> | |
#include <fst/compose.h> | |
#include <fst/vector-fst.h> | |
using namespace std; | |
using namespace fst; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
KALDI_ROOT= | |
OPENLAT_ROOT= | |
all: lattice-to-htk | |
ifndef KALDI_ROOT | |
$(error KALDI_ROOT is not set) | |
endif | |
ifndef OPENLAT_ROOT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CXX = g++ | |
CC = g++ | |
CXXFLAGS = -c -fPIC -Isrc/include/ -g -O2 | |
LDFLAGS = -L/usr/local/lib/ -ldl -lfst -lfstscript | |
objs = mmap-fst.o | |
all : mmap-fst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Compile something like (assumes the Kaldi/OpenFst headers are on the include path) | |
// g++ -g kaldi-arc.cc -o lattice4-arc.so \ | |
// -shared -I/path/to/kaldi/src -DHAVE_ATLAS -fPIC | |
//Add the dir containing lattice4-arc.so to the LD_LIBRARY_PATH | |
#include <fst/const-fst.h> | |
#include <fst/edit-fst.h> | |
#include <fst/vector-fst.h> | |
#include <fst/script/register.h> | |
#include <fst/script/fstscript.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_sgmm2-gselect() | |
{ | |
local cur prev opts filters len pprev | |
COMPREPLY=() | |
cur="${COMP_WORDS[COMP_CWORD]}" | |
prev="${COMP_WORDS[COMP_CWORD-1]}" | |
if (( $COMP_CWORD > 2)) ; then | |
pprev="${COMP_WORDS[COMP_CWORD-2]}" | |
else | |
pprev="NULL" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, software | |
// distributed under the License is distributed on an "AS IS" BASIS, | |
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
// See the License for the specific language governing permissions and |
NewerOlder