Skip to content
Open
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
41 changes: 41 additions & 0 deletions asr_egs/thchs30/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
The recipe is used for Chinese ASR with thchs30 corpus
===
## 1 Function:
1)It can be used for Chinses ASR

2)You can use your own Chinese corpus to study ASR


## 2 Algorithm:BiLSTM+CTC+WFST

1)BiLSTM: 3 layers+ 1 projection layer,320 hidden units

2)CTC: 216 Chinese Sound finals labels + one blank label

3)WFST: CTC token fst(T.fst), lexicon fst(L.fst), language model fst(G.fst)


## 3 Details:

1) Data preparation:

languange model is in data/language_model

lexicon.txt is in data/dict

Train data is in corpus/train. The format is wav+text

Test data is in corpus/test. The format is wav+text

Dev data is in corpus/dev. The format is wav+text

2) How to run: ./run.sh

make_TLG_WFST.sh: it is used for generating TLG.fst .The related directory is data/{train,test,dev,lang,search_Graph}.

feature.sh: it is used for generating wav features. The files related wav features arein data/{train,test,dev} ,fbank

train.sh: Training acoustic model

decode.sh: Decoding with acoustic model and TLG.fst

18 changes: 18 additions & 0 deletions asr_egs/thchs30/cmd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# "queue.pl" uses qsub. The options to it are
# options to qsub. If you have GridEngine installed,
# change this to a queue you have access to.
# Otherwise, use "run.pl", which will run jobs locally
# (make sure your --num-jobs options are no more than
# the number of cpus on your machine.

#a) JHU cluster options
#export train_cmd="queue.pl -l arch=*64"
#export decode_cmd="queue.pl -l arch=*64,mem_free=2G,ram_free=2G"
#export mkgraph_cmd="queue.pl -l arch=*64,ram_free=4G,mem_free=4G"
#export big_memory_cmd="queue.pl -l arch=*64,ram_free=8G,mem_free=8G"
#export cuda_cmd="queue.pl -l gpu=1"

#c) run it locally... works for CMU rocks cluster
export train_cmd=run.pl
export decode_cmd=run.pl
export cuda_cmd=run.pl
2 changes: 2 additions & 0 deletions asr_egs/thchs30/conf/fbank.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--num-mel-bins=40
--sample-frequency=16000
2 changes: 2 additions & 0 deletions asr_egs/thchs30/conf/mfcc.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--use-energy=false # only non-default option.
--sample-frequency=8000 # Switchboard is sampled at 8kHz
Binary file added asr_egs/thchs30/corpus/dev/A4_58.wav
Binary file not shown.
1 change: 1 addition & 0 deletions asr_egs/thchs30/corpus/dev/A4_58.wav.trn
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
../data/A4_58.wav.trn
Binary file added asr_egs/thchs30/corpus/test/A4_57.wav
Binary file not shown.
3 changes: 3 additions & 0 deletions asr_egs/thchs30/corpus/test/A4_57.wav.trn
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
男宾 一个 澡 十五 元 女宾 十 元 除了 池 淋 盆浴 以外 同样 可 享用 桑拿浴 蒸汽浴
nan2 bin1 yi2 ge4 zao3 shi2 wu3 yuan2 nv3 bin1 shi2 yuan2 chu2 le5 chi2 lin2 pen2 yu4 yi3 wai4 tong2 yang4 ke3 xiang3 yong4 sang1 na2 yu4 zheng1 qi4 yu4
n an2 b in1 ii i2 g e4 z ao3 sh ix2 uu u3 vv van2 n v3 b in1 sh ix2 vv van2 ch u2 l e5 ch ix2 l in2 p en2 vv v4 ii i3 uu uai4 t ong2 ii iang4 k e3 x iang3 ii iong4 s ang1 n a2 vv v4 zh eng1 q i4 vv v4
3 changes: 3 additions & 0 deletions asr_egs/thchs30/corpus/test/A4_58.wav.trn
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
特 别是 跨 省区 电网 超 计划 用电 不仅 损害 自己 也 损害 别人 损害 电网 损害 国家
te4 bie2 shi4 kua4 sheng3 qu1 dian4 wang3 chao1 ji4 hua4 yong4 dian4 bu4 jin3 sun3 hai4 zi4 ji3 ye3 sun3 hai4 bie2 ren2 sun3 hai4 dian4 wang3 sun3 hai4 guo2 jia1
t e4 b ie2 sh ix4 k ua4 sh eng3 q v1 d ian4 uu uang3 ch ao1 j i4 h ua4 ii iong4 d ian4 b u4 j in3 s un3 h ai4 z iy4 j i3 ii ie3 s un3 h ai4 b ie2 r en2 s un3 h ai4 d ian4 uu uang3 s un3 h ai4 g uo2 j ia1
Binary file added asr_egs/thchs30/corpus/train/A4_56.wav
Binary file not shown.
3 changes: 3 additions & 0 deletions asr_egs/thchs30/corpus/train/A4_56.wav.trn
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
据说 母亲 生下 没 一年 功夫 染 上了 一 种 怪病 不吃 不喝 乱 哭 乱 闹 急 得 外婆 满山遍野 去找 草药 来 驱鬼
ju4 shuo1 mu3 qin1 sheng1 xia4 mei2 yi4 nian2 gong1 fu5 ran3 shang4 le5 yi1 zhong3 guai4 bing4 bu4 chi1 bu4 he1 luan4 ku1 luan4 nao4 ji2 de5 wai4 po2 man3 shan1 bian4 ye3 qu4 zhao3 cao3 yao4 lai2 qu1 gui3
j v4 sh uo1 m u3 q in1 sh eng1 x ia4 m ei2 ii i4 n ian2 g ong1 f u5 r an3 sh ang4 l e5 ii i1 zh ong3 g uai4 b ing4 b u4 ch ix1 b u4 h e1 l uan4 k u1 l uan4 n ao4 j i2 d e5 uu uai4 p o2 m an3 sh an1 b ian4 ii ie3 q v4 zh ao3 c ao3 ii iao4 l ai2 q v1 g ui3
893 changes: 893 additions & 0 deletions asr_egs/thchs30/data/dev/.backup/cmvn.scp

Large diffs are not rendered by default.

893 changes: 893 additions & 0 deletions asr_egs/thchs30/data/dev/.backup/feats.scp

Large diffs are not rendered by default.

Loading