Skip to content

Commit

Permalink
fix python path for ctm script
Browse files Browse the repository at this point in the history
  • Loading branch information
benfoley committed Oct 28, 2021
1 parent af7177c commit f92e2d4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
# Make the split dir with scp, utt2spk etc files
. $PWD/make_split.sh

echo "==== Using GMM Decode Conf ===="

# AUDIO --> FEATURE VECTORS
echo "==== Extracting Feature Vectors ===="
Expand Down Expand Up @@ -115,7 +116,7 @@ echo >> data/infer/one-best-hypothesis.txt
cat data/infer/one-best-hypothesis.txt

echo "==== Build the Elan file ===="
"${POETRY_PATH}/bin/python" /elpis/elpis/engines/common/output/ctm_to_elan.py \
python3 /elpis/elpis/engines/common/output/ctm_to_elan.py \
--ctm data/infer/ctm_with_conf.ctm \
--wav data/infer/split1/1/wav.scp \
--seg data/infer/split1/1/segments \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

export PATH=$PATH:/kaldi/src/online2bin

echo "==== Using GMM Decode Online Conf ===="

# Extract feature vectors for online training
echo "==== Extracting Feature Vectors ===="
steps/make_mfcc.sh --nj 1 data/infer exp/make_mfcc/infer mfcc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ echo >> data/infer/one-best-hypothesis.txt
cat data/infer/one-best-hypothesis.txt

echo "==== Build the Elan file ===="
"${POETRY_PATH}/bin/python" /elpis/elpis/engines/common/output/ctm_to_elan.py \
python3 /elpis/elpis/engines/common/output/ctm_to_elan.py \
--ctm data/infer/ctm_with_conf.ctm \
--wav data/infer/split1/1/wav.scp \
--seg data/infer/split1/1/segments \
Expand Down
4 changes: 3 additions & 1 deletion elpis/engines/kaldi/objects/transcription.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,10 @@ def transcribe(self, on_complete: Callable = None):
exp_path.mkdir(parents=True, exist_ok=True)

print("========= reset templates dir")
# TODO use gmm-decode for short audio and gmm-decode-online for long audio (gmm-decode is quicker)
# Use gmm-decode for short audio and gmm-decode-online for long audio (gmm-decode is quicker for short audio)
# Stage names (rh side) are used in the GUI for i18n
if (self.audio_duration > 10):
print("==== Using gmm-decode-online-conf")
template_dir_path = 'gmm-decode-online-conf'
stage_names = {
"0_feature_vec.sh": "featureExtraction",
Expand All @@ -114,6 +115,7 @@ def transcribe(self, on_complete: Callable = None):
"4_ctm_output.sh": "ctmOutput"
}
else:
print("==== Using gmm-decode-conf")
template_dir_path = 'gmm-decode-conf'
stage_names = {
"gmm-decode-conf.sh": "transcribing"
Expand Down

0 comments on commit f92e2d4

Please sign in to comment.