-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-model-en
26 lines (22 loc) · 1.47 KB
/
Dockerfile-model-en
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# this image based on image with compiled kaldi: it uses online2-wav-nnet2-latgen-faster to perform decoding (see decode.sh)
FROM achernetsov/kaldi
# STAGE 2. DECODING
# will be using ready acoustic model to perform online decoding (online ~ live, like decoding microphone speech in real time)
# kaldi/src/online2bin/online2-wav-nnet3-online-feature-pipeline will emulate real time audio stream from wav audio file.
# (instruction: http://kaldi-asr.org/doc/online_decoding.html, Example for using already-built online-nnet2 models)
# full instruction on how to create model: kaldi/egs/fisher_english/s5
# donwloading existing english acoustic model in /model-en folder
RUN mkdir /model-en && cd /model-en \
&& wget http://kaldi-asr.org/downloads/build/5/trunk/egs/fisher_english/s5/exp/nnet2_online/nnet_a_gpu_online/archive.tar.gz -O nnet_a_gpu_online.tar.gz \
&& wget http://kaldi-asr.org/downloads/build/2/sandbox/online/egs/fisher_english/s5/exp/tri5a/graph/archive.tar.gz -O graph.tar.gz \
&& mkdir -p nnet_a_gpu_online graph \
&& tar zxvf nnet_a_gpu_online.tar.gz -C nnet_a_gpu_online \
&& tar zxvf graph.tar.gz -C graph \
&& for x in nnet_a_gpu_online/conf/*conf; do cp $x $x.orig \
&& sed s:/export/a09/dpovey/kaldi-clean/egs/fisher_english/s5/exp/nnet2_online/:$(pwd)/: < $x.orig > $x; done \
&& rm /model-en/*.tar.gz
# use decode.sh as image default command, which contain decoding code
# see
COPY decode.sh .
RUN chmod u+x decode.sh
CMD ["/decode.sh"]