Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
197 commits
Select commit Hold shift + click to select a range
75dcf22
replicating mini_librispeech/s5 to mini_librispeech/s5b
Jun 7, 2019
d3087a8
adding run_tdnn_2a.sh, data_pre_common.sh and get_model_context.sh to…
Jun 7, 2019
54a3097
egs/mini_librispeech/s5b: removing num-clusters options while callin…
Jun 7, 2019
b747ba9
adding many new source files from PR:
Jun 7, 2019
64c6cc5
train2.sh: chaning chaina references to chain
Jun 7, 2019
170eee3
egs/wsj5/steps/nnet3/chain/get_model_context.sh: removed bottom nnet …
Jun 27, 2019
5b90e80
steps/nnet3/chain/get_raw_egs.sh: removed long-key option to nnet3-ch…
Jun 27, 2019
32de786
steps/nnet3/chain/get_raw_egs.sh: added cmvn and online_ivector_dir o…
Jun 27, 2019
0e32c4f
egs/wsj5/steps/nnet3/chain/get_raw_egs.sh: working version with minil…
Jun 27, 2019
7d27b06
modifications to process_egs.sh
Jul 4, 2019
fe24b3a
in egs/mini_librespeech
Jul 5, 2019
8ebe81a
steps/nnet3/chain/train2.sh: working version of the new chain model t…
Jul 5, 2019
1f9ceb4
egs/wsj/s5/steps/nnet3/chain/compute_preconditioning_matrix.sh: compu…
Jul 6, 2019
b6717cf
steps/libs/nnet3/train/dropout_schedule.py: compute dropout schedule …
Jul 6, 2019
71c7f14
steps/nnet3/chain/get_raw_egs.sh: added optoins for cmvn, online-ivec…
Jul 6, 2019
2831152
steps/nnet3/chain/internal/choose_egs_to_merge.py: now an executable
Jul 6, 2019
70929d8
steps/nnet3/chain/internal/get_train_schedule.py: now an executable
Jul 6, 2019
1a9c3a5
steps/nnet3/chain/process_egs.sh: an intermediate version with lots o…
Jul 6, 2019
10d83ab
steps/nnet3/chain/process_egs.sh: changed chaina references to chain
Jul 6, 2019
6f60a35
steps/nnet3/chain/validate_processed_egs.sh: chaina references change…
Jul 9, 2019
4967bfe
steps/nnet3/chain/validate_randomized_egs.sh: changed chaina referenc…
Jul 9, 2019
fe0594d
steps/nnet3/chain/validate_raw_egs.sh: changed chaina references to c…
Jul 9, 2019
9120a8b
steps/nnet3/chain/get_raw_egs.sh: working version of get_raw_egs. num…
Jul 12, 2019
1dc4813
steps/nnet3/chain/process_egs.sh: working version of process_egs.sh
Jul 12, 2019
775ceb3
steps/nnet3/chain/randomize_egs.sh: working version of randomize_egs
Jul 12, 2019
cc20a23
Idiap related changes to files in egs/mini_librispeech/s5b:
Jul 26, 2019
7245da0
again, Idiap related changes in egs/wsj/s5/steps/nnet3/chain/train.py…
Jul 26, 2019
291fdb4
minilibrespeech recipe: changes to run.sh and decode.sh.
Jul 26, 2019
715f99b
the commit to updated code in src/nnet3
Jul 26, 2019
83b4779
nnet3-chain-get-egs.cc: handles long keys
Jul 26, 2019
a14bf6f
egs/minilibrespeech/s5b/local/chain/tuning/run_tdnn_2c.sh : the worki…
Jul 26, 2019
0919d19
adding RESULTS file to egs/mini_librispeech/s5b
Jul 26, 2019
4499e35
adding swbd/s5c/local/chain/tuning/run_tdnn_8k.sh to test it with new…
Jul 26, 2019
9528a16
egs/swbd/s5c/local/chain/tuning/run_tdnn_8k.sh: updated tdnn script t…
Jul 27, 2019
8e45541
commiting the version of run_tdnn_8k.sh that finish training finally!
Jul 28, 2019
d7f4d20
removed train.py from run_tdnn_8k.sh
Jul 28, 2019
37c15fa
modifying egs/wsj/s5/steps/nnet3/chain/train2.sh to include lrate. I
Jul 29, 2019
1f6ca59
running v3 of egs/swbd/s5c/local/chain/tuning/run_tdnn_8k.sh which uses
Jul 29, 2019
6444406
small modification to egs/swbd/s5c/local/chain/tuning/run_tdnn_8k.sh:
Jul 29, 2019
54f9edf
fixed a stupid bug while in run_tdnn_8k.sh while checking if common_e…
Jul 29, 2019
bcfa115
fixed another bug in run_tdnn_8k.sh: wasn't really using common_egs_d…
Jul 29, 2019
7975298
starting run_tdnn_8k.sh from stage 17
Jul 29, 2019
089f45a
starting run_tdnn_8k.sh from stage 12
Jul 29, 2019
c393d62
fixed another place in run_tdnn_8k.sh that didn't use the right egs dir
Jul 29, 2019
093df6f
silly mistake in the previous commit
Jul 29, 2019
5c2af25
train2.sh: adding model_dir_in explicitly to the train command
Jul 29, 2019
53c3a8e
train2.sh: fixing --lrate to --learning-rate
Jul 29, 2019
037f7ed
removing --raw=true options to nnet3-am-copy in train2.sh
Jul 29, 2019
268fd67
train2.sh: nnet3-am-copy is creating troubles becaues nne3-chain-trai…
Jul 29, 2019
0bb5e0f
nnet-chain-training2.cc: TrainInternal call updated
Sep 4, 2019
21be678
committing soft links for swbd/s5d recipe
Sep 12, 2019
9fc1354
s5d/RESULTS added
Sep 12, 2019
df17db5
stable version of tdnn_7k and tdnn_8k committed
Sep 12, 2019
c6f8bf3
src/nnet3/nnet-chain-training2.h: removed const qualifier for chain e…
Sep 12, 2019
1ffaff2
egs/wsj/s5/steps/diagnostic/analyze_lats.sh: disabling analyze lats. …
Sep 12, 2019
12588ee
egs/wsj/s5/steps/nnet3/chain/compute_preconditioning_matrix.sh: stats…
Sep 12, 2019
22e3ac2
egs/wsj/s5/steps/nnet3/chain/internal/get_train_schedule.py: differen…
Sep 12, 2019
0ee4b8a
egs/wsj/s5/steps/nnet3/chain/randomize_egs.sh: shuffles and splits in…
Sep 12, 2019
c23fdcb
egs/wsj/s5/steps/nnet3/chain/train2.sh: updated with the following ch…
Sep 12, 2019
7d5a512
adding nnet3/nnet-chain-diagnostics2.h and chainbin/nnet3-chain-combi…
Sep 12, 2019
4b16f9d
moved code for the new training scripts from steps/nnet3/chain/ to st…
Nov 4, 2019
33e695b
added soft link to steps/nnet3/chain2 in steps/
Nov 4, 2019
baa644c
modified paths to other scripts in steps/nnet3/chain2/train2.sh
Nov 4, 2019
7347640
renamed steps/nnet3/chain2/train2.sh to steps/nnet3/chain2/train.sh
Nov 4, 2019
f44bbae
added new script to local/chain2/tuning. earlier this recipe was in s…
Nov 4, 2019
059fe8a
added softlink to best tdnn recipe for minilibrespeech with new kaldi…
Nov 4, 2019
09121c8
moved local/chain/tuning/run_tdnn_8k.sh to local/chain2/tuning/run_td…
Nov 4, 2019
2edbcb0
reverting back steps/diagnostic/analyze_alignments.sh
Nov 4, 2019
dcc00ab
reverting analyze_lats
Nov 4, 2019
2314ce7
removing steps/nnet3/chain/data_prep_common.sh. it doesn't belong in …
Nov 4, 2019
de66a54
removing s5d
Nov 4, 2019
ad35957
RESULTS for swbd added
Nov 4, 2019
6c8a1eb
minilibrespeech RESULTS integrated into s5 recipe
Nov 4, 2019
4f921aa
- added data_prep_common.sh to local/chain2
Nov 4, 2019
c67ed15
removing the configuration section in local/chain/tuning/run_tdnn_7k.sh
Nov 4, 2019
1eb5ee4
removed safe-checking graphs in local/chain/tuning/run_tdnn_7k.sh. It…
Nov 4, 2019
529af6a
setting graph_dir value (reverting the code in parts)
Nov 4, 2019
6c5f09a
one more rollback to local/chain/tuning/run_tdnn_7k.sh: removing grap…
Nov 4, 2019
09e4cb4
modifying local/chain2/tuning/run_tdnn_7k.sh to be identical to local…
Nov 4, 2019
ef56c50
reverting the following files to master (to reduce the number of file…
Nov 4, 2019
6591b46
reverting 2 more files to match master:
Nov 4, 2019
dabfdcd
removing egs/wsj/s5/steps/nnet3/chain/internal/choose_egs_to_merge.py…
Nov 4, 2019
f21d7e7
[scripts] Change make_rttm.py to read/write files with UTF-8 encoding…
entn-at Nov 7, 2019
c2a5538
[src] Removing non-compiling paranoid asserts in nnet-computation-gra…
RuABraun Nov 9, 2019
bf0ee72
[build] Fix gfortran package name for centos (#3708)
rezame Nov 9, 2019
f1dd9e2
[scripts] Change the Python diagnostic scripts to accept non-ASCII UT…
vdp Nov 11, 2019
45cae5a
[scripts] Fix some issues in #3653 in split_scp.pl (#3710)
RuABraun Nov 12, 2019
898c8da
[scripts] Fix 2 issues in nnet2->nnet3 model conversion script (#886)…
jfainberg Nov 12, 2019
f679c78
Removing changes to split_scp.pl (#3717)
danpovey Nov 14, 2019
ab36598
[scripts] Improve how combine_ali_dirs.sh gets job-specific filenames…
KimJeongSun Nov 15, 2019
d97f1d8
[src] Add --debug-level=N configure option to control assertions (#36…
iskunk Nov 16, 2019
0cc71f1
[src] Adding some more feature extraction options (needed by some use…
jtrmal Nov 21, 2019
249e2b2
[src,script,egs] Goodness of Pronunciation (GOP) (#3703)
jimbozhang Nov 21, 2019
59255ae
[src] Making ivector extractor tolerate dim mismatch due to pitch (#3…
danpovey Nov 21, 2019
eb28a6a
Revert "[src] Making ivector extractor tolerate dim mismatch due to p…
danpovey Nov 21, 2019
bbbc79b
[src] Fix NVCC compilation errors on Windows (#3741)
cloudhan Nov 28, 2019
f88c475
[build] Add CMake Build System as alternative to current Makefile-bas…
cloudhan Nov 28, 2019
1d0b267
[scripts] Modify split_data_dir.sh and split_scp.pl to use utt2dur if…
desh2608 Nov 30, 2019
915bb78
[scripts] fix slurm.pl error (#3745)
naxingyu Nov 30, 2019
666b8cb
Revert "[scripts] Modify split_data_dir.sh and split_scp.pl to use ut…
danpovey Dec 1, 2019
413c7c8
[egs] Children's speech ASR recipe for cmu_kids and cslu_kids (#3699)
Fei00Wu Dec 2, 2019
1cd7ee9
[src] Incremental determinization [cleaned up/rewrite] (#3737)
danpovey Dec 2, 2019
d77457d
[scripts] Add scripts to create combine fmllr-tranform dirs(#3752)
marvin-nj Dec 3, 2019
018d180
[src] CUDA decoder: fix invalid-lattice error that happens in corner …
hugovbraun Dec 5, 2019
be2dbf4
[egs] Add Chime 6 baseline system (#3755)
aarora8 Dec 5, 2019
daf9d6e
[scripts] Fix issue in copy_lat_dir.sh affecting combine_lat_dirs.sh …
marvin-nj Dec 5, 2019
07d02da
[src] Add missing #include, needed for CUDA decoder compilation on so…
luitjens Dec 6, 2019
6f329a6
[scripts] fix bug in steps/data/reverberate_data_dir.py (#3762)
HuangZiliAndy Dec 8, 2019
ab29ad7
replicating mini_librispeech/s5 to mini_librispeech/s5b
Jun 7, 2019
be482fa
adding run_tdnn_2a.sh, data_pre_common.sh and get_model_context.sh to…
Jun 7, 2019
6aee94b
egs/mini_librispeech/s5b: removing num-clusters options while callin…
Jun 7, 2019
31fc25e
adding many new source files from PR:
Jun 7, 2019
4e6e99a
train2.sh: chaning chaina references to chain
Jun 7, 2019
05a5049
egs/wsj5/steps/nnet3/chain/get_model_context.sh: removed bottom nnet …
Jun 27, 2019
1fbd474
steps/nnet3/chain/get_raw_egs.sh: removed long-key option to nnet3-ch…
Jun 27, 2019
29f2fd2
steps/nnet3/chain/get_raw_egs.sh: added cmvn and online_ivector_dir o…
Jun 27, 2019
11741f1
egs/wsj5/steps/nnet3/chain/get_raw_egs.sh: working version with minil…
Jun 27, 2019
2daa973
modifications to process_egs.sh
Jul 4, 2019
a178889
in egs/mini_librespeech
Jul 5, 2019
63cc858
steps/nnet3/chain/train2.sh: working version of the new chain model t…
Jul 5, 2019
3cc6586
egs/wsj/s5/steps/nnet3/chain/compute_preconditioning_matrix.sh: compu…
Jul 6, 2019
7effd0c
steps/libs/nnet3/train/dropout_schedule.py: compute dropout schedule …
Jul 6, 2019
f627692
steps/nnet3/chain/get_raw_egs.sh: added optoins for cmvn, online-ivec…
Jul 6, 2019
fd02987
steps/nnet3/chain/internal/choose_egs_to_merge.py: now an executable
Jul 6, 2019
576ded3
steps/nnet3/chain/internal/get_train_schedule.py: now an executable
Jul 6, 2019
065e4b2
steps/nnet3/chain/process_egs.sh: an intermediate version with lots o…
Jul 6, 2019
11c6aa1
steps/nnet3/chain/process_egs.sh: changed chaina references to chain
Jul 6, 2019
abc916e
steps/nnet3/chain/validate_processed_egs.sh: chaina references change…
Jul 9, 2019
c7bb4b7
steps/nnet3/chain/validate_randomized_egs.sh: changed chaina referenc…
Jul 9, 2019
9aa40e9
steps/nnet3/chain/validate_raw_egs.sh: changed chaina references to c…
Jul 9, 2019
eb9ad04
steps/nnet3/chain/get_raw_egs.sh: working version of get_raw_egs. num…
Jul 12, 2019
7468495
steps/nnet3/chain/process_egs.sh: working version of process_egs.sh
Jul 12, 2019
1202f85
steps/nnet3/chain/randomize_egs.sh: working version of randomize_egs
Jul 12, 2019
4060fa4
Idiap related changes to files in egs/mini_librispeech/s5b:
Jul 26, 2019
b228b4d
again, Idiap related changes in egs/wsj/s5/steps/nnet3/chain/train.py…
Jul 26, 2019
11f164b
minilibrespeech recipe: changes to run.sh and decode.sh.
Jul 26, 2019
c55add8
the commit to updated code in src/nnet3
Jul 26, 2019
b7f346c
nnet3-chain-get-egs.cc: handles long keys
Jul 26, 2019
72bcb79
egs/minilibrespeech/s5b/local/chain/tuning/run_tdnn_2c.sh : the worki…
Jul 26, 2019
820045d
adding RESULTS file to egs/mini_librispeech/s5b
Jul 26, 2019
abbc947
adding swbd/s5c/local/chain/tuning/run_tdnn_8k.sh to test it with new…
Jul 26, 2019
490fcf1
egs/swbd/s5c/local/chain/tuning/run_tdnn_8k.sh: updated tdnn script t…
Jul 27, 2019
6ce9779
commiting the version of run_tdnn_8k.sh that finish training finally!
Jul 28, 2019
a248716
removed train.py from run_tdnn_8k.sh
Jul 28, 2019
08e2a8d
modifying egs/wsj/s5/steps/nnet3/chain/train2.sh to include lrate. I
Jul 29, 2019
fb88c40
running v3 of egs/swbd/s5c/local/chain/tuning/run_tdnn_8k.sh which uses
Jul 29, 2019
47189a2
small modification to egs/swbd/s5c/local/chain/tuning/run_tdnn_8k.sh:
Jul 29, 2019
a4258f2
fixed a stupid bug while in run_tdnn_8k.sh while checking if common_e…
Jul 29, 2019
d178df1
fixed another bug in run_tdnn_8k.sh: wasn't really using common_egs_d…
Jul 29, 2019
e46d01f
starting run_tdnn_8k.sh from stage 17
Jul 29, 2019
039c6b7
starting run_tdnn_8k.sh from stage 12
Jul 29, 2019
70f7b12
fixed another place in run_tdnn_8k.sh that didn't use the right egs dir
Jul 29, 2019
3e9e889
silly mistake in the previous commit
Jul 29, 2019
3d66bc7
train2.sh: adding model_dir_in explicitly to the train command
Jul 29, 2019
ce8be76
train2.sh: fixing --lrate to --learning-rate
Jul 29, 2019
40cae31
removing --raw=true options to nnet3-am-copy in train2.sh
Jul 29, 2019
00200de
train2.sh: nnet3-am-copy is creating troubles becaues nne3-chain-trai…
Jul 29, 2019
c23e3a3
nnet-chain-training2.cc: TrainInternal call updated
Sep 4, 2019
70d9d6a
committing soft links for swbd/s5d recipe
Sep 12, 2019
e1b90a8
s5d/RESULTS added
Sep 12, 2019
d5691bd
stable version of tdnn_7k and tdnn_8k committed
Sep 12, 2019
a838bd7
src/nnet3/nnet-chain-training2.h: removed const qualifier for chain e…
Sep 12, 2019
229d88b
egs/wsj/s5/steps/diagnostic/analyze_lats.sh: disabling analyze lats. …
Sep 12, 2019
0c3a01a
egs/wsj/s5/steps/nnet3/chain/compute_preconditioning_matrix.sh: stats…
Sep 12, 2019
cbb04c0
egs/wsj/s5/steps/nnet3/chain/internal/get_train_schedule.py: differen…
Sep 12, 2019
bbed110
egs/wsj/s5/steps/nnet3/chain/randomize_egs.sh: shuffles and splits in…
Sep 12, 2019
57bc51e
egs/wsj/s5/steps/nnet3/chain/train2.sh: updated with the following ch…
Sep 12, 2019
d41c359
adding nnet3/nnet-chain-diagnostics2.h and chainbin/nnet3-chain-combi…
Sep 12, 2019
0bec666
moved code for the new training scripts from steps/nnet3/chain/ to st…
Nov 4, 2019
7bd205f
added soft link to steps/nnet3/chain2 in steps/
Nov 4, 2019
8f6546a
modified paths to other scripts in steps/nnet3/chain2/train2.sh
Nov 4, 2019
6095f63
renamed steps/nnet3/chain2/train2.sh to steps/nnet3/chain2/train.sh
Nov 4, 2019
29f90b9
added new script to local/chain2/tuning. earlier this recipe was in s…
Nov 4, 2019
163056a
added softlink to best tdnn recipe for minilibrespeech with new kaldi…
Nov 4, 2019
1e2c129
moved local/chain/tuning/run_tdnn_8k.sh to local/chain2/tuning/run_td…
Nov 4, 2019
0102ca8
reverting back steps/diagnostic/analyze_alignments.sh
Nov 4, 2019
9e55ef0
reverting analyze_lats
Nov 4, 2019
e54a528
removing steps/nnet3/chain/data_prep_common.sh. it doesn't belong in …
Nov 4, 2019
15690eb
removing s5d
Nov 4, 2019
4ba588a
RESULTS for swbd added
Nov 4, 2019
1ccb3db
minilibrespeech RESULTS integrated into s5 recipe
Nov 4, 2019
5ce849d
- added data_prep_common.sh to local/chain2
Nov 4, 2019
6284695
removing the configuration section in local/chain/tuning/run_tdnn_7k.sh
Nov 4, 2019
55c06f3
removed safe-checking graphs in local/chain/tuning/run_tdnn_7k.sh. It…
Nov 4, 2019
d7bf796
setting graph_dir value (reverting the code in parts)
Nov 4, 2019
c6ede69
one more rollback to local/chain/tuning/run_tdnn_7k.sh: removing grap…
Nov 4, 2019
2c2420b
modifying local/chain2/tuning/run_tdnn_7k.sh to be identical to local…
Nov 4, 2019
819a573
reverting the following files to master (to reduce the number of file…
Nov 4, 2019
ff4d364
reverting 2 more files to match master:
Nov 4, 2019
cfda607
removing egs/wsj/s5/steps/nnet3/chain/internal/choose_egs_to_merge.py…
Nov 4, 2019
5989138
added copyright headers to code modified in mini_librespeech recipe
Nov 27, 2019
bad7351
added copyright header to recipe in swbd
Nov 27, 2019
36c4883
copyright added to source code in nnet3 and chainbin
Nov 27, 2019
ad9fb10
added run_tdnn.sh for chain2 in egs/babel
Dec 4, 2019
87fe03b
maded egs/babel/s5d/local/chain2/run_tdnn.sh an executable
Dec 4, 2019
e0dbf0e
tdnn recipe for babel added
Dec 10, 2019
7961ea1
merging changes after adding copyright headers
Dec 10, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ GSYMS
/egs/*/*/plp
/egs/*/*/exp
/egs/*/*/data
/egs/*/*/wav
/egs/*/*/enhan

# /tools/
/tools/pocolm/
Expand Down Expand Up @@ -149,3 +151,8 @@ GSYMS
/tools/cub-1.8.0/
/tools/cub
/tools/python/

# These CMakeLists.txt files are all genareted on the fly at the moment.
# They are added here to avoid accidently checkin.
/src/**/CMakeLists.txt
/build*
195 changes: 195 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
cmake_minimum_required(VERSION 3.5)
project(kaldi)

set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake;${CMAKE_MODULE_PATH}")
include(GNUInstallDirs)
include(Utils)
include(third_party/get_third_party)

message(STATUS "Running gen_cmake_skeleton.py")
execute_process(COMMAND python
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/gen_cmake_skeleton.py"
"${CMAKE_CURRENT_SOURCE_DIR}/src"
"--quiet"
)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_INSTALL_MESSAGE LAZY) # hide "-- Up-to-date: ..."
if(BUILD_SHARED_LIBS)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
if(WIN32)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
message(FATAL_ERROR "DLL is not supported currently")
elseif(APPLE)
set(CMAKE_INSTALL_RPATH "@loader_path")
else()
set(CMAKE_INSTALL_RPATH "$ORIGIN;$ORIGIN/../lib")
endif()
endif()

set(MATHLIB "OpenBLAS" CACHE STRING "OpenBLAS|MKL|Accelerate")
option(KALDI_BUILD_EXE "If disabled, will make add_kaldi_executable a no-op" ON)
option(KALDI_BUILD_TEST "If disabled, will make add_kaldi_test_executable a no-op" ON)
option(KALDI_USE_PATCH_NUMBER "Use MAJOR.MINOR.PATCH format, otherwise MAJOR.MINOR" OFF)

link_libraries(${CMAKE_DL_LIBS})

find_package(Threads)
link_libraries(Threads::Threads)

if(MATHLIB STREQUAL "OpenBLAS")
set(BLA_VENDOR "OpenBLAS")
find_package(LAPACK REQUIRED)
add_definitions(-DHAVE_CLAPACK=1)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/tools/CLAPACK)
link_libraries(${BLAS_LIBRARIES} ${LAPACK_LIBRARIES})
elseif(MATHLIB STREQUAL "MKL")
set(BLA_VENDOR "Intel10_64lp")
# find_package(BLAS REQUIRED)
normalize_env_path(ENV{MKLROOT})
find_package(LAPACK REQUIRED)
add_definitions(-DHAVE_MKL=1)
include_directories($ENV{MKLROOT}/include) # TODO: maybe not use env, idk, find_package doesnt handle includes...
link_libraries(${BLAS_LIBRARIES} ${LAPACK_LIBRARIES})
elseif(MATHLIB STREQUAL "Accelerate")
set(BLA_VENDOR "Apple")
find_package(BLAS REQUIRED)
find_package(LAPACK REQUIRED)
add_definitions(-DHAVE_CLAPACK=1)
link_libraries(${BLAS_LIBRARIES} ${LAPACK_LIBRARIES})
else()
message(FATAL_ERROR "${MATHLIB} is not tested and supported, you are on your own now.")
endif()

if(MSVC)
# Added in source, but we actually should do it in build script, whatever...
# add_definitions(-DWIN32_LEAN_AND_MEAN=1)

add_compile_options(/permissive- /FS /wd4819 /EHsc /bigobj)

# some warnings related with fst
add_compile_options(/wd4018 /wd4244 /wd4267 /wd4291 /wd4305)

set(CUDA_USE_STATIC_CUDA_RUNTIME OFF CACHE INTERNAL "")
if(NOT DEFINED ENV{CUDAHOSTCXX})
set(ENV{CUDAHOSTCXX} ${CMAKE_CXX_COMPILER})
endif()
if(NOT DEFINED CUDA_HOST_COMPILER)
set(CUDA_HOST_COMPILER ${CMAKE_CXX_COMPILER})
endif()
endif()

find_package(CUDA)
if(CUDA_FOUND)
set(CUB_ROOT_DIR "${PROJECT_SOURCE_DIR}/tools/cub")

set(CUDA_PROPAGATE_HOST_FLAGS ON)
set(KALDI_CUDA_NVCC_FLAGS "--default-stream=per-thread;-std=c++${CMAKE_CXX_STANDARD}")
if(MSVC)
list(APPEND KALDI_CUDA_NVCC_FLAGS "-Xcompiler /permissive-,/FS,/wd4819,/EHsc,/bigobj")
list(APPEND KALDI_CUDA_NVCC_FLAGS "-Xcompiler /wd4018,/wd4244,/wd4267,/wd4291,/wd4305")
if(BUILD_SHARED_LIBS)
list(APPEND CUDA_NVCC_FLAGS_RELEASE -Xcompiler /MD)
list(APPEND CUDA_NVCC_FLAGS_DEBUG -Xcompiler /MDd)
endif()
else()
# list(APPEND KALDI_CUDA_NVCC_FLAGS "-Xcompiler -std=c++${CMAKE_CXX_STANDARD}")
list(APPEND KALDI_CUDA_NVCC_FLAGS "-Xcompiler -fPIC")
endif()
set(CUDA_NVCC_FLAGS ${KALDI_CUDA_NVCC_FLAGS} ${CUDA_NVCC_FLAGS})

add_definitions(-DHAVE_CUDA=1)
add_definitions(-DCUDA_API_PER_THREAD_DEFAULT_STREAM=1)
include_directories(${CUDA_INCLUDE_DIRS})
link_libraries(
${CUDA_LIBRARIES}
${CUDA_CUDA_LIBRARY}
${CUDA_CUBLAS_LIBRARIES}
${CUDA_CUFFT_LIBRARIES}
${CUDA_curand_LIBRARY}
${CUDA_cusolver_LIBRARY}
${CUDA_cusparse_LIBRARY})

find_package(NvToolExt REQUIRED)
include_directories(${NvToolExt_INCLUDE_DIR})
link_libraries(${NvToolExt_LIBRARIES})

find_package(CUB REQUIRED)
include_directories(${CUB_INCLUDE_DIR})
endif()

add_definitions(-DKALDI_NO_PORTAUDIO=1)

include(VersionHelper)
get_version() # this will set KALDI_VERSION and KALDI_PATCH_NUMBER
if(${KALDI_USE_PATCH_NUMBER})
set(KALDI_VERSION "${KALDI_VERSION}.${KALDI_PATCH_NUMBER}")
endif()

get_third_party(openfst)
set(OPENFST_ROOT_DIR ${CMAKE_CURRENT_BINARY_DIR}/openfst)
include(third_party/openfst_lib_target)
link_libraries(fst)

# add all native libraries
add_subdirectory(src/base) # NOTE, we need to patch the target with version from outside
set_property(TARGET kaldi-base PROPERTY COMPILE_DEFINITIONS "KALDI_VERSION=\"${KALDI_VERSION}\"")
add_subdirectory(src/matrix)
add_subdirectory(src/cudamatrix)
add_subdirectory(src/util)
add_subdirectory(src/feat)
add_subdirectory(src/tree)
add_subdirectory(src/gmm)
add_subdirectory(src/transform)
add_subdirectory(src/sgmm2)
add_subdirectory(src/fstext)
add_subdirectory(src/hmm)
add_subdirectory(src/lm)
add_subdirectory(src/decoder)
add_subdirectory(src/lat)
add_subdirectory(src/nnet)
add_subdirectory(src/nnet2)
add_subdirectory(src/nnet3)
add_subdirectory(src/rnnlm)
add_subdirectory(src/chain)
add_subdirectory(src/ivector)
add_subdirectory(src/online)
add_subdirectory(src/online2)
add_subdirectory(src/kws)

add_subdirectory(src/itf)

# add all cuda libraries
if(CUDA_FOUND)
add_subdirectory(src/cudafeat)
add_subdirectory(src/cudadecoder)
endif()

# add all native executables
add_subdirectory(src/gmmbin)
add_subdirectory(src/featbin)
add_subdirectory(src/onlinebin)

# add all cuda executables
if(CUDA_FOUND)
add_subdirectory(src/cudafeatbin)
add_subdirectory(src/cudadecoderbin)
endif()

include(CMakePackageConfigHelpers)
# maybe we should put this into subfolder?
configure_package_config_file(
${CMAKE_CURRENT_SOURCE_DIR}/cmake/kaldi-config.cmake.in
${CMAKE_BINARY_DIR}/cmake/kaldi-config.cmake
INSTALL_DESTINATION lib/cmake/kaldi
)
write_basic_package_version_file(
${CMAKE_BINARY_DIR}/cmake/kaldi-config-version.cmake
VERSION ${KALDI_VERSION}
COMPATIBILITY AnyNewerVersion
)
install(FILES ${CMAKE_BINARY_DIR}/cmake/kaldi-config.cmake ${CMAKE_BINARY_DIR}/cmake/kaldi-config-version.cmake
DESTINATION lib/cmake/kaldi
)
install(EXPORT kaldi-targets DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake/kaldi)
17 changes: 12 additions & 5 deletions INSTALL
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
This is the official Kaldi INSTALL. Look also at INSTALL.md for the git mirror installation.
[for native Windows install, see windows/INSTALL]
[Option 1 in the following does not apply to native Windows install, see windows/INSTALL or following Option 2]

(1)
go to tools/ and follow INSTALL instructions there.
Option 1 (bash + makefile):

(2)
go to src/ and follow INSTALL instructions there.
Steps:
(1)
go to tools/ and follow INSTALL instructions there.

(2)
go to src/ and follow INSTALL instructions there.

Option 2 (cmake):

Go to cmake/ and follow INSTALL.md instructions there.
Note, it may not be well tested and some features are missing currently.
Loading