forked from hipstas/kaldi-pop-up-archive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
37 lines (30 loc) · 1.09 KB
/
setup.sh
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
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
#cd /audio_in/
## Now add media files to /audio_in/
## The following block of code was removed because it was too processor intensive to do this work in docker. It's not done with prep_files.py locally`
#for file in *.{wav,mp3,mp4,WAV,MP3,MP4}; do
#if [ ${file: -4} == ".mp3" ]; then
#base=$(basename """$file""" .mp3);
#fi
#if [ ${file: -4} == ".MP3" ]; then
#base=$(basename """$file""" .MP3);
#fi
#if [ ${file: -4} == ".mp4" ]; then
#base=$(basename """$file""" .MP4);
#fi
#if [ ${file: -4} == ".MP4" ]; then
#base=$(basename """$file""" .MP4);
#fi
#if [ ${file: -4} == ".wav" ]; then
#base=$(basename """$file""" .wav);
#fi
#if [ ${file: -4} == ".WAV" ]; then
#base=$(basename """$file""" .WAV);
#fi
#ffmpeg -i """$file""" -ac 1 -ar 16000 """$base"""_16kHz.wav;
#done
#mkdir /audio_in_16khz/
#mv *_16kHz.wav /audio_in_16khz/
######### Starting the batch transcription run ##########
python /kaldi/egs/american-archive-kaldi/run_kaldi.py /kaldi/egs/american-archive-kaldi/sample_experiment/ /audio_in/ && \
rsync -a /kaldi/egs/american-archive-kaldi/sample_experiment/output/ /audio_in/transcripts/