Skip to content

Commit 3675219

Browse files
authored
Merge branch 'master' into patch-1
2 parents 8c3c0bc + 21ae411 commit 3675219

File tree

122 files changed

+2835
-349
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+2835
-349
lines changed

cmake/gen_cmake_skeleton.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ def gen_code(self):
269269

270270
if len(self.depends) > 0:
271271
ret.append("target_link_libraries(" + self.target_name + " PUBLIC")
272-
for d in self.depends:
272+
for d in self.depends + ['-lcblas', '-llapack']:
273273
ret.append(" " + d)
274274
ret.append(")\n")
275275

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
FROM nvidia/cuda:12.2.0-devel-ubuntu22.04
2+
LABEL maintainer="[email protected]"
3+
4+
RUN apt-get update && \
5+
apt-get install -y --no-install-recommends \
6+
build-essential \
7+
g++ \
8+
make \
9+
automake \
10+
bzip2 \
11+
unzip \
12+
wget \
13+
sox \
14+
libtool \
15+
git \
16+
subversion \
17+
python2.7 \
18+
python3 \
19+
zlib1g-dev \
20+
ca-certificates \
21+
gfortran \
22+
patch \
23+
ffmpeg \
24+
vim && \
25+
apt-get update && \
26+
apt-get install -y --no-install-recommends\
27+
software-properties-common && \
28+
apt-add-repository multiverse && \
29+
apt-get update && \
30+
yes | DEBIAN_FRONTEND=noninteractive apt-get install -yqq --no-install-recommends\
31+
intel-mkl && \
32+
rm -rf /var/lib/apt/lists/*
33+
34+
RUN ln -s /usr/bin/python2.7 /usr/bin/python
35+
36+
RUN git clone --depth 1 https://github.com/kaldi-asr/kaldi.git /opt/kaldi && \
37+
cd /opt/kaldi/tools && \
38+
make -j $(nproc) && \
39+
cd /opt/kaldi/src && \
40+
./configure --shared --use-cuda && \
41+
make depend -j $(nproc) && \
42+
make -j $(nproc) && \
43+
find /opt/kaldi -type f \( -name "*.o" -o -name "*.la" -o -name "*.a" \) -exec rm {} \; && \
44+
rm -rf /opt/kaldi/.git
45+
46+
WORKDIR /opt/kaldi/

egs/ami/s5/run_ihm.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ set -euxo pipefail
1717
# Path where AMI gets downloaded (or where locally available):
1818
AMI_DIR=$PWD/wav_db # Default,
1919
case $(hostname -d) in
20-
fit.vutbr.cz) AMI_DIR=/mnt/matylda5/iveselyk/KALDI_AMI_WAV ;; # BUT,
20+
fit.vutbr.cz) AMI_DIR=/mnt/matylda2/data/AMI_KALDI_DOWNLOAD ;; # BUT,
2121
clsp.jhu.edu) AMI_DIR=/export/corpora4/ami/amicorpus ;; # JHU,
2222
cstr.ed.ac.uk) AMI_DIR= ;; # Edinburgh,
2323
esac

egs/ami/s5/run_mdm.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ mic=mdm$nmics
1010
# Path where AMI gets downloaded (or where locally available):
1111
AMI_DIR=$PWD/wav_db # Default,
1212
case $(hostname -d) in
13-
fit.vutbr.cz) AMI_DIR=/mnt/matylda5/iveselyk/KALDI_AMI_WAV ;; # BUT,
13+
fit.vutbr.cz) AMI_DIR=/mnt/matylda2/data/AMI_KALDI_DOWNLOAD ;; # BUT,
1414
clsp.jhu.edu) AMI_DIR=/export/corpora4/ami/amicorpus ;; # JHU,
1515
cstr.ed.ac.uk) AMI_DIR= ;; # Edinburgh,
1616
esac

egs/ami/s5/run_sdm.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ set -euxo pipefail
1717
# Path where AMI gets downloaded (or where locally available):
1818
AMI_DIR=$PWD/wav_db # Default,
1919
case $(hostname -d) in
20-
fit.vutbr.cz) AMI_DIR=/mnt/matylda5/iveselyk/KALDI_AMI_WAV ;; # BUT,
20+
fit.vutbr.cz) AMI_DIR=/mnt/matylda2/data/AMI_KALDI_DOWNLOAD ;; # BUT,
2121
clsp.jhu.edu) AMI_DIR=/export/corpora4/ami/amicorpus ;; # JHU,
2222
cstr.ed.ac.uk) AMI_DIR= ;; # Edinburgh,
2323
esac

egs/ami/s5b/cmd.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export decode_cmd="queue.pl --mem 2G"
1515
# the use of cuda_cmd is deprecated, used only in 'nnet1',
1616
export cuda_cmd="queue.pl --gpu 1 --mem 20G"
1717

18-
if [[ "$(hostname -f)" == "*.fit.vutbr.cz" ]]; then
18+
if [[ "$(hostname -d)" == "fit.vutbr.cz" ]]; then
1919
queue_conf=$HOME/queue_conf/default.conf # see example /homes/kazi/iveselyk/queue_conf/default.conf,
2020
export train_cmd="queue.pl --config $queue_conf --mem 2G --matylda 0.2"
2121
export decode_cmd="queue.pl --config $queue_conf --mem 3G --matylda 0.1"
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#BeamformIt sample configuration file for AMI data (http://groups.inf.ed.ac.uk/ami/download/)
2+
3+
# scrolling size to compute the delays
4+
scroll_size = 250
5+
6+
# cross correlation computation window size
7+
window_size = 500
8+
9+
#amount of maximum points for the xcorrelation taken into account
10+
nbest_amount = 4
11+
12+
#flag wether to apply an automatic noise thresholding
13+
do_noise_threshold = 1
14+
15+
#Percentage of frames with lower xcorr taken as noisy
16+
noise_percent = 10
17+
18+
######## acoustic modelling parameters
19+
20+
#transition probabilities weight for multichannel decoding
21+
trans_weight_multi = 25
22+
trans_weight_nbest = 25
23+
24+
###
25+
26+
#flag wether to print the feaures after setting them, or not
27+
print_features = 1
28+
29+
#flag wether to use the bad frames in the sum process
30+
do_avoid_bad_frames = 1
31+
32+
#flag to use the best channel (SNR) as a reference
33+
#defined from command line
34+
do_compute_reference = 1
35+
36+
#flag wether to use a uem file or not(process all the file)
37+
do_use_uem_file = 0
38+
39+
#flag wether to use an adaptative weights scheme or fixed weights
40+
do_adapt_weights = 1
41+
42+
#flag wether to output the sph files or just run the system to create the auxiliary files
43+
do_write_sph_files = 1
44+
45+
####directories where to store/retrieve info####
46+
#channels_file = ./cfg-files/channels
47+
48+
#show needs to be passed as argument normally, here a default one is given just in case
49+
#show_id = Ttmp
50+

egs/ami/s5b/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ set -euo pipefail
2828
# Path where AMI gets downloaded (or where locally available):
2929
AMI_DIR=$PWD/wav_db # Default,
3030
case $(hostname -d) in
31-
fit.vutbr.cz) AMI_DIR=/mnt/matylda5/iveselyk/KALDI_AMI_WAV ;; # BUT,
31+
fit.vutbr.cz) AMI_DIR=/mnt/matylda2/data/AMI_KALDI_DOWNLOAD ;; # BUT,
3232
clsp.jhu.edu) AMI_DIR=/export/corpora4/ami/amicorpus ;; # JHU,
3333
cstr.ed.ac.uk) AMI_DIR= ;; # Edinburgh,
3434
esac

egs/ami/s5c/run.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Apache 2.0.
44
#
55
# This recipe performs diarization for the mix-headset data in the
6-
# AMI dataset. The x-vector extractor we use is trained on VoxCeleb v2
6+
# AMI dataset. The x-vector extractor we use is trained on VoxCeleb v2
77
# corpus with simulated RIRs. We use oracle SAD in this recipe.
88
# This recipe demonstrates the following:
99
# 1. Diarization using x-vector and clustering (AHC, VBx, spectral)
@@ -38,7 +38,7 @@ diarizer_type=spectral # must be one of (ahc, spectral, vbx)
3838
# Path where AMI gets downloaded (or where locally available):
3939
AMI_DIR=$PWD/wav_db # Default,
4040
case $(hostname -d) in
41-
fit.vutbr.cz) AMI_DIR=/mnt/matylda5/iveselyk/KALDI_AMI_WAV ;; # BUT,
41+
fit.vutbr.cz) AMI_DIR=/mnt/matylda2/data/AMI_KALDI_DOWNLOAD ;; # BUT,
4242
clsp.jhu.edu) AMI_DIR=/export/corpora5/amicorpus ;; # JHU,
4343
cstr.ed.ac.uk) AMI_DIR= ;; # Edinburgh,
4444
esac
@@ -57,7 +57,7 @@ if [ $stage -le 1 ]; then
5757
local/ami_download.sh $mic $AMI_DIR
5858
fi
5959

60-
# Prepare data directories.
60+
# Prepare data directories.
6161
if [ $stage -le 2 ]; then
6262
# Download the data split and references from BUT's AMI setup
6363
if ! [ -d AMI-diarization-setup ]; then
@@ -120,7 +120,7 @@ if [ $stage -le 6 ]; then
120120
transform-vec $model_dir/xvectors_plda_train/transform.mat ark:- ark:- |\
121121
ivector-normalize-length ark:- ark:- |" \
122122
$model_dir/xvectors_plda_train/plda || exit 1;
123-
123+
124124
cp $model_dir/xvectors_plda_train/plda $model_dir/
125125
cp $model_dir/xvectors_plda_train/transform.mat $model_dir/
126126
cp $model_dir/xvectors_plda_train/mean.vec $model_dir/

egs/gop_speechocean762/s5/local/visualize_feats.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import random
99
import kaldi_io
1010
import seaborn as sns
11+
import numpy as np
1112
from collections import Counter
1213
from sklearn.manifold import TSNE
1314
from utils import load_human_scores, load_phone_symbol_table
@@ -62,6 +63,9 @@ def main():
6263
min(args.samples, len(lables)))
6364
features, lables = list(zip(*sampled_paris))
6465

66+
# Convert the tuple of arrays to a single 2D array
67+
features = np.vstack(features)
68+
6569
# Draw scatters
6670
label_counter = Counter(lables)
6771
colors = sns.color_palette("colorblind", len(label_counter))

0 commit comments

Comments
 (0)