Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
19 changes: 15 additions & 4 deletions egs/wsj/s5/utils/data/get_uniform_subsegments.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,22 @@
def get_args():
parser = argparse.ArgumentParser(
description=textwrap.dedent("""
Creates a subsegments file from an input segments file
that has the format
Creates a subsegments file from an input segments file.

The output format is

<subsegment-id> <utterance-id> <start-time> <end-time>,
where the timing are relative to the start-time of the
<utterance-id> in the input segments file.

where the timings are relative to the start-time of the
<utterance-id> in the input segments file.
Reminder: the format of the input segments file is:

<utterance-id> <recording-id> <start-time> <end-time>

where the recording-id corresponds to a wav file (or a channel of
a wav file) from wav.scp. Note: you can use
utils/data/get_segments_for_data.sh to generate a 'default'
segments file for your data if one doesn't already exist.

e.g.: get_uniform_subsegments.py data/dev/segments > \\
data/dev_uniform_segments/sub_segments
Expand Down
5 changes: 3 additions & 2 deletions src/nnet3bin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ BINFILES = nnet3-init nnet3-info nnet3-get-egs nnet3-copy-egs nnet3-subset-egs \
nnet3-discriminative-subset-egs nnet3-get-egs-simple \
nnet3-discriminative-compute-from-egs nnet3-latgen-faster-looped \
nnet3-egs-augment-image nnet3-xvector-get-egs nnet3-xvector-compute \
nnet3-latgen-grammar nnet3-compute-batch nnet3-latgen-faster-batch
nnet3-latgen-grammar nnet3-compute-batch nnet3-latgen-faster-batch \
cuda-gpu-available

OBJFILES =

Expand All @@ -33,6 +34,6 @@ ADDLIBS = ../nnet3/kaldi-nnet3.a ../chain/kaldi-chain.a \
../lat/kaldi-lat.a ../fstext/kaldi-fstext.a ../hmm/kaldi-hmm.a \
../transform/kaldi-transform.a ../gmm/kaldi-gmm.a \
../tree/kaldi-tree.a ../util/kaldi-util.a ../matrix/kaldi-matrix.a \
../base/kaldi-base.a
../base/kaldi-base.a

include ../makefiles/default_rules.mk
File renamed without changes.
8 changes: 6 additions & 2 deletions src/nnetbin/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@

# cuda-gpu-available was moved to nnet3bin/; remove it in case an outdated
# version persists.
all:
-rm -f cuda-gpu-available

EXTRA_CXXFLAGS = -Wno-sign-compare
include ../kaldi.mk

Expand All @@ -15,7 +19,7 @@ BINFILES = nnet-train-frmshuff \
nnet-forward nnet-copy nnet-info nnet-concat \
transf-to-nnet cmvn-to-nnet nnet-initialize \
feat-to-post paste-post train-transitions \
cuda-gpu-available nnet-set-learnrate
nnet-set-learnrate

OBJFILES =

Expand All @@ -25,6 +29,6 @@ TESTFILES =

ADDLIBS = ../nnet/kaldi-nnet.a ../cudamatrix/kaldi-cudamatrix.a \
../lat/kaldi-lat.a ../hmm/kaldi-hmm.a ../tree/kaldi-tree.a \
../util/kaldi-util.a ../matrix/kaldi-matrix.a ../base/kaldi-base.a
../util/kaldi-util.a ../matrix/kaldi-matrix.a ../base/kaldi-base.a

include ../makefiles/default_rules.mk
12 changes: 4 additions & 8 deletions tools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,9 @@ cub:
rm -f cub
ln -s cub-$(CUB_VERSION) cub

# OpenBLAS is not compiled by default. Run 'make -j openblas' in this directory to build.
# OpenBLAS is not compiled by default; you can run `make openblas` to build it,
# but you should probably just call extras/install_openblas.sh; this is
# here for legacy reasons.
.PHONY: openblas
openblas:
@-rm -rf OpenBLAS xianyi-OpenBLAS-*
wget -t3 -nv -O- $$( \
wget -qO- 'https://api.github.com/repos/xianyi/OpenBLAS/releases/tags/v$(OPENBLAS_VERSION)' | \
python -c 'import sys,json;print(json.load(sys.stdin)["tarball_url"])') | \
tar xzf -
mv xianyi-OpenBLAS-* OpenBLAS
$(MAKE) PREFIX=$$(pwd)/OpenBLAS/install USE_THREAD=0 -C OpenBLAS all install
extras/install_openblas.sh
26 changes: 23 additions & 3 deletions tools/extras/install_openblas.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
#!/bin/bash

# OpenBLAS is downloaded and built by tools/Makefile, but not automatically by
# its default 'all' target.
make -j openblas

OPENBLAS_VERSION=0.3.5

set -e

if ! command -v gfortran 2>/dev/null; then
echo "$0: gfortran is not installed. Please install it, e.g. by:"
echo " apt-get install gfortran"
echo "(if on Debian or Ubuntu), or:"
echo " yum install fortran"
echo "(if on RedHat/CentOS). On a Mac, if brew is installed, it's:"
echo " brew install gfortran"
exit 1
fi


rm -rf xianyi-OpenBLAS-* OpenBLAS

wget -t3 -nv -O- $(wget -qO- "https://api.github.com/repos/xianyi/OpenBLAS/releases/tags/v${OPENBLAS_VERSION}" | python -c 'import sys,json;print(json.load(sys.stdin)["tarball_url"])') | tar xzf -

mv xianyi-OpenBLAS-* OpenBLAS

make PREFIX=$(pwd)/OpenBLAS/install USE_THREAD=0 -C OpenBLAS all install