parent
5d6494decc
commit
c907a8deda
@ -1,68 +1,64 @@
|
|||||||
# https://yaml.org/type/float.html
|
# https://yaml.org/type/float.html
|
||||||
data:
|
###########################################
|
||||||
train_manifest: data/manifest.train
|
# Data #
|
||||||
dev_manifest: data/manifest.dev
|
###########################################
|
||||||
test_manifest: data/manifest.test
|
train_manifest: data/manifest.train
|
||||||
min_input_len: 0.0
|
dev_manifest: data/manifest.dev
|
||||||
max_input_len: 27.0 # second
|
test_manifest: data/manifest.test
|
||||||
min_output_len: 0.0
|
min_input_len: 0.0
|
||||||
max_output_len: .inf
|
max_input_len: 27.0 # second
|
||||||
min_output_input_ratio: 0.00
|
min_output_len: 0.0
|
||||||
max_output_input_ratio: .inf
|
max_output_len: .inf
|
||||||
|
min_output_input_ratio: 0.00
|
||||||
|
max_output_input_ratio: .inf
|
||||||
|
|
||||||
collator:
|
###########################################
|
||||||
batch_size: 64 # one gpu
|
# Dataloader #
|
||||||
mean_std_filepath: data/mean_std.json
|
###########################################
|
||||||
unit_type: char
|
batch_size: 64 # one gpu
|
||||||
vocab_filepath: data/lang_char/vocab.txt
|
mean_std_filepath: data/mean_std.json
|
||||||
augmentation_config: conf/augmentation.json
|
unit_type: char
|
||||||
random_seed: 0
|
vocab_filepath: data/lang_char/vocab.txt
|
||||||
spm_model_prefix:
|
augmentation_config: conf/augmentation.json
|
||||||
spectrum_type: linear
|
random_seed: 0
|
||||||
feat_dim:
|
spm_model_prefix:
|
||||||
delta_delta: False
|
spectrum_type: linear
|
||||||
stride_ms: 10.0
|
feat_dim:
|
||||||
window_ms: 20.0
|
delta_delta: False
|
||||||
n_fft: None
|
stride_ms: 10.0
|
||||||
max_freq: None
|
window_ms: 20.0
|
||||||
target_sample_rate: 16000
|
n_fft: None
|
||||||
use_dB_normalization: True
|
max_freq: None
|
||||||
target_dB: -20
|
target_sample_rate: 16000
|
||||||
dither: 1.0
|
use_dB_normalization: True
|
||||||
keep_transcription_text: False
|
target_dB: -20
|
||||||
sortagrad: True
|
dither: 1.0
|
||||||
shuffle_method: batch_shuffle
|
keep_transcription_text: False
|
||||||
num_workers: 2
|
sortagrad: True
|
||||||
|
shuffle_method: batch_shuffle
|
||||||
|
num_workers: 2
|
||||||
|
|
||||||
model:
|
############################################
|
||||||
num_conv_layers: 2
|
# Network Architecture #
|
||||||
num_rnn_layers: 3
|
############################################
|
||||||
rnn_layer_size: 1024
|
num_conv_layers: 2
|
||||||
use_gru: True
|
num_rnn_layers: 3
|
||||||
share_rnn_weights: False
|
rnn_layer_size: 1024
|
||||||
blank_id: 0
|
use_gru: True
|
||||||
ctc_grad_norm_type: instance
|
share_rnn_weights: False
|
||||||
|
blank_id: 0
|
||||||
|
ctc_grad_norm_type: instance
|
||||||
|
|
||||||
training:
|
###########################################
|
||||||
n_epoch: 80
|
# Training #
|
||||||
accum_grad: 1
|
###########################################
|
||||||
lr: 2e-3
|
n_epoch: 80
|
||||||
lr_decay: 0.83
|
accum_grad: 1
|
||||||
weight_decay: 1e-06
|
lr: 2e-3
|
||||||
global_grad_clip: 3.0
|
lr_decay: 0.83
|
||||||
log_interval: 100
|
weight_decay: 1e-06
|
||||||
checkpoint:
|
global_grad_clip: 3.0
|
||||||
kbest_n: 50
|
log_interval: 100
|
||||||
latest_n: 5
|
checkpoint:
|
||||||
|
kbest_n: 50
|
||||||
decoding:
|
latest_n: 5
|
||||||
batch_size: 128
|
|
||||||
error_rate_type: cer
|
|
||||||
decoding_method: ctc_beam_search
|
|
||||||
lang_model_path: data/lm/zh_giga.no_cna_cmn.prune01244.klm
|
|
||||||
alpha: 1.9
|
|
||||||
beta: 5.0
|
|
||||||
beam_size: 300
|
|
||||||
cutoff_prob: 0.99
|
|
||||||
cutoff_top_n: 40
|
|
||||||
num_proc_bsearch: 10
|
|
||||||
|
@ -0,0 +1,10 @@
|
|||||||
|
chunk_batch_size: 32
|
||||||
|
error_rate_type: cer
|
||||||
|
decoding_method: ctc_beam_search
|
||||||
|
lang_model_path: data/lm/zh_giga.no_cna_cmn.prune01244.klm
|
||||||
|
alpha: 2.2 #1.9
|
||||||
|
beta: 4.3
|
||||||
|
beam_size: 300
|
||||||
|
cutoff_prob: 0.99
|
||||||
|
cutoff_top_n: 40
|
||||||
|
num_proc_bsearch: 10
|
@ -0,0 +1,10 @@
|
|||||||
|
decode_batch_size: 128
|
||||||
|
error_rate_type: cer
|
||||||
|
decoding_method: ctc_beam_search
|
||||||
|
lang_model_path: data/lm/zh_giga.no_cna_cmn.prune01244.klm
|
||||||
|
alpha: 1.9
|
||||||
|
beta: 5.0
|
||||||
|
beam_size: 300
|
||||||
|
cutoff_prob: 0.99
|
||||||
|
cutoff_top_n: 40
|
||||||
|
num_proc_bsearch: 10
|
@ -0,0 +1,47 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ $# != 4 ];then
|
||||||
|
echo "usage: ${0} config_path ckpt_path_prefix model_type audio_file"
|
||||||
|
exit -1
|
||||||
|
fi
|
||||||
|
|
||||||
|
ngpu=$(echo $CUDA_VISIBLE_DEVICES | awk -F "," '{print NF}')
|
||||||
|
echo "using $ngpu gpus..."
|
||||||
|
|
||||||
|
config_path=$1
|
||||||
|
ckpt_prefix=$2
|
||||||
|
model_type=$3
|
||||||
|
audio_file=$4
|
||||||
|
|
||||||
|
mkdir -p data
|
||||||
|
wget -nc https://paddlespeech.bj.bcebos.com/datasets/single_wav/zh/demo_01_03.wav -P data/
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f ${audio_file} ]; then
|
||||||
|
echo "Plase input the right audio_file path"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# download language model
|
||||||
|
bash local/download_lm_ch.sh
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
python3 -u ${BIN_DIR}/test_hub.py \
|
||||||
|
--nproc ${ngpu} \
|
||||||
|
--config ${config_path} \
|
||||||
|
--result_file ${ckpt_prefix}.rsl \
|
||||||
|
--checkpoint_path ${ckpt_prefix} \
|
||||||
|
--model_type ${model_type} \
|
||||||
|
--audio_file ${audio_file}
|
||||||
|
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "Failed in evaluation!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
exit 0
|
@ -1,120 +1,98 @@
|
|||||||
# https://yaml.org/type/float.html
|
# https://yaml.org/type/float.html
|
||||||
data:
|
###########################################
|
||||||
train_manifest: data/manifest.train
|
# Data #
|
||||||
dev_manifest: data/manifest.dev
|
###########################################
|
||||||
test_manifest: data/manifest.test
|
train_manifest: data/manifest.train
|
||||||
min_input_len: 0.5
|
dev_manifest: data/manifest.dev
|
||||||
max_input_len: 20.0 # second
|
test_manifest: data/manifest.test
|
||||||
min_output_len: 0.0
|
|
||||||
max_output_len: 400.0
|
|
||||||
min_output_input_ratio: 0.05
|
|
||||||
max_output_input_ratio: 10.0
|
|
||||||
|
|
||||||
|
|
||||||
collator:
|
###########################################
|
||||||
vocab_filepath: data/lang_char/vocab.txt
|
# Dataloader #
|
||||||
unit_type: 'char'
|
###########################################
|
||||||
spm_model_prefix: ''
|
vocab_filepath: data/lang_char/vocab.txt
|
||||||
augmentation_config: conf/preprocess.yaml
|
unit_type: 'char'
|
||||||
batch_size: 32
|
spm_model_prefix: ''
|
||||||
raw_wav: True # use raw_wav or kaldi feature
|
preprocess_config: conf/preprocess.yaml
|
||||||
spectrum_type: fbank #linear, mfcc, fbank
|
batch_size: 32
|
||||||
feat_dim: 80
|
raw_wav: True # use raw_wav or kaldi feature
|
||||||
delta_delta: False
|
spectrum_type: fbank #linear, mfcc, fbank
|
||||||
dither: 1.0
|
feat_dim: 80
|
||||||
target_sample_rate: 8000
|
delta_delta: False
|
||||||
max_freq: None
|
dither: 1.0
|
||||||
n_fft: None
|
target_sample_rate: 8000
|
||||||
stride_ms: 10.0
|
max_freq: None
|
||||||
window_ms: 25.0
|
n_fft: None
|
||||||
use_dB_normalization: True
|
stride_ms: 10.0
|
||||||
target_dB: -20
|
window_ms: 25.0
|
||||||
random_seed: 0
|
use_dB_normalization: True
|
||||||
keep_transcription_text: False
|
target_dB: -20
|
||||||
sortagrad: True
|
random_seed: 0
|
||||||
shuffle_method: batch_shuffle
|
keep_transcription_text: False
|
||||||
num_workers: 2
|
sortagrad: True
|
||||||
|
shuffle_method: batch_shuffle
|
||||||
|
num_workers: 2
|
||||||
|
|
||||||
|
|
||||||
# network architecture
|
############################################
|
||||||
model:
|
# Network Architecture #
|
||||||
cmvn_file:
|
############################################
|
||||||
cmvn_file_type: "json"
|
cmvn_file:
|
||||||
# encoder related
|
cmvn_file_type: "json"
|
||||||
encoder: conformer
|
# encoder related
|
||||||
encoder_conf:
|
encoder: conformer
|
||||||
output_size: 256 # dimension of attention
|
encoder_conf:
|
||||||
attention_heads: 4
|
output_size: 256 # dimension of attention
|
||||||
linear_units: 2048 # the number of units of position-wise feed forward
|
attention_heads: 4
|
||||||
num_blocks: 12 # the number of encoder blocks
|
linear_units: 2048 # the number of units of position-wise feed forward
|
||||||
dropout_rate: 0.1
|
num_blocks: 12 # the number of encoder blocks
|
||||||
positional_dropout_rate: 0.1
|
dropout_rate: 0.1
|
||||||
attention_dropout_rate: 0.0
|
positional_dropout_rate: 0.1
|
||||||
input_layer: conv2d # encoder input type, you can chose conv2d, conv2d6 and conv2d8
|
attention_dropout_rate: 0.0
|
||||||
normalize_before: True
|
input_layer: conv2d # encoder input type, you can chose conv2d, conv2d6 and conv2d8
|
||||||
use_cnn_module: True
|
normalize_before: True
|
||||||
cnn_module_kernel: 15
|
use_cnn_module: True
|
||||||
activation_type: 'swish'
|
cnn_module_kernel: 15
|
||||||
pos_enc_layer_type: 'rel_pos'
|
activation_type: 'swish'
|
||||||
selfattention_layer_type: 'rel_selfattn'
|
pos_enc_layer_type: 'rel_pos'
|
||||||
causal: true
|
selfattention_layer_type: 'rel_selfattn'
|
||||||
use_dynamic_chunk: true
|
causal: true
|
||||||
cnn_module_norm: 'layer_norm' # using nn.LayerNorm makes model converge faster
|
use_dynamic_chunk: true
|
||||||
use_dynamic_left_chunk: false
|
cnn_module_norm: 'layer_norm' # using nn.LayerNorm makes model converge faster
|
||||||
|
use_dynamic_left_chunk: false
|
||||||
|
|
||||||
# decoder related
|
# decoder related
|
||||||
decoder: transformer
|
decoder: transformer
|
||||||
decoder_conf:
|
decoder_conf:
|
||||||
attention_heads: 4
|
attention_heads: 4
|
||||||
linear_units: 2048
|
linear_units: 2048
|
||||||
num_blocks: 6
|
num_blocks: 6
|
||||||
dropout_rate: 0.1
|
dropout_rate: 0.1
|
||||||
positional_dropout_rate: 0.1
|
positional_dropout_rate: 0.1
|
||||||
self_attention_dropout_rate: 0.0
|
self_attention_dropout_rate: 0.0
|
||||||
src_attention_dropout_rate: 0.0
|
src_attention_dropout_rate: 0.0
|
||||||
|
|
||||||
# hybrid CTC/attention
|
|
||||||
model_conf:
|
|
||||||
ctc_weight: 0.3
|
|
||||||
lsm_weight: 0.1 # label smoothing option
|
|
||||||
length_normalized_loss: false
|
|
||||||
|
|
||||||
|
|
||||||
training:
|
|
||||||
n_epoch: 240
|
|
||||||
accum_grad: 4
|
|
||||||
global_grad_clip: 5.0
|
|
||||||
optim: adam
|
|
||||||
optim_conf:
|
|
||||||
lr: 0.001
|
|
||||||
weight_decay: 1e-6
|
|
||||||
scheduler: warmuplr
|
|
||||||
scheduler_conf:
|
|
||||||
warmup_steps: 25000
|
|
||||||
lr_decay: 1.0
|
|
||||||
log_interval: 100
|
|
||||||
checkpoint:
|
|
||||||
kbest_n: 50
|
|
||||||
latest_n: 5
|
|
||||||
|
|
||||||
|
|
||||||
decoding:
|
|
||||||
batch_size: 128
|
|
||||||
error_rate_type: cer
|
|
||||||
decoding_method: attention # 'attention', 'ctc_greedy_search', 'ctc_prefix_beam_search', 'attention_rescoring'
|
|
||||||
lang_model_path: data/lm/common_crawl_00.prune01111.trie.klm
|
|
||||||
alpha: 2.5
|
|
||||||
beta: 0.3
|
|
||||||
beam_size: 10
|
|
||||||
cutoff_prob: 1.0
|
|
||||||
cutoff_top_n: 0
|
|
||||||
num_proc_bsearch: 8
|
|
||||||
ctc_weight: 0.5 # ctc weight for attention rescoring decode mode.
|
|
||||||
decoding_chunk_size: -1 # decoding chunk size. Defaults to -1.
|
|
||||||
# <0: for decoding, use full chunk.
|
|
||||||
# >0: for decoding, use fixed chunk size as set.
|
|
||||||
# 0: used for training, it's prohibited here.
|
|
||||||
num_decoding_left_chunks: -1 # number of left chunks for decoding. Defaults to -1.
|
|
||||||
simulate_streaming: true # simulate streaming inference. Defaults to False.
|
|
||||||
|
|
||||||
|
# hybrid CTC/attention
|
||||||
|
model_conf:
|
||||||
|
ctc_weight: 0.3
|
||||||
|
lsm_weight: 0.1 # label smoothing option
|
||||||
|
length_normalized_loss: false
|
||||||
|
|
||||||
|
###########################################
|
||||||
|
# Training #
|
||||||
|
###########################################
|
||||||
|
n_epoch: 240
|
||||||
|
accum_grad: 4
|
||||||
|
global_grad_clip: 5.0
|
||||||
|
optim: adam
|
||||||
|
optim_conf:
|
||||||
|
lr: 0.001
|
||||||
|
weight_decay: 1.0e-6
|
||||||
|
scheduler: warmuplr
|
||||||
|
scheduler_conf:
|
||||||
|
warmup_steps: 25000
|
||||||
|
lr_decay: 1.0
|
||||||
|
log_interval: 100
|
||||||
|
checkpoint:
|
||||||
|
kbest_n: 50
|
||||||
|
latest_n: 5
|
||||||
|
@ -1,117 +1,92 @@
|
|||||||
# https://yaml.org/type/float.html
|
# https://yaml.org/type/float.html
|
||||||
data:
|
###########################################
|
||||||
train_manifest: data/manifest.train
|
# Data #
|
||||||
dev_manifest: data/manifest.dev
|
###########################################
|
||||||
test_manifest: data/manifest.test
|
train_manifest: data/manifest.train
|
||||||
min_input_len: 0.5
|
dev_manifest: data/manifest.dev
|
||||||
max_input_len: 20.0 # second
|
test_manifest: data/manifest.test
|
||||||
min_output_len: 0.0
|
|
||||||
max_output_len: 400.0
|
|
||||||
min_output_input_ratio: 0.0
|
|
||||||
max_output_input_ratio: .inf
|
|
||||||
|
|
||||||
|
|
||||||
collator:
|
###########################################
|
||||||
vocab_filepath: data/lang_char/vocab.txt
|
# Dataloader #
|
||||||
unit_type: 'char'
|
###########################################
|
||||||
spm_model_prefix: ''
|
vocab_filepath: data/lang_char/vocab.txt
|
||||||
augmentation_config: conf/preprocess.yaml
|
unit_type: 'char'
|
||||||
batch_size: 32
|
spm_model_prefix: ''
|
||||||
raw_wav: True # use raw_wav or kaldi feature
|
preprocess_config: conf/preprocess.yaml
|
||||||
spectrum_type: fbank #linear, mfcc, fbank
|
feat_dim: 80
|
||||||
feat_dim: 80
|
stride_ms: 10.0
|
||||||
delta_delta: False
|
window_ms: 25.0
|
||||||
dither: 1.0
|
sortagrad: 0 # Feed samples from shortest to longest ; -1: enabled for all epochs, 0: disabled, other: enabled for 'other' epochs
|
||||||
target_sample_rate: 8000
|
batch_size: 64
|
||||||
max_freq: None
|
maxlen_in: 512 # if input length > maxlen-in, batchsize is automatically reduced
|
||||||
n_fft: None
|
maxlen_out: 150 # if output length > maxlen-out, batchsize is automatically reduced
|
||||||
stride_ms: 10.0
|
minibatches: 0 # for debug
|
||||||
window_ms: 25.0
|
batch_count: auto
|
||||||
use_dB_normalization: True
|
batch_bins: 0
|
||||||
target_dB: -20
|
batch_frames_in: 0
|
||||||
random_seed: 0
|
batch_frames_out: 0
|
||||||
keep_transcription_text: False
|
batch_frames_inout: 0
|
||||||
sortagrad: True
|
num_workers: 0
|
||||||
shuffle_method: batch_shuffle
|
subsampling_factor: 1
|
||||||
num_workers: 2
|
num_encs: 1
|
||||||
|
|
||||||
# network architecture
|
############################################
|
||||||
model:
|
# Network Architecture #
|
||||||
cmvn_file:
|
############################################
|
||||||
cmvn_file_type: "json"
|
cmvn_file:
|
||||||
# encoder related
|
cmvn_file_type: "json"
|
||||||
encoder: conformer
|
# encoder related
|
||||||
encoder_conf:
|
encoder: conformer
|
||||||
output_size: 256 # dimension of attention
|
encoder_conf:
|
||||||
attention_heads: 4
|
output_size: 256 # dimension of attention
|
||||||
linear_units: 2048 # the number of units of position-wise feed forward
|
attention_heads: 4
|
||||||
num_blocks: 12 # the number of encoder blocks
|
linear_units: 2048 # the number of units of position-wise feed forward
|
||||||
dropout_rate: 0.1
|
num_blocks: 12 # the number of encoder blocks
|
||||||
positional_dropout_rate: 0.1
|
dropout_rate: 0.1
|
||||||
attention_dropout_rate: 0.0
|
positional_dropout_rate: 0.1
|
||||||
input_layer: conv2d # encoder input type, you can chose conv2d, conv2d6 and conv2d8
|
attention_dropout_rate: 0.0
|
||||||
normalize_before: True
|
input_layer: conv2d # encoder input type, you can chose conv2d, conv2d6 and conv2d8
|
||||||
use_cnn_module: True
|
normalize_before: True
|
||||||
cnn_module_kernel: 15
|
use_cnn_module: True
|
||||||
activation_type: 'swish'
|
cnn_module_kernel: 15
|
||||||
pos_enc_layer_type: 'rel_pos'
|
activation_type: 'swish'
|
||||||
selfattention_layer_type: 'rel_selfattn'
|
pos_enc_layer_type: 'rel_pos'
|
||||||
|
selfattention_layer_type: 'rel_selfattn'
|
||||||
|
|
||||||
# decoder related
|
# decoder related
|
||||||
decoder: transformer
|
decoder: transformer
|
||||||
decoder_conf:
|
decoder_conf:
|
||||||
attention_heads: 4
|
attention_heads: 4
|
||||||
linear_units: 2048
|
linear_units: 2048
|
||||||
num_blocks: 6
|
num_blocks: 6
|
||||||
dropout_rate: 0.1
|
dropout_rate: 0.1
|
||||||
positional_dropout_rate: 0.1
|
positional_dropout_rate: 0.1
|
||||||
self_attention_dropout_rate: 0.0
|
self_attention_dropout_rate: 0.0
|
||||||
src_attention_dropout_rate: 0.0
|
src_attention_dropout_rate: 0.0
|
||||||
|
|
||||||
# hybrid CTC/attention
|
# hybrid CTC/attention
|
||||||
model_conf:
|
model_conf:
|
||||||
ctc_weight: 0.3
|
ctc_weight: 0.3
|
||||||
lsm_weight: 0.1 # label smoothing option
|
lsm_weight: 0.1 # label smoothing option
|
||||||
length_normalized_loss: false
|
length_normalized_loss: false
|
||||||
|
|
||||||
|
|
||||||
training:
|
|
||||||
n_epoch: 100 # 50 will be lowest
|
|
||||||
accum_grad: 4
|
|
||||||
global_grad_clip: 5.0
|
|
||||||
optim: adam
|
|
||||||
optim_conf:
|
|
||||||
lr: 0.002
|
|
||||||
weight_decay: 1e-6
|
|
||||||
scheduler: warmuplr
|
|
||||||
scheduler_conf:
|
|
||||||
warmup_steps: 25000
|
|
||||||
lr_decay: 1.0
|
|
||||||
log_interval: 100
|
|
||||||
checkpoint:
|
|
||||||
kbest_n: 50
|
|
||||||
latest_n: 5
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
decoding:
|
|
||||||
batch_size: 128
|
|
||||||
error_rate_type: cer
|
|
||||||
decoding_method: attention # 'attention', 'ctc_greedy_search', 'ctc_prefix_beam_search', 'attention_rescoring'
|
|
||||||
lang_model_path: data/lm/common_crawl_00.prune01111.trie.klm
|
|
||||||
alpha: 2.5
|
|
||||||
beta: 0.3
|
|
||||||
beam_size: 10
|
|
||||||
cutoff_prob: 1.0
|
|
||||||
cutoff_top_n: 0
|
|
||||||
num_proc_bsearch: 8
|
|
||||||
ctc_weight: 0.5 # ctc weight for attention rescoring decode mode.
|
|
||||||
decoding_chunk_size: -1 # decoding chunk size. Defaults to -1.
|
|
||||||
# <0: for decoding, use full chunk.
|
|
||||||
# >0: for decoding, use fixed chunk size as set.
|
|
||||||
# 0: used for training, it's prohibited here.
|
|
||||||
num_decoding_left_chunks: -1 # number of left chunks for decoding. Defaults to -1.
|
|
||||||
simulate_streaming: False # simulate streaming inference. Defaults to False.
|
|
||||||
|
|
||||||
|
|
||||||
|
###########################################
|
||||||
|
# Training #
|
||||||
|
###########################################
|
||||||
|
n_epoch: 100 # 50 will be lowest
|
||||||
|
accum_grad: 4
|
||||||
|
global_grad_clip: 5.0
|
||||||
|
optim: adam
|
||||||
|
optim_conf:
|
||||||
|
lr: 0.002
|
||||||
|
weight_decay: 1.0e-6
|
||||||
|
scheduler: warmuplr
|
||||||
|
scheduler_conf:
|
||||||
|
warmup_steps: 25000
|
||||||
|
lr_decay: 1.0
|
||||||
|
log_interval: 100
|
||||||
|
checkpoint:
|
||||||
|
kbest_n: 50
|
||||||
|
latest_n: 5
|
||||||
|
@ -0,0 +1,11 @@
|
|||||||
|
decode_batch_size: 128
|
||||||
|
error_rate_type: cer
|
||||||
|
decoding_method: attention # 'attention', 'ctc_greedy_search', 'ctc_prefix_beam_search', 'attention_rescoring'
|
||||||
|
beam_size: 10
|
||||||
|
ctc_weight: 0.5 # ctc weight for attention rescoring decode mode.
|
||||||
|
decoding_chunk_size: -1 # decoding chunk size. Defaults to -1.
|
||||||
|
# <0: for decoding, use full chunk.
|
||||||
|
# >0: for decoding, use fixed chunk size as set.
|
||||||
|
# 0: used for training, it's prohibited here.
|
||||||
|
num_decoding_left_chunks: -1 # number of left chunks for decoding. Defaults to -1.
|
||||||
|
simulate_streaming: true # simulate streaming inference. Defaults to False.
|
@ -0,0 +1,13 @@
|
|||||||
|
decode_batch_size: 128
|
||||||
|
error_rate_type: cer
|
||||||
|
decoding_method: attention # 'attention', 'ctc_greedy_search', 'ctc_prefix_beam_search', 'attention_rescoring'
|
||||||
|
beam_size: 10
|
||||||
|
ctc_weight: 0.5 # ctc weight for attention rescoring decode mode.
|
||||||
|
decoding_chunk_size: -1 # decoding chunk size. Defaults to -1.
|
||||||
|
# <0: for decoding, use full chunk.
|
||||||
|
# >0: for decoding, use fixed chunk size as set.
|
||||||
|
# 0: used for training, it's prohibited here.
|
||||||
|
num_decoding_left_chunks: -1 # number of left chunks for decoding. Defaults to -1.
|
||||||
|
simulate_streaming: False # simulate streaming inference. Defaults to False.
|
||||||
|
|
||||||
|
|
@ -1,68 +1,65 @@
|
|||||||
# https://yaml.org/type/float.html
|
# https://yaml.org/type/float.html
|
||||||
data:
|
###########################################
|
||||||
train_manifest: data/manifest.train
|
# Data #
|
||||||
dev_manifest: data/manifest.dev-clean
|
###########################################
|
||||||
test_manifest: data/manifest.test-clean
|
train_manifest: data/manifest.train
|
||||||
min_input_len: 0.0
|
dev_manifest: data/manifest.dev-clean
|
||||||
max_input_len: 30.0 # second
|
test_manifest: data/manifest.test-clean
|
||||||
min_output_len: 0.0
|
min_input_len: 0.0
|
||||||
max_output_len: .inf
|
max_input_len: 30.0 # second
|
||||||
min_output_input_ratio: 0.00
|
min_output_len: 0.0
|
||||||
max_output_input_ratio: .inf
|
max_output_len: .inf
|
||||||
|
min_output_input_ratio: 0.00
|
||||||
|
max_output_input_ratio: .inf
|
||||||
|
|
||||||
collator:
|
###########################################
|
||||||
batch_size: 20
|
# Dataloader #
|
||||||
mean_std_filepath: data/mean_std.json
|
###########################################
|
||||||
unit_type: char
|
batch_size: 20
|
||||||
vocab_filepath: data/lang_char/vocab.txt
|
mean_std_filepath: data/mean_std.json
|
||||||
augmentation_config: conf/augmentation.json
|
unit_type: char
|
||||||
random_seed: 0
|
vocab_filepath: data/lang_char/vocab.txt
|
||||||
spm_model_prefix:
|
augmentation_config: conf/augmentation.json
|
||||||
spectrum_type: linear
|
random_seed: 0
|
||||||
target_sample_rate: 16000
|
spm_model_prefix:
|
||||||
max_freq: None
|
spectrum_type: linear
|
||||||
n_fft: None
|
feat_dim:
|
||||||
stride_ms: 10.0
|
target_sample_rate: 16000
|
||||||
window_ms: 20.0
|
max_freq: None
|
||||||
delta_delta: False
|
n_fft: None
|
||||||
dither: 1.0
|
stride_ms: 10.0
|
||||||
use_dB_normalization: True
|
window_ms: 20.0
|
||||||
target_dB: -20
|
delta_delta: False
|
||||||
random_seed: 0
|
dither: 1.0
|
||||||
keep_transcription_text: False
|
use_dB_normalization: True
|
||||||
sortagrad: True
|
target_dB: -20
|
||||||
shuffle_method: batch_shuffle
|
random_seed: 0
|
||||||
num_workers: 2
|
keep_transcription_text: False
|
||||||
|
sortagrad: True
|
||||||
|
shuffle_method: batch_shuffle
|
||||||
|
num_workers: 2
|
||||||
|
|
||||||
model:
|
############################################
|
||||||
num_conv_layers: 2
|
# Network Architecture #
|
||||||
num_rnn_layers: 3
|
############################################
|
||||||
rnn_layer_size: 2048
|
num_conv_layers: 2
|
||||||
use_gru: False
|
num_rnn_layers: 3
|
||||||
share_rnn_weights: True
|
rnn_layer_size: 2048
|
||||||
blank_id: 0
|
use_gru: False
|
||||||
|
share_rnn_weights: True
|
||||||
|
blank_id: 0
|
||||||
|
|
||||||
|
|
||||||
training:
|
###########################################
|
||||||
n_epoch: 50
|
# Training #
|
||||||
accum_grad: 1
|
###########################################
|
||||||
lr: 1e-3
|
n_epoch: 50
|
||||||
lr_decay: 0.83
|
accum_grad: 1
|
||||||
weight_decay: 1e-06
|
lr: 1e-3
|
||||||
global_grad_clip: 5.0
|
lr_decay: 0.83
|
||||||
log_interval: 100
|
weight_decay: 1e-06
|
||||||
checkpoint:
|
global_grad_clip: 5.0
|
||||||
kbest_n: 50
|
log_interval: 100
|
||||||
latest_n: 5
|
checkpoint:
|
||||||
|
kbest_n: 50
|
||||||
decoding:
|
latest_n: 5
|
||||||
batch_size: 128
|
|
||||||
error_rate_type: wer
|
|
||||||
decoding_method: ctc_beam_search
|
|
||||||
lang_model_path: data/lm/common_crawl_00.prune01111.trie.klm
|
|
||||||
alpha: 1.9
|
|
||||||
beta: 0.3
|
|
||||||
beam_size: 500
|
|
||||||
cutoff_prob: 1.0
|
|
||||||
cutoff_top_n: 40
|
|
||||||
num_proc_bsearch: 8
|
|
||||||
|
@ -1,70 +1,67 @@
|
|||||||
# https://yaml.org/type/float.html
|
# https://yaml.org/type/float.html
|
||||||
data:
|
###########################################
|
||||||
train_manifest: data/manifest.train
|
# Data #
|
||||||
dev_manifest: data/manifest.dev-clean
|
###########################################
|
||||||
test_manifest: data/manifest.test-clean
|
train_manifest: data/manifest.train
|
||||||
min_input_len: 0.0
|
dev_manifest: data/manifest.dev-clean
|
||||||
max_input_len: 30.0 # second
|
test_manifest: data/manifest.test-clean
|
||||||
min_output_len: 0.0
|
min_input_len: 0.0
|
||||||
max_output_len: .inf
|
max_input_len: 30.0 # second
|
||||||
min_output_input_ratio: 0.00
|
min_output_len: 0.0
|
||||||
max_output_input_ratio: .inf
|
max_output_len: .inf
|
||||||
|
min_output_input_ratio: 0.00
|
||||||
|
max_output_input_ratio: .inf
|
||||||
|
|
||||||
collator:
|
###########################################
|
||||||
batch_size: 15
|
# Dataloader #
|
||||||
mean_std_filepath: data/mean_std.json
|
###########################################
|
||||||
unit_type: char
|
batch_size: 15
|
||||||
vocab_filepath: data/lang_char/vocab.txt
|
mean_std_filepath: data/mean_std.json
|
||||||
augmentation_config: conf/augmentation.json
|
unit_type: char
|
||||||
random_seed: 0
|
vocab_filepath: data/lang_char/vocab.txt
|
||||||
spm_model_prefix:
|
augmentation_config: conf/augmentation.json
|
||||||
spectrum_type: linear
|
random_seed: 0
|
||||||
target_sample_rate: 16000
|
spm_model_prefix:
|
||||||
max_freq: None
|
spectrum_type: linear
|
||||||
n_fft: None
|
feat_dim:
|
||||||
stride_ms: 10.0
|
target_sample_rate: 16000
|
||||||
window_ms: 20.0
|
max_freq: None
|
||||||
delta_delta: False
|
n_fft: None
|
||||||
dither: 1.0
|
stride_ms: 10.0
|
||||||
use_dB_normalization: True
|
window_ms: 20.0
|
||||||
target_dB: -20
|
delta_delta: False
|
||||||
random_seed: 0
|
dither: 1.0
|
||||||
keep_transcription_text: False
|
use_dB_normalization: True
|
||||||
sortagrad: True
|
target_dB: -20
|
||||||
shuffle_method: batch_shuffle
|
random_seed: 0
|
||||||
num_workers: 0
|
keep_transcription_text: False
|
||||||
|
sortagrad: True
|
||||||
|
shuffle_method: batch_shuffle
|
||||||
|
num_workers: 0
|
||||||
|
|
||||||
model:
|
############################################
|
||||||
num_conv_layers: 2
|
# Network Architecture #
|
||||||
num_rnn_layers: 3
|
############################################
|
||||||
rnn_layer_size: 2048
|
num_conv_layers: 2
|
||||||
rnn_direction: forward
|
num_rnn_layers: 3
|
||||||
num_fc_layers: 2
|
rnn_layer_size: 2048
|
||||||
fc_layers_size_list: 512, 256
|
rnn_direction: forward
|
||||||
use_gru: False
|
num_fc_layers: 2
|
||||||
blank_id: 0
|
fc_layers_size_list: 512, 256
|
||||||
|
use_gru: False
|
||||||
|
blank_id: 0
|
||||||
|
|
||||||
|
|
||||||
training:
|
###########################################
|
||||||
n_epoch: 50
|
# Training #
|
||||||
accum_grad: 4
|
###########################################
|
||||||
lr: 1e-3
|
n_epoch: 50
|
||||||
lr_decay: 0.83
|
accum_grad: 4
|
||||||
weight_decay: 1e-06
|
lr: 1e-3
|
||||||
global_grad_clip: 5.0
|
lr_decay: 0.83
|
||||||
log_interval: 100
|
weight_decay: 1e-06
|
||||||
checkpoint:
|
global_grad_clip: 5.0
|
||||||
kbest_n: 50
|
log_interval: 100
|
||||||
latest_n: 5
|
checkpoint:
|
||||||
|
kbest_n: 50
|
||||||
decoding:
|
latest_n: 5
|
||||||
batch_size: 128
|
|
||||||
error_rate_type: wer
|
|
||||||
decoding_method: ctc_beam_search
|
|
||||||
lang_model_path: data/lm/common_crawl_00.prune01111.trie.klm
|
|
||||||
alpha: 1.9
|
|
||||||
beta: 0.3
|
|
||||||
beam_size: 500
|
|
||||||
cutoff_prob: 1.0
|
|
||||||
cutoff_top_n: 40
|
|
||||||
num_proc_bsearch: 8
|
|
||||||
|
@ -0,0 +1,10 @@
|
|||||||
|
decode_batch_size: 128
|
||||||
|
error_rate_type: wer
|
||||||
|
decoding_method: ctc_beam_search
|
||||||
|
lang_model_path: data/lm/common_crawl_00.prune01111.trie.klm
|
||||||
|
alpha: 1.9
|
||||||
|
beta: 0.3
|
||||||
|
beam_size: 500
|
||||||
|
cutoff_prob: 1.0
|
||||||
|
cutoff_top_n: 40
|
||||||
|
num_proc_bsearch: 8
|
@ -0,0 +1,10 @@
|
|||||||
|
decode_batch_size: 128
|
||||||
|
error_rate_type: wer
|
||||||
|
decoding_method: ctc_beam_search
|
||||||
|
lang_model_path: data/lm/common_crawl_00.prune01111.trie.klm
|
||||||
|
alpha: 1.9
|
||||||
|
beta: 0.3
|
||||||
|
beam_size: 500
|
||||||
|
cutoff_prob: 1.0
|
||||||
|
cutoff_top_n: 40
|
||||||
|
num_proc_bsearch: 8
|
@ -0,0 +1,11 @@
|
|||||||
|
decode_batch_size: 1
|
||||||
|
error_rate_type: wer
|
||||||
|
decoding_method: attention # 'attention', 'ctc_greedy_search', 'ctc_prefix_beam_search', 'attention_rescoring'
|
||||||
|
beam_size: 10
|
||||||
|
ctc_weight: 0.5 # ctc weight for attention rescoring decode mode.
|
||||||
|
decoding_chunk_size: -1 # decoding chunk size. Defaults to -1.
|
||||||
|
# <0: for decoding, use full chunk.
|
||||||
|
# >0: for decoding, use fixed chunk size as set.
|
||||||
|
# 0: used for training, it's prohibited here.
|
||||||
|
num_decoding_left_chunks: -1 # number of left chunks for decoding. Defaults to -1.
|
||||||
|
simulate_streaming: False # simulate streaming inference. Defaults to False.
|
@ -0,0 +1,10 @@
|
|||||||
|
decode_batch_size: 32
|
||||||
|
error_rate_type: cer
|
||||||
|
decoding_method: ctc_beam_search
|
||||||
|
lang_model_path: data/lm/zh_giga.no_cna_cmn.prune01244.klm
|
||||||
|
alpha: 2.6
|
||||||
|
beta: 5.0
|
||||||
|
beam_size: 300
|
||||||
|
cutoff_prob: 0.99
|
||||||
|
cutoff_top_n: 40
|
||||||
|
num_proc_bsearch: 8
|
@ -0,0 +1,10 @@
|
|||||||
|
decode_batch_size: 32
|
||||||
|
error_rate_type: wer
|
||||||
|
decoding_method: ctc_beam_search
|
||||||
|
lang_model_path: data/lm/common_crawl_00.prune01111.trie.klm
|
||||||
|
alpha: 1.4
|
||||||
|
beta: 0.35
|
||||||
|
beam_size: 500
|
||||||
|
cutoff_prob: 1.0
|
||||||
|
cutoff_top_n: 40
|
||||||
|
num_proc_bsearch: 8
|
@ -0,0 +1,10 @@
|
|||||||
|
decode_batch_size: 32
|
||||||
|
error_rate_type: wer
|
||||||
|
decoding_method: ctc_beam_search
|
||||||
|
lang_model_path: data/lm/common_crawl_00.prune01111.trie.klm
|
||||||
|
alpha: 2.5
|
||||||
|
beta: 0.3
|
||||||
|
beam_size: 500
|
||||||
|
cutoff_prob: 1.0
|
||||||
|
cutoff_top_n: 40
|
||||||
|
num_proc_bsearch: 8
|
@ -1,109 +1,96 @@
|
|||||||
# https://yaml.org/type/float.html
|
# https://yaml.org/type/float.html
|
||||||
data:
|
###########################################
|
||||||
train_manifest: data/manifest.train.tiny
|
# Data #
|
||||||
dev_manifest: data/manifest.dev
|
###########################################
|
||||||
test_manifest: data/manifest.test
|
train_manifest: data/manifest.train.tiny
|
||||||
min_input_len: 0.05 # second
|
dev_manifest: data/manifest.dev
|
||||||
max_input_len: 30.0 # second
|
test_manifest: data/manifest.test
|
||||||
min_output_len: 0.0 # tokens
|
min_input_len: 0.05 # second
|
||||||
max_output_len: 400.0 # tokens
|
max_input_len: 30.0 # second
|
||||||
min_output_input_ratio: 0.01
|
min_output_len: 0.0 # tokens
|
||||||
max_output_input_ratio: 20.0
|
max_output_len: 400.0 # tokens
|
||||||
|
min_output_input_ratio: 0.01
|
||||||
|
max_output_input_ratio: 20.0
|
||||||
|
|
||||||
collator:
|
###########################################
|
||||||
vocab_filepath: data/lang_char/vocab.txt
|
# Dataloader #
|
||||||
unit_type: 'spm'
|
###########################################
|
||||||
spm_model_prefix: data/lang_char/bpe_unigram_8000
|
vocab_filepath: data/lang_char/vocab.txt
|
||||||
mean_std_filepath: ""
|
unit_type: 'spm'
|
||||||
# augmentation_config: conf/augmentation.json
|
spm_model_prefix: data/lang_char/bpe_unigram_8000
|
||||||
batch_size: 10
|
mean_std_filepath: ""
|
||||||
raw_wav: True # use raw_wav or kaldi feature
|
# augmentation_config: conf/augmentation.json
|
||||||
spectrum_type: fbank #linear, mfcc, fbank
|
batch_size: 10
|
||||||
feat_dim: 80
|
raw_wav: True # use raw_wav or kaldi feature
|
||||||
delta_delta: False
|
spectrum_type: fbank #linear, mfcc, fbank
|
||||||
dither: 1.0
|
feat_dim: 80
|
||||||
target_sample_rate: 16000
|
delta_delta: False
|
||||||
max_freq: None
|
dither: 1.0
|
||||||
n_fft: None
|
target_sample_rate: 16000
|
||||||
stride_ms: 10.0
|
max_freq: None
|
||||||
window_ms: 25.0
|
n_fft: None
|
||||||
use_dB_normalization: True
|
stride_ms: 10.0
|
||||||
target_dB: -20
|
window_ms: 25.0
|
||||||
random_seed: 0
|
use_dB_normalization: True
|
||||||
keep_transcription_text: False
|
target_dB: -20
|
||||||
sortagrad: True
|
random_seed: 0
|
||||||
shuffle_method: batch_shuffle
|
keep_transcription_text: False
|
||||||
num_workers: 2
|
sortagrad: True
|
||||||
|
shuffle_method: batch_shuffle
|
||||||
|
num_workers: 2
|
||||||
|
|
||||||
|
|
||||||
# network architecture
|
############################################
|
||||||
model:
|
# Network Architecture #
|
||||||
cmvn_file: "data/mean_std.json"
|
############################################
|
||||||
cmvn_file_type: "json"
|
cmvn_file: "data/mean_std.json"
|
||||||
# encoder related
|
cmvn_file_type: "json"
|
||||||
encoder: transformer
|
# encoder related
|
||||||
encoder_conf:
|
encoder: transformer
|
||||||
output_size: 256 # dimension of attention
|
encoder_conf:
|
||||||
attention_heads: 4
|
output_size: 256 # dimension of attention
|
||||||
linear_units: 2048 # the number of units of position-wise feed forward
|
attention_heads: 4
|
||||||
num_blocks: 12 # the number of encoder blocks
|
linear_units: 2048 # the number of units of position-wise feed forward
|
||||||
dropout_rate: 0.1
|
num_blocks: 12 # the number of encoder blocks
|
||||||
positional_dropout_rate: 0.1
|
dropout_rate: 0.1
|
||||||
attention_dropout_rate: 0.0
|
positional_dropout_rate: 0.1
|
||||||
input_layer: conv2d # encoder input type, you can chose conv2d, conv2d6 and conv2d8
|
attention_dropout_rate: 0.0
|
||||||
normalize_before: true
|
input_layer: conv2d # encoder input type, you can chose conv2d, conv2d6 and conv2d8
|
||||||
|
normalize_before: true
|
||||||
|
|
||||||
# decoder related
|
# decoder related
|
||||||
decoder: transformer
|
decoder: transformer
|
||||||
decoder_conf:
|
decoder_conf:
|
||||||
attention_heads: 4
|
attention_heads: 4
|
||||||
linear_units: 2048
|
linear_units: 2048
|
||||||
num_blocks: 6
|
num_blocks: 6
|
||||||
dropout_rate: 0.1
|
dropout_rate: 0.1
|
||||||
positional_dropout_rate: 0.1
|
positional_dropout_rate: 0.1
|
||||||
self_attention_dropout_rate: 0.0
|
self_attention_dropout_rate: 0.0
|
||||||
src_attention_dropout_rate: 0.0
|
src_attention_dropout_rate: 0.0
|
||||||
|
|
||||||
# hybrid CTC/attention
|
# hybrid CTC/attention
|
||||||
model_conf:
|
model_conf:
|
||||||
asr_weight: 0.0
|
asr_weight: 0.0
|
||||||
ctc_weight: 0.0
|
ctc_weight: 0.0
|
||||||
lsm_weight: 0.1 # label smoothing option
|
lsm_weight: 0.1 # label smoothing option
|
||||||
length_normalized_loss: false
|
length_normalized_loss: false
|
||||||
|
|
||||||
|
###########################################
|
||||||
training:
|
# Training #
|
||||||
n_epoch: 120
|
###########################################
|
||||||
accum_grad: 2
|
n_epoch: 120
|
||||||
global_grad_clip: 5.0
|
accum_grad: 2
|
||||||
optim: adam
|
global_grad_clip: 5.0
|
||||||
optim_conf:
|
optim: adam
|
||||||
lr: 0.004
|
optim_conf:
|
||||||
weight_decay: 1e-06
|
lr: 0.004
|
||||||
scheduler: warmuplr
|
weight_decay: 1.0e-06
|
||||||
scheduler_conf:
|
scheduler: warmuplr
|
||||||
warmup_steps: 25000
|
scheduler_conf:
|
||||||
lr_decay: 1.0
|
warmup_steps: 25000
|
||||||
log_interval: 5
|
lr_decay: 1.0
|
||||||
checkpoint:
|
log_interval: 5
|
||||||
kbest_n: 50
|
checkpoint:
|
||||||
latest_n: 5
|
kbest_n: 50
|
||||||
|
latest_n: 5
|
||||||
|
|
||||||
decoding:
|
|
||||||
batch_size: 5
|
|
||||||
error_rate_type: char-bleu
|
|
||||||
decoding_method: fullsentence # 'fullsentence', 'simultaneous'
|
|
||||||
alpha: 2.5
|
|
||||||
beta: 0.3
|
|
||||||
beam_size: 10
|
|
||||||
cutoff_prob: 1.0
|
|
||||||
cutoff_top_n: 0
|
|
||||||
num_proc_bsearch: 8
|
|
||||||
ctc_weight: 0.5 # ctc weight for attention rescoring decode mode.
|
|
||||||
decoding_chunk_size: -1 # decoding chunk size. Defaults to -1.
|
|
||||||
# <0: for decoding, use full chunk.
|
|
||||||
# >0: for decoding, use fixed chunk size as set.
|
|
||||||
# 0: used for training, it's prohibited here.
|
|
||||||
num_decoding_left_chunks: -1 # number of left chunks for decoding. Defaults to -1.
|
|
||||||
simulate_streaming: False # simulate streaming inference. Defaults to False.
|
|
||||||
|
@ -1,112 +1,100 @@
|
|||||||
# https://yaml.org/type/float.html
|
# https://yaml.org/type/float.html
|
||||||
data:
|
###########################################
|
||||||
train_manifest: data/manifest.train
|
# Data #
|
||||||
dev_manifest: data/manifest.dev
|
###########################################
|
||||||
test_manifest: data/manifest.test
|
train_manifest: data/manifest.train
|
||||||
min_input_len: 0.05 # second
|
dev_manifest: data/manifest.dev
|
||||||
max_input_len: 30.0 # second
|
test_manifest: data/manifest.test
|
||||||
min_output_len: 0.0 # tokens
|
min_input_len: 0.05 # second
|
||||||
max_output_len: 400.0 # tokens
|
max_input_len: 30.0 # second
|
||||||
min_output_input_ratio: 0.01
|
min_output_len: 0.0 # tokens
|
||||||
max_output_input_ratio: 20.0
|
max_output_len: 400.0 # tokens
|
||||||
|
min_output_input_ratio: 0.01
|
||||||
|
max_output_input_ratio: 20.0
|
||||||
|
|
||||||
collator:
|
###########################################
|
||||||
vocab_filepath: data/lang_char/vocab.txt
|
# Dataloader #
|
||||||
unit_type: 'spm'
|
###########################################
|
||||||
spm_model_prefix: data/lang_char/bpe_unigram_8000
|
vocab_filepath: data/lang_char/vocab.txt
|
||||||
mean_std_filepath: ""
|
unit_type: 'spm'
|
||||||
# augmentation_config: conf/augmentation.json
|
spm_model_prefix: data/lang_char/bpe_unigram_8000
|
||||||
batch_size: 10
|
mean_std_filepath: ""
|
||||||
raw_wav: True # use raw_wav or kaldi feature
|
# augmentation_config: conf/augmentation.json
|
||||||
spectrum_type: fbank #linear, mfcc, fbank
|
batch_size: 10
|
||||||
feat_dim: 80
|
raw_wav: True # use raw_wav or kaldi feature
|
||||||
delta_delta: False
|
spectrum_type: fbank #linear, mfcc, fbank
|
||||||
dither: 1.0
|
feat_dim: 80
|
||||||
target_sample_rate: 16000
|
delta_delta: False
|
||||||
max_freq: None
|
dither: 1.0
|
||||||
n_fft: None
|
target_sample_rate: 16000
|
||||||
stride_ms: 10.0
|
max_freq: None
|
||||||
window_ms: 25.0
|
n_fft: None
|
||||||
use_dB_normalization: True
|
stride_ms: 10.0
|
||||||
target_dB: -20
|
window_ms: 25.0
|
||||||
random_seed: 0
|
use_dB_normalization: True
|
||||||
keep_transcription_text: False
|
target_dB: -20
|
||||||
sortagrad: True
|
random_seed: 0
|
||||||
shuffle_method: batch_shuffle
|
keep_transcription_text: False
|
||||||
num_workers: 2
|
sortagrad: True
|
||||||
|
shuffle_method: batch_shuffle
|
||||||
|
num_workers: 2
|
||||||
|
|
||||||
|
|
||||||
# network architecture
|
############################################
|
||||||
model:
|
# Network Architecture #
|
||||||
cmvn_file: "data/mean_std.json"
|
############################################
|
||||||
cmvn_file_type: "json"
|
cmvn_file: "data/mean_std.json"
|
||||||
# encoder related
|
cmvn_file_type: "json"
|
||||||
encoder: transformer
|
# encoder related
|
||||||
encoder_conf:
|
encoder: transformer
|
||||||
output_size: 256 # dimension of attention
|
encoder_conf:
|
||||||
attention_heads: 4
|
output_size: 256 # dimension of attention
|
||||||
linear_units: 2048 # the number of units of position-wise feed forward
|
attention_heads: 4
|
||||||
num_blocks: 12 # the number of encoder blocks
|
linear_units: 2048 # the number of units of position-wise feed forward
|
||||||
dropout_rate: 0.1
|
num_blocks: 12 # the number of encoder blocks
|
||||||
positional_dropout_rate: 0.1
|
dropout_rate: 0.1
|
||||||
attention_dropout_rate: 0.0
|
positional_dropout_rate: 0.1
|
||||||
input_layer: conv2d # encoder input type, you can chose conv2d, conv2d6 and conv2d8
|
attention_dropout_rate: 0.0
|
||||||
normalize_before: true
|
input_layer: conv2d # encoder input type, you can chose conv2d, conv2d6 and conv2d8
|
||||||
|
normalize_before: true
|
||||||
|
|
||||||
# decoder related
|
# decoder related
|
||||||
decoder: transformer
|
decoder: transformer
|
||||||
decoder_conf:
|
decoder_conf:
|
||||||
attention_heads: 4
|
attention_heads: 4
|
||||||
linear_units: 2048
|
linear_units: 2048
|
||||||
num_blocks: 6
|
num_blocks: 6
|
||||||
dropout_rate: 0.1
|
dropout_rate: 0.1
|
||||||
positional_dropout_rate: 0.1
|
positional_dropout_rate: 0.1
|
||||||
self_attention_dropout_rate: 0.0
|
self_attention_dropout_rate: 0.0
|
||||||
src_attention_dropout_rate: 0.0
|
src_attention_dropout_rate: 0.0
|
||||||
|
|
||||||
# hybrid CTC/attention
|
# hybrid CTC/attention
|
||||||
model_conf:
|
model_conf:
|
||||||
asr_weight: 0.5
|
asr_weight: 0.5
|
||||||
ctc_weight: 0.3
|
ctc_weight: 0.3
|
||||||
lsm_weight: 0.1 # label smoothing option
|
lsm_weight: 0.1 # label smoothing option
|
||||||
length_normalized_loss: false
|
length_normalized_loss: false
|
||||||
|
|
||||||
|
|
||||||
training:
|
###########################################
|
||||||
n_epoch: 120
|
# Training #
|
||||||
accum_grad: 2
|
###########################################
|
||||||
global_grad_clip: 5.0
|
n_epoch: 120
|
||||||
optim: adam
|
accum_grad: 2
|
||||||
optim_conf:
|
global_grad_clip: 5.0
|
||||||
lr: 2.5
|
optim: adam
|
||||||
weight_decay: 1e-06
|
optim_conf:
|
||||||
scheduler: noam
|
lr: 2.5
|
||||||
scheduler_conf:
|
weight_decay: 1.0e-06
|
||||||
warmup_steps: 25000
|
scheduler: noam
|
||||||
lr_decay: 1.0
|
scheduler_conf:
|
||||||
log_interval: 50
|
warmup_steps: 25000
|
||||||
checkpoint:
|
lr_decay: 1.0
|
||||||
kbest_n: 50
|
log_interval: 50
|
||||||
latest_n: 5
|
checkpoint:
|
||||||
|
kbest_n: 50
|
||||||
|
latest_n: 5
|
||||||
|
|
||||||
|
|
||||||
decoding:
|
|
||||||
batch_size: 5
|
|
||||||
error_rate_type: char-bleu
|
|
||||||
decoding_method: fullsentence # 'fullsentence', 'simultaneous'
|
|
||||||
alpha: 2.5
|
|
||||||
beta: 0.3
|
|
||||||
beam_size: 10
|
|
||||||
word_reward: 0.7
|
|
||||||
cutoff_prob: 1.0
|
|
||||||
cutoff_top_n: 0
|
|
||||||
num_proc_bsearch: 8
|
|
||||||
ctc_weight: 0.5 # ctc weight for attention rescoring decode mode.
|
|
||||||
decoding_chunk_size: -1 # decoding chunk size. Defaults to -1.
|
|
||||||
# <0: for decoding, use full chunk.
|
|
||||||
# >0: for decoding, use fixed chunk size as set.
|
|
||||||
# 0: used for training, it's prohibited here.
|
|
||||||
num_decoding_left_chunks: -1 # number of left chunks for decoding. Defaults to -1.
|
|
||||||
simulate_streaming: False # simulate streaming inference. Defaults to False.
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -0,0 +1,11 @@
|
|||||||
|
batch_size: 5
|
||||||
|
error_rate_type: char-bleu
|
||||||
|
decoding_method: fullsentence # 'fullsentence', 'simultaneous'
|
||||||
|
beam_size: 10
|
||||||
|
word_reward: 0.7
|
||||||
|
decoding_chunk_size: -1 # decoding chunk size. Defaults to -1.
|
||||||
|
# <0: for decoding, use full chunk.
|
||||||
|
# >0: for decoding, use fixed chunk size as set.
|
||||||
|
# 0: used for training, it's prohibited here.
|
||||||
|
num_decoding_left_chunks: -1 # number of left chunks for decoding. Defaults to -1.
|
||||||
|
simulate_streaming: False # simulate streaming inference. Defaults to False.
|
@ -1,110 +1,97 @@
|
|||||||
# https://yaml.org/type/float.html
|
# https://yaml.org/type/float.html
|
||||||
data:
|
###########################################
|
||||||
train_manifest: data/manifest.train.tiny
|
# Data #
|
||||||
dev_manifest: data/manifest.dev
|
###########################################
|
||||||
test_manifest: data/manifest.test
|
train_manifest: data/manifest.train.tiny
|
||||||
min_input_len: 5.0 # frame
|
dev_manifest: data/manifest.dev
|
||||||
max_input_len: 3000.0 # frame
|
test_manifest: data/manifest.test
|
||||||
min_output_len: 0.0 # tokens
|
min_input_len: 5.0 # frame
|
||||||
max_output_len: 400.0 # tokens
|
max_input_len: 3000.0 # frame
|
||||||
min_output_input_ratio: 0.01
|
min_output_len: 0.0 # tokens
|
||||||
max_output_input_ratio: 20.0
|
max_output_len: 400.0 # tokens
|
||||||
|
min_output_input_ratio: 0.01
|
||||||
|
max_output_input_ratio: 20.0
|
||||||
|
|
||||||
collator:
|
###########################################
|
||||||
vocab_filepath: data/lang_char/vocab.txt
|
# Dataloader #
|
||||||
unit_type: 'spm'
|
###########################################
|
||||||
spm_model_prefix: data/lang_char/bpe_unigram_8000
|
vocab_filepath: data/lang_char/vocab.txt
|
||||||
mean_std_filepath: ""
|
unit_type: 'spm'
|
||||||
# augmentation_config: conf/augmentation.json
|
spm_model_prefix: data/lang_char/bpe_unigram_8000
|
||||||
batch_size: 10
|
mean_std_filepath: ""
|
||||||
raw_wav: True # use raw_wav or kaldi feature
|
# augmentation_config: conf/augmentation.json
|
||||||
spectrum_type: fbank #linear, mfcc, fbank
|
batch_size: 10
|
||||||
feat_dim: 83
|
raw_wav: True # use raw_wav or kaldi feature
|
||||||
delta_delta: False
|
spectrum_type: fbank #linear, mfcc, fbank
|
||||||
dither: 1.0
|
feat_dim: 83
|
||||||
target_sample_rate: 16000
|
delta_delta: False
|
||||||
max_freq: None
|
dither: 1.0
|
||||||
n_fft: None
|
target_sample_rate: 16000
|
||||||
stride_ms: 10.0
|
max_freq: None
|
||||||
window_ms: 25.0
|
n_fft: None
|
||||||
use_dB_normalization: True
|
stride_ms: 10.0
|
||||||
target_dB: -20
|
window_ms: 25.0
|
||||||
random_seed: 0
|
use_dB_normalization: True
|
||||||
keep_transcription_text: False
|
target_dB: -20
|
||||||
sortagrad: True
|
random_seed: 0
|
||||||
shuffle_method: batch_shuffle
|
keep_transcription_text: False
|
||||||
num_workers: 2
|
sortagrad: True
|
||||||
|
shuffle_method: batch_shuffle
|
||||||
|
num_workers: 2
|
||||||
|
|
||||||
|
|
||||||
# network architecture
|
############################################
|
||||||
model:
|
# Network Architecture #
|
||||||
cmvn_file: None
|
############################################
|
||||||
cmvn_file_type: "json"
|
cmvn_file: None
|
||||||
# encoder related
|
cmvn_file_type: "json"
|
||||||
encoder: transformer
|
# encoder related
|
||||||
encoder_conf:
|
encoder: transformer
|
||||||
output_size: 256 # dimension of attention
|
encoder_conf:
|
||||||
attention_heads: 4
|
output_size: 256 # dimension of attention
|
||||||
linear_units: 2048 # the number of units of position-wise feed forward
|
attention_heads: 4
|
||||||
num_blocks: 12 # the number of encoder blocks
|
linear_units: 2048 # the number of units of position-wise feed forward
|
||||||
dropout_rate: 0.1
|
num_blocks: 12 # the number of encoder blocks
|
||||||
positional_dropout_rate: 0.1
|
dropout_rate: 0.1
|
||||||
attention_dropout_rate: 0.0
|
positional_dropout_rate: 0.1
|
||||||
input_layer: conv2d # encoder input type, you can chose conv2d, conv2d6 and conv2d8
|
attention_dropout_rate: 0.0
|
||||||
normalize_before: true
|
input_layer: conv2d # encoder input type, you can chose conv2d, conv2d6 and conv2d8
|
||||||
|
normalize_before: true
|
||||||
|
|
||||||
# decoder related
|
# decoder related
|
||||||
decoder: transformer
|
decoder: transformer
|
||||||
decoder_conf:
|
decoder_conf:
|
||||||
attention_heads: 4
|
attention_heads: 4
|
||||||
linear_units: 2048
|
linear_units: 2048
|
||||||
num_blocks: 6
|
num_blocks: 6
|
||||||
dropout_rate: 0.1
|
dropout_rate: 0.1
|
||||||
positional_dropout_rate: 0.1
|
positional_dropout_rate: 0.1
|
||||||
self_attention_dropout_rate: 0.0
|
self_attention_dropout_rate: 0.0
|
||||||
src_attention_dropout_rate: 0.0
|
src_attention_dropout_rate: 0.0
|
||||||
|
|
||||||
# hybrid CTC/attention
|
# hybrid CTC/attention
|
||||||
model_conf:
|
model_conf:
|
||||||
asr_weight: 0.0
|
asr_weight: 0.0
|
||||||
ctc_weight: 0.0
|
ctc_weight: 0.0
|
||||||
lsm_weight: 0.1 # label smoothing option
|
lsm_weight: 0.1 # label smoothing option
|
||||||
length_normalized_loss: false
|
length_normalized_loss: false
|
||||||
|
|
||||||
|
|
||||||
training:
|
###########################################
|
||||||
n_epoch: 20
|
# Training #
|
||||||
accum_grad: 2
|
###########################################
|
||||||
global_grad_clip: 5.0
|
n_epoch: 20
|
||||||
optim: adam
|
accum_grad: 2
|
||||||
optim_conf:
|
global_grad_clip: 5.0
|
||||||
lr: 0.004
|
optim: adam
|
||||||
weight_decay: 1e-06
|
optim_conf:
|
||||||
scheduler: warmuplr
|
lr: 0.004
|
||||||
scheduler_conf:
|
weight_decay: 1.0e-06
|
||||||
warmup_steps: 25000
|
scheduler: warmuplr
|
||||||
lr_decay: 1.0
|
scheduler_conf:
|
||||||
log_interval: 5
|
warmup_steps: 25000
|
||||||
checkpoint:
|
lr_decay: 1.0
|
||||||
kbest_n: 50
|
log_interval: 5
|
||||||
latest_n: 5
|
checkpoint:
|
||||||
|
kbest_n: 50
|
||||||
|
latest_n: 5
|
||||||
decoding:
|
|
||||||
batch_size: 5
|
|
||||||
error_rate_type: char-bleu
|
|
||||||
decoding_method: fullsentence # 'fullsentence', 'simultaneous'
|
|
||||||
alpha: 2.5
|
|
||||||
beta: 0.3
|
|
||||||
beam_size: 10
|
|
||||||
word_reward: 0.7
|
|
||||||
cutoff_prob: 1.0
|
|
||||||
cutoff_top_n: 0
|
|
||||||
num_proc_bsearch: 8
|
|
||||||
ctc_weight: 0.5 # ctc weight for attention rescoring decode mode.
|
|
||||||
decoding_chunk_size: -1 # decoding chunk size. Defaults to -1.
|
|
||||||
# <0: for decoding, use full chunk.
|
|
||||||
# >0: for decoding, use fixed chunk size as set.
|
|
||||||
# 0: used for training, it's prohibited here.
|
|
||||||
num_decoding_left_chunks: -1 # number of left chunks for decoding. Defaults to -1.
|
|
||||||
simulate_streaming: False # simulate streaming inference. Defaults to False.
|
|
||||||
|
@ -1,110 +1,97 @@
|
|||||||
# https://yaml.org/type/float.html
|
# https://yaml.org/type/float.html
|
||||||
data:
|
###########################################
|
||||||
train_manifest: data/manifest.train
|
# Data #
|
||||||
dev_manifest: data/manifest.dev
|
###########################################
|
||||||
test_manifest: data/manifest.test
|
train_manifest: data/manifest.train
|
||||||
min_input_len: 5.0 # frame
|
dev_manifest: data/manifest.dev
|
||||||
max_input_len: 3000.0 # frame
|
test_manifest: data/manifest.test
|
||||||
min_output_len: 0.0 # tokens
|
min_input_len: 5.0 # frame
|
||||||
max_output_len: 400.0 # tokens
|
max_input_len: 3000.0 # frame
|
||||||
min_output_input_ratio: 0.01
|
min_output_len: 0.0 # tokens
|
||||||
max_output_input_ratio: 20.0
|
max_output_len: 400.0 # tokens
|
||||||
|
min_output_input_ratio: 0.01
|
||||||
|
max_output_input_ratio: 20.0
|
||||||
|
|
||||||
collator:
|
###########################################
|
||||||
vocab_filepath: data/lang_char/ted_en_zh_bpe8000.txt
|
# Dataloader #
|
||||||
unit_type: 'spm'
|
###########################################
|
||||||
spm_model_prefix: data/lang_char/ted_en_zh_bpe8000
|
vocab_filepath: data/lang_char/ted_en_zh_bpe8000.txt
|
||||||
mean_std_filepath: ""
|
unit_type: 'spm'
|
||||||
# augmentation_config: conf/augmentation.json
|
spm_model_prefix: data/lang_char/ted_en_zh_bpe8000
|
||||||
batch_size: 10
|
mean_std_filepath: ""
|
||||||
raw_wav: True # use raw_wav or kaldi feature
|
# augmentation_config: conf/augmentation.json
|
||||||
spectrum_type: fbank #linear, mfcc, fbank
|
batch_size: 10
|
||||||
feat_dim: 83
|
raw_wav: True # use raw_wav or kaldi feature
|
||||||
delta_delta: False
|
spectrum_type: fbank #linear, mfcc, fbank
|
||||||
dither: 1.0
|
feat_dim: 83
|
||||||
target_sample_rate: 16000
|
delta_delta: False
|
||||||
max_freq: None
|
dither: 1.0
|
||||||
n_fft: None
|
target_sample_rate: 16000
|
||||||
stride_ms: 10.0
|
max_freq: None
|
||||||
window_ms: 25.0
|
n_fft: None
|
||||||
use_dB_normalization: True
|
stride_ms: 10.0
|
||||||
target_dB: -20
|
window_ms: 25.0
|
||||||
random_seed: 0
|
use_dB_normalization: True
|
||||||
keep_transcription_text: False
|
target_dB: -20
|
||||||
sortagrad: True
|
random_seed: 0
|
||||||
shuffle_method: batch_shuffle
|
keep_transcription_text: False
|
||||||
num_workers: 2
|
sortagrad: True
|
||||||
|
shuffle_method: batch_shuffle
|
||||||
|
num_workers: 2
|
||||||
|
|
||||||
|
|
||||||
# network architecture
|
############################################
|
||||||
model:
|
# Network Architecture #
|
||||||
cmvn_file: None
|
############################################
|
||||||
cmvn_file_type: "json"
|
cmvn_file: None
|
||||||
# encoder related
|
cmvn_file_type: "json"
|
||||||
encoder: transformer
|
# encoder related
|
||||||
encoder_conf:
|
encoder: transformer
|
||||||
output_size: 256 # dimension of attention
|
encoder_conf:
|
||||||
attention_heads: 4
|
output_size: 256 # dimension of attention
|
||||||
linear_units: 2048 # the number of units of position-wise feed forward
|
attention_heads: 4
|
||||||
num_blocks: 12 # the number of encoder blocks
|
linear_units: 2048 # the number of units of position-wise feed forward
|
||||||
dropout_rate: 0.1
|
num_blocks: 12 # the number of encoder blocks
|
||||||
positional_dropout_rate: 0.1
|
dropout_rate: 0.1
|
||||||
attention_dropout_rate: 0.0
|
positional_dropout_rate: 0.1
|
||||||
input_layer: conv2d # encoder input type, you can chose conv2d, conv2d6 and conv2d8
|
attention_dropout_rate: 0.0
|
||||||
normalize_before: true
|
input_layer: conv2d # encoder input type, you can chose conv2d, conv2d6 and conv2d8
|
||||||
|
normalize_before: true
|
||||||
|
|
||||||
# decoder related
|
# decoder related
|
||||||
decoder: transformer
|
decoder: transformer
|
||||||
decoder_conf:
|
decoder_conf:
|
||||||
attention_heads: 4
|
attention_heads: 4
|
||||||
linear_units: 2048
|
linear_units: 2048
|
||||||
num_blocks: 6
|
num_blocks: 6
|
||||||
dropout_rate: 0.1
|
dropout_rate: 0.1
|
||||||
positional_dropout_rate: 0.1
|
positional_dropout_rate: 0.1
|
||||||
self_attention_dropout_rate: 0.0
|
self_attention_dropout_rate: 0.0
|
||||||
src_attention_dropout_rate: 0.0
|
src_attention_dropout_rate: 0.0
|
||||||
|
|
||||||
# hybrid CTC/attention
|
# hybrid CTC/attention
|
||||||
model_conf:
|
model_conf:
|
||||||
asr_weight: 0.5
|
asr_weight: 0.5
|
||||||
ctc_weight: 0.3
|
ctc_weight: 0.3
|
||||||
lsm_weight: 0.1 # label smoothing option
|
lsm_weight: 0.1 # label smoothing option
|
||||||
length_normalized_loss: false
|
length_normalized_loss: false
|
||||||
|
|
||||||
|
|
||||||
training:
|
###########################################
|
||||||
n_epoch: 20
|
# Training #
|
||||||
accum_grad: 2
|
###########################################
|
||||||
global_grad_clip: 5.0
|
n_epoch: 20
|
||||||
optim: adam
|
accum_grad: 2
|
||||||
optim_conf:
|
global_grad_clip: 5.0
|
||||||
lr: 2.5
|
optim: adam
|
||||||
weight_decay: 1e-06
|
optim_conf:
|
||||||
scheduler: noam
|
lr: 2.5
|
||||||
scheduler_conf:
|
weight_decay: 1.0e-06
|
||||||
warmup_steps: 25000
|
scheduler: noam
|
||||||
lr_decay: 1.0
|
scheduler_conf:
|
||||||
log_interval: 5
|
warmup_steps: 25000
|
||||||
checkpoint:
|
lr_decay: 1.0
|
||||||
kbest_n: 50
|
log_interval: 5
|
||||||
latest_n: 5
|
checkpoint:
|
||||||
|
kbest_n: 50
|
||||||
|
latest_n: 5
|
||||||
decoding:
|
|
||||||
batch_size: 5
|
|
||||||
error_rate_type: char-bleu
|
|
||||||
decoding_method: fullsentence # 'fullsentence', 'simultaneous'
|
|
||||||
alpha: 2.5
|
|
||||||
beta: 0.3
|
|
||||||
beam_size: 10
|
|
||||||
word_reward: 0.7
|
|
||||||
cutoff_prob: 1.0
|
|
||||||
cutoff_top_n: 0
|
|
||||||
num_proc_bsearch: 8
|
|
||||||
ctc_weight: 0.5 # ctc weight for attention rescoring decode mode.
|
|
||||||
decoding_chunk_size: -1 # decoding chunk size. Defaults to -1.
|
|
||||||
# <0: for decoding, use full chunk.
|
|
||||||
# >0: for decoding, use fixed chunk size as set.
|
|
||||||
# 0: used for training, it's prohibited here.
|
|
||||||
num_decoding_left_chunks: -1 # number of left chunks for decoding. Defaults to -1.
|
|
||||||
simulate_streaming: False # simulate streaming inference. Defaults to False.
|
|
||||||
|
@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
batch_size: 5
|
||||||
|
error_rate_type: char-bleu
|
||||||
|
decoding_method: fullsentence # 'fullsentence', 'simultaneous'
|
||||||
|
beam_size: 10
|
||||||
|
word_reward: 0.7
|
||||||
|
decoding_chunk_size: -1 # decoding chunk size. Defaults to -1.
|
||||||
|
# <0: for decoding, use full chunk.
|
||||||
|
# >0: for decoding, use fixed chunk size as set.
|
||||||
|
# 0: used for training, it's prohibited here.
|
||||||
|
num_decoding_left_chunks: -1 # number of left chunks for decoding. Defaults to -1.
|
||||||
|
simulate_streaming: False # simulate streaming inference. Defaults to False.
|
@ -1,110 +1,89 @@
|
|||||||
# https://yaml.org/type/float.html
|
# https://yaml.org/type/float.html
|
||||||
data:
|
###########################################
|
||||||
train_manifest: data/manifest.train
|
# Data #
|
||||||
dev_manifest: data/manifest.dev
|
###########################################
|
||||||
test_manifest: data/manifest.test
|
train_manifest: data/manifest.train
|
||||||
min_input_len: 0.0 # second
|
dev_manifest: data/manifest.dev
|
||||||
max_input_len: 10.0 # second
|
test_manifest: data/manifest.test
|
||||||
min_output_len: 0.0 # tokens
|
|
||||||
max_output_len: 150.0 # tokens
|
|
||||||
min_output_input_ratio: 0.005
|
|
||||||
max_output_input_ratio: 1000.0
|
|
||||||
|
|
||||||
collator:
|
###########################################
|
||||||
vocab_filepath: data/lang_char/vocab.txt
|
# Dataloader #
|
||||||
unit_type: "word"
|
###########################################
|
||||||
mean_std_filepath: ""
|
vocab_filepath: data/lang_char/vocab.txt
|
||||||
augmentation_config: conf/preprocess.yaml
|
spm_model_prefix: ''
|
||||||
batch_size: 64
|
unit_type: "word"
|
||||||
raw_wav: True # use raw_wav or kaldi feature
|
mean_std_filepath: ""
|
||||||
spectrum_type: fbank #linear, mfcc, fbank
|
preprocess_config: conf/preprocess.yaml
|
||||||
feat_dim: 80
|
feat_dim: 80
|
||||||
delta_delta: False
|
stride_ms: 10.0
|
||||||
dither: 1.0
|
window_ms: 25.0
|
||||||
target_sample_rate: 16000
|
sortagrad: 0 # Feed samples from shortest to longest ; -1: enabled for all epochs, 0: disabled, other: enabled for 'other' epochs
|
||||||
max_freq: None
|
batch_size: 64
|
||||||
n_fft: None
|
maxlen_in: 512 # if input length > maxlen-in, batchsize is automatically reduced
|
||||||
stride_ms: 10.0
|
maxlen_out: 150 # if output length > maxlen-out, batchsize is automatically reduced
|
||||||
window_ms: 25.0
|
minibatches: 0 # for debug
|
||||||
use_dB_normalization: True
|
batch_count: auto
|
||||||
target_dB: -20
|
batch_bins: 0
|
||||||
random_seed: 0
|
batch_frames_in: 0
|
||||||
keep_transcription_text: False
|
batch_frames_out: 0
|
||||||
sortagrad: True
|
batch_frames_inout: 0
|
||||||
shuffle_method: batch_shuffle
|
num_workers: 0
|
||||||
num_workers: 2
|
subsampling_factor: 1
|
||||||
|
num_encs: 1
|
||||||
|
|
||||||
|
|
||||||
# network architecture
|
############################################
|
||||||
model:
|
# Network Architecture #
|
||||||
cmvn_file:
|
############################################
|
||||||
cmvn_file_type: "json"
|
cmvn_file:
|
||||||
# encoder related
|
cmvn_file_type: "json"
|
||||||
encoder: transformer
|
# encoder related
|
||||||
encoder_conf:
|
encoder: transformer
|
||||||
output_size: 128 # dimension of attention
|
encoder_conf:
|
||||||
attention_heads: 4
|
output_size: 128 # dimension of attention
|
||||||
linear_units: 1024 # the number of units of position-wise feed forward
|
attention_heads: 4
|
||||||
num_blocks: 6 # the number of encoder blocks
|
linear_units: 1024 # the number of units of position-wise feed forward
|
||||||
dropout_rate: 0.1
|
num_blocks: 6 # the number of encoder blocks
|
||||||
positional_dropout_rate: 0.1
|
dropout_rate: 0.1
|
||||||
attention_dropout_rate: 0.0
|
positional_dropout_rate: 0.1
|
||||||
input_layer: conv2d # encoder input type, you can chose conv2d, conv2d6 and conv2d8
|
attention_dropout_rate: 0.0
|
||||||
normalize_before: true
|
input_layer: conv2d # encoder input type, you can chose conv2d, conv2d6 and conv2d8
|
||||||
|
normalize_before: true
|
||||||
|
|
||||||
# decoder related
|
# decoder related
|
||||||
decoder: transformer
|
decoder: transformer
|
||||||
decoder_conf:
|
decoder_conf:
|
||||||
attention_heads: 4
|
attention_heads: 4
|
||||||
linear_units: 1024
|
linear_units: 1024
|
||||||
num_blocks: 6
|
num_blocks: 6
|
||||||
dropout_rate: 0.1
|
dropout_rate: 0.1
|
||||||
positional_dropout_rate: 0.1
|
positional_dropout_rate: 0.1
|
||||||
self_attention_dropout_rate: 0.0
|
self_attention_dropout_rate: 0.0
|
||||||
src_attention_dropout_rate: 0.0
|
src_attention_dropout_rate: 0.0
|
||||||
|
|
||||||
# hybrid CTC/attention
|
# hybrid CTC/attention
|
||||||
model_conf:
|
model_conf:
|
||||||
ctc_weight: 0.5
|
ctc_weight: 0.5
|
||||||
lsm_weight: 0.1 # label smoothing option
|
lsm_weight: 0.1 # label smoothing option
|
||||||
length_normalized_loss: false
|
length_normalized_loss: false
|
||||||
|
|
||||||
|
|
||||||
training:
|
###########################################
|
||||||
n_epoch: 50
|
# Training #
|
||||||
accum_grad: 1
|
###########################################
|
||||||
global_grad_clip: 5.0
|
n_epoch: 50
|
||||||
optim: adam
|
accum_grad: 1
|
||||||
optim_conf:
|
global_grad_clip: 5.0
|
||||||
lr: 0.004
|
optim: adam
|
||||||
weight_decay: 1e-06
|
optim_conf:
|
||||||
scheduler: warmuplr
|
lr: 0.004
|
||||||
scheduler_conf:
|
weight_decay: 1.0e-6
|
||||||
warmup_steps: 1200
|
scheduler: warmuplr
|
||||||
lr_decay: 1.0
|
scheduler_conf:
|
||||||
log_interval: 10
|
warmup_steps: 1200
|
||||||
checkpoint:
|
lr_decay: 1.0
|
||||||
kbest_n: 50
|
log_interval: 10
|
||||||
latest_n: 5
|
checkpoint:
|
||||||
|
kbest_n: 50
|
||||||
|
latest_n: 5
|
||||||
decoding:
|
|
||||||
batch_size: 64
|
|
||||||
error_rate_type: wer
|
|
||||||
decoding_method: attention # 'attention', 'ctc_greedy_search', 'ctc_prefix_beam_search', 'attention_rescoring'
|
|
||||||
lang_model_path: data/lm/common_crawl_00.prune01111.trie.klm
|
|
||||||
alpha: 2.5
|
|
||||||
beta: 0.3
|
|
||||||
beam_size: 10
|
|
||||||
cutoff_prob: 1.0
|
|
||||||
cutoff_top_n: 0
|
|
||||||
num_proc_bsearch: 8
|
|
||||||
ctc_weight: 0.5 # ctc weight for attention rescoring decode mode.
|
|
||||||
decoding_chunk_size: -1 # decoding chunk size. Defaults to -1.
|
|
||||||
# <0: for decoding, use full chunk.
|
|
||||||
# >0: for decoding, use fixed chunk size as set.
|
|
||||||
# 0: used for training, it's prohibited here.
|
|
||||||
num_decoding_left_chunks: -1 # number of left chunks for decoding. Defaults to -1.
|
|
||||||
simulate_streaming: False # simulate streaming inference. Defaults to False.
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -0,0 +1,11 @@
|
|||||||
|
decode_batch_size: 64
|
||||||
|
error_rate_type: wer
|
||||||
|
decoding_method: attention # 'attention', 'ctc_greedy_search', 'ctc_prefix_beam_search', 'attention_rescoring'
|
||||||
|
beam_size: 10
|
||||||
|
ctc_weight: 0.5 # ctc weight for attention rescoring decode mode.
|
||||||
|
decoding_chunk_size: -1 # decoding chunk size. Defaults to -1.
|
||||||
|
# <0: for decoding, use full chunk.
|
||||||
|
# >0: for decoding, use fixed chunk size as set.
|
||||||
|
# 0: used for training, it's prohibited here.
|
||||||
|
num_decoding_left_chunks: -1 # number of left chunks for decoding. Defaults to -1.
|
||||||
|
simulate_streaming: False # simulate streaming inference. Defaults to False.
|
@ -0,0 +1,10 @@
|
|||||||
|
decode_batch_size: 128
|
||||||
|
error_rate_type: wer
|
||||||
|
decoding_method: ctc_beam_search
|
||||||
|
lang_model_path: data/lm/common_crawl_00.prune01111.trie.klm
|
||||||
|
alpha: 2.5
|
||||||
|
beta: 0.3
|
||||||
|
beam_size: 500
|
||||||
|
cutoff_prob: 1.0
|
||||||
|
cutoff_top_n: 40
|
||||||
|
num_proc_bsearch: 8
|
@ -0,0 +1,10 @@
|
|||||||
|
decode_batch_size: 128
|
||||||
|
error_rate_type: wer
|
||||||
|
decoding_method: ctc_beam_search
|
||||||
|
lang_model_path: data/lm/common_crawl_00.prune01111.trie.klm
|
||||||
|
alpha: 2.5
|
||||||
|
beta: 0.3
|
||||||
|
beam_size: 500
|
||||||
|
cutoff_prob: 1.0
|
||||||
|
cutoff_top_n: 40
|
||||||
|
num_proc_bsearch: 8
|
@ -1,120 +1,98 @@
|
|||||||
# https://yaml.org/type/float.html
|
############################################
|
||||||
data:
|
# Network Architecture #
|
||||||
train_manifest: data/manifest.tiny
|
############################################
|
||||||
dev_manifest: data/manifest.tiny
|
cmvn_file: "data/mean_std.json"
|
||||||
test_manifest: data/manifest.tiny
|
cmvn_file_type: "json"
|
||||||
min_input_len: 0.5 # second
|
# encoder related
|
||||||
max_input_len: 30.0 # second
|
encoder: conformer
|
||||||
min_output_len: 0.0 # tokens
|
encoder_conf:
|
||||||
max_output_len: 400.0 # tokens
|
output_size: 256 # dimension of attention
|
||||||
min_output_input_ratio: 0.05
|
attention_heads: 4
|
||||||
max_output_input_ratio: 10.0
|
linear_units: 2048 # the number of units of position-wise feed forward
|
||||||
|
num_blocks: 12 # the number of encoder blocks
|
||||||
|
dropout_rate: 0.1
|
||||||
|
positional_dropout_rate: 0.1
|
||||||
|
attention_dropout_rate: 0.0
|
||||||
|
input_layer: conv2d # encoder input type, you can chose conv2d, conv2d6 and conv2d8
|
||||||
|
normalize_before: True
|
||||||
|
use_cnn_module: True
|
||||||
|
cnn_module_kernel: 15
|
||||||
|
activation_type: 'swish'
|
||||||
|
pos_enc_layer_type: 'rel_pos'
|
||||||
|
selfattention_layer_type: 'rel_selfattn'
|
||||||
|
causal: True
|
||||||
|
use_dynamic_chunk: True
|
||||||
|
cnn_module_norm: 'layer_norm' # using nn.LayerNorm makes model converge faster
|
||||||
|
use_dynamic_left_chunk: false
|
||||||
|
|
||||||
collator:
|
# decoder related
|
||||||
mean_std_filepath: ""
|
decoder: transformer
|
||||||
vocab_filepath: data/lang_char/vocab.txt
|
decoder_conf:
|
||||||
unit_type: 'spm'
|
attention_heads: 4
|
||||||
spm_model_prefix: 'data/lang_char/bpe_unigram_200'
|
linear_units: 2048
|
||||||
augmentation_config: conf/preprocess.yaml
|
num_blocks: 6
|
||||||
batch_size: 4
|
dropout_rate: 0.1
|
||||||
raw_wav: True # use raw_wav or kaldi feature
|
positional_dropout_rate: 0.1
|
||||||
spectrum_type: fbank #linear, mfcc, fbank
|
self_attention_dropout_rate: 0.0
|
||||||
feat_dim: 80
|
src_attention_dropout_rate: 0.0
|
||||||
delta_delta: False
|
|
||||||
dither: 1.0
|
|
||||||
target_sample_rate: 16000
|
|
||||||
max_freq: None
|
|
||||||
n_fft: None
|
|
||||||
stride_ms: 10.0
|
|
||||||
window_ms: 25.0
|
|
||||||
use_dB_normalization: True
|
|
||||||
target_dB: -20
|
|
||||||
random_seed: 0
|
|
||||||
keep_transcription_text: False
|
|
||||||
sortagrad: True
|
|
||||||
shuffle_method: batch_shuffle
|
|
||||||
num_workers: 2
|
|
||||||
|
|
||||||
|
# hybrid CTC/attention
|
||||||
|
model_conf:
|
||||||
|
ctc_weight: 0.3
|
||||||
|
lsm_weight: 0.1 # label smoothing option
|
||||||
|
length_normalized_loss: false
|
||||||
|
|
||||||
# network architecture
|
|
||||||
model:
|
|
||||||
cmvn_file: "data/mean_std.json"
|
|
||||||
cmvn_file_type: "json"
|
|
||||||
# encoder related
|
|
||||||
encoder: conformer
|
|
||||||
encoder_conf:
|
|
||||||
output_size: 256 # dimension of attention
|
|
||||||
attention_heads: 4
|
|
||||||
linear_units: 2048 # the number of units of position-wise feed forward
|
|
||||||
num_blocks: 12 # the number of encoder blocks
|
|
||||||
dropout_rate: 0.1
|
|
||||||
positional_dropout_rate: 0.1
|
|
||||||
attention_dropout_rate: 0.0
|
|
||||||
input_layer: conv2d # encoder input type, you can chose conv2d, conv2d6 and conv2d8
|
|
||||||
normalize_before: True
|
|
||||||
use_cnn_module: True
|
|
||||||
cnn_module_kernel: 15
|
|
||||||
activation_type: 'swish'
|
|
||||||
pos_enc_layer_type: 'rel_pos'
|
|
||||||
selfattention_layer_type: 'rel_selfattn'
|
|
||||||
causal: True
|
|
||||||
use_dynamic_chunk: True
|
|
||||||
cnn_module_norm: 'layer_norm' # using nn.LayerNorm makes model converge faster
|
|
||||||
use_dynamic_left_chunk: false
|
|
||||||
|
|
||||||
# decoder related
|
###########################################
|
||||||
decoder: transformer
|
# Data #
|
||||||
decoder_conf:
|
###########################################
|
||||||
attention_heads: 4
|
train_manifest: data/manifest.tiny
|
||||||
linear_units: 2048
|
dev_manifest: data/manifest.tiny
|
||||||
num_blocks: 6
|
test_manifest: data/manifest.tiny
|
||||||
dropout_rate: 0.1
|
|
||||||
positional_dropout_rate: 0.1
|
|
||||||
self_attention_dropout_rate: 0.0
|
|
||||||
src_attention_dropout_rate: 0.0
|
|
||||||
|
|
||||||
# hybrid CTC/attention
|
|
||||||
model_conf:
|
|
||||||
ctc_weight: 0.3
|
|
||||||
lsm_weight: 0.1 # label smoothing option
|
|
||||||
length_normalized_loss: false
|
|
||||||
|
|
||||||
|
###########################################
|
||||||
training:
|
# Dataloader #
|
||||||
n_epoch: 5
|
###########################################
|
||||||
accum_grad: 1
|
mean_std_filepath: ""
|
||||||
global_grad_clip: 5.0
|
vocab_filepath: data/lang_char/vocab.txt
|
||||||
optim: adam
|
unit_type: 'spm'
|
||||||
optim_conf:
|
spm_model_prefix: 'data/lang_char/bpe_unigram_200'
|
||||||
lr: 0.001
|
preprocess_config: conf/preprocess.yaml
|
||||||
weight_decay: 1e-06
|
feat_dim: 80
|
||||||
scheduler: warmuplr
|
stride_ms: 10.0
|
||||||
scheduler_conf:
|
window_ms: 25.0
|
||||||
warmup_steps: 25000
|
sortagrad: 0 # Feed samples from shortest to longest ; -1: enabled for all epochs, 0: disabled, other: enabled for 'other' epochs
|
||||||
lr_decay: 1.0
|
batch_size: 4
|
||||||
log_interval: 1
|
maxlen_in: 512 # if input length > maxlen-in, batchsize is automatically reduced
|
||||||
checkpoint:
|
maxlen_out: 150 # if output length > maxlen-out, batchsize is automatically reduced
|
||||||
kbest_n: 10
|
minibatches: 0 # for debug
|
||||||
latest_n: 1
|
batch_count: auto
|
||||||
|
batch_bins: 0
|
||||||
|
batch_frames_in: 0
|
||||||
decoding:
|
batch_frames_out: 0
|
||||||
batch_size: 64
|
batch_frames_inout: 0
|
||||||
error_rate_type: wer
|
augmentation_config: conf/preprocess.yaml
|
||||||
decoding_method: attention # 'attention', 'ctc_greedy_search', 'ctc_prefix_beam_search', 'attention_rescoring'
|
num_workers: 0
|
||||||
lang_model_path: data/lm/common_crawl_00.prune01111.trie.klm
|
subsampling_factor: 1
|
||||||
alpha: 2.5
|
num_encs: 1
|
||||||
beta: 0.3
|
|
||||||
beam_size: 10
|
|
||||||
cutoff_prob: 1.0
|
|
||||||
cutoff_top_n: 0
|
|
||||||
num_proc_bsearch: 8
|
|
||||||
ctc_weight: 0.5 # ctc weight for attention rescoring decode mode.
|
|
||||||
decoding_chunk_size: -1 # decoding chunk size. Defaults to -1.
|
|
||||||
# <0: for decoding, use full chunk.
|
|
||||||
# >0: for decoding, use fixed chunk size as set.
|
|
||||||
# 0: used for training, it's prohibited here.
|
|
||||||
num_decoding_left_chunks: -1 # number of left chunks for decoding. Defaults to -1.
|
|
||||||
simulate_streaming: False # simulate streaming inference. Defaults to False.
|
|
||||||
|
|
||||||
|
|
||||||
|
###########################################
|
||||||
|
# Training #
|
||||||
|
###########################################
|
||||||
|
n_epoch: 5
|
||||||
|
accum_grad: 1
|
||||||
|
global_grad_clip: 5.0
|
||||||
|
optim: adam
|
||||||
|
optim_conf:
|
||||||
|
lr: 0.001
|
||||||
|
weight_decay: 1.0e-06
|
||||||
|
scheduler: warmuplr
|
||||||
|
scheduler_conf:
|
||||||
|
warmup_steps: 25000
|
||||||
|
lr_decay: 1.0
|
||||||
|
log_interval: 1
|
||||||
|
checkpoint:
|
||||||
|
kbest_n: 10
|
||||||
|
latest_n: 1
|
||||||
|
@ -1,113 +1,91 @@
|
|||||||
# https://yaml.org/type/float.html
|
############################################
|
||||||
data:
|
# Network Architecture #
|
||||||
train_manifest: data/manifest.tiny
|
############################################
|
||||||
dev_manifest: data/manifest.tiny
|
cmvn_file: "data/mean_std.json"
|
||||||
test_manifest: data/manifest.tiny
|
cmvn_file_type: "json"
|
||||||
min_input_len: 0.5 # second
|
# encoder related
|
||||||
max_input_len: 20.0 # second
|
encoder: transformer
|
||||||
min_output_len: 0.0 # tokens
|
encoder_conf:
|
||||||
max_output_len: 400.0 # tokens
|
output_size: 256 # dimension of attention
|
||||||
min_output_input_ratio: 0.05
|
attention_heads: 4
|
||||||
max_output_input_ratio: 10.0
|
linear_units: 2048 # the number of units of position-wise feed forward
|
||||||
|
num_blocks: 12 # the number of encoder blocks
|
||||||
collator:
|
dropout_rate: 0.1
|
||||||
mean_std_filepath: ""
|
positional_dropout_rate: 0.1
|
||||||
vocab_filepath: data/lang_char/vocab.txt
|
attention_dropout_rate: 0.0
|
||||||
unit_type: 'spm'
|
input_layer: conv2d # encoder input type, you can chose conv2d, conv2d6 and conv2d8
|
||||||
spm_model_prefix: 'data/lang_char/bpe_unigram_200'
|
normalize_before: true
|
||||||
augmentation_config: conf/preprocess.yaml
|
use_dynamic_chunk: true
|
||||||
batch_size: 4
|
use_dynamic_left_chunk: false
|
||||||
raw_wav: True # use raw_wav or kaldi feature
|
|
||||||
spectrum_type: fbank #linear, mfcc, fbank
|
|
||||||
feat_dim: 80
|
|
||||||
delta_delta: False
|
|
||||||
dither: 1.0
|
|
||||||
target_sample_rate: 16000
|
|
||||||
max_freq: None
|
|
||||||
n_fft: None
|
|
||||||
stride_ms: 10.0
|
|
||||||
window_ms: 25.0
|
|
||||||
use_dB_normalization: True
|
|
||||||
target_dB: -20
|
|
||||||
random_seed: 0
|
|
||||||
keep_transcription_text: False
|
|
||||||
sortagrad: True
|
|
||||||
shuffle_method: batch_shuffle
|
|
||||||
num_workers: 2
|
|
||||||
|
|
||||||
|
|
||||||
# network architecture
|
# decoder related
|
||||||
model:
|
decoder: transformer
|
||||||
cmvn_file: "data/mean_std.json"
|
decoder_conf:
|
||||||
cmvn_file_type: "json"
|
attention_heads: 4
|
||||||
# encoder related
|
linear_units: 2048
|
||||||
encoder: transformer
|
num_blocks: 6
|
||||||
encoder_conf:
|
dropout_rate: 0.1
|
||||||
output_size: 256 # dimension of attention
|
positional_dropout_rate: 0.1
|
||||||
attention_heads: 4
|
self_attention_dropout_rate: 0.0
|
||||||
linear_units: 2048 # the number of units of position-wise feed forward
|
src_attention_dropout_rate: 0.0
|
||||||
num_blocks: 12 # the number of encoder blocks
|
|
||||||
dropout_rate: 0.1
|
|
||||||
positional_dropout_rate: 0.1
|
|
||||||
attention_dropout_rate: 0.0
|
|
||||||
input_layer: conv2d # encoder input type, you can chose conv2d, conv2d6 and conv2d8
|
|
||||||
normalize_before: true
|
|
||||||
use_dynamic_chunk: true
|
|
||||||
use_dynamic_left_chunk: false
|
|
||||||
|
|
||||||
# decoder related
|
# hybrid CTC/attention
|
||||||
decoder: transformer
|
model_conf:
|
||||||
decoder_conf:
|
ctc_weight: 0.3
|
||||||
attention_heads: 4
|
lsm_weight: 0.1 # label smoothing option
|
||||||
linear_units: 2048
|
length_normalized_loss: false
|
||||||
num_blocks: 6
|
|
||||||
dropout_rate: 0.1
|
|
||||||
positional_dropout_rate: 0.1
|
|
||||||
self_attention_dropout_rate: 0.0
|
|
||||||
src_attention_dropout_rate: 0.0
|
|
||||||
|
|
||||||
# hybrid CTC/attention
|
|
||||||
model_conf:
|
|
||||||
ctc_weight: 0.3
|
|
||||||
lsm_weight: 0.1 # label smoothing option
|
|
||||||
length_normalized_loss: false
|
|
||||||
|
|
||||||
|
# https://yaml.org/type/float.html
|
||||||
|
###########################################
|
||||||
|
# Data #
|
||||||
|
###########################################
|
||||||
|
train_manifest: data/manifest.tiny
|
||||||
|
dev_manifest: data/manifest.tiny
|
||||||
|
test_manifest: data/manifest.tiny
|
||||||
|
|
||||||
training:
|
###########################################
|
||||||
n_epoch: 5
|
# Dataloader #
|
||||||
accum_grad: 1
|
###########################################
|
||||||
global_grad_clip: 5.0
|
mean_std_filepath: ""
|
||||||
optim: adam
|
vocab_filepath: data/lang_char/vocab.txt
|
||||||
optim_conf:
|
unit_type: 'spm'
|
||||||
lr: 0.002
|
spm_model_prefix: 'data/lang_char/bpe_unigram_200'
|
||||||
weight_decay: 1e-06
|
preprocess_config: conf/preprocess.yaml
|
||||||
scheduler: warmuplr
|
feat_dim: 80
|
||||||
scheduler_conf:
|
stride_ms: 10.0
|
||||||
warmup_steps: 25000
|
window_ms: 25.0
|
||||||
lr_decay: 1.0
|
sortagrad: 0 # Feed samples from shortest to longest ; -1: enabled for all epochs, 0: disabled, other: enabled for 'other' epochs
|
||||||
log_interval: 1
|
batch_size: 4
|
||||||
checkpoint:
|
maxlen_in: 512 # if input length > maxlen-in, batchsize is automatically reduced
|
||||||
kbest_n: 10
|
maxlen_out: 150 # if output length > maxlen-out, batchsize is automatically reduced
|
||||||
latest_n: 1
|
minibatches: 0 # for debug
|
||||||
|
batch_count: auto
|
||||||
|
batch_bins: 0
|
||||||
|
batch_frames_in: 0
|
||||||
|
batch_frames_out: 0
|
||||||
|
batch_frames_inout: 0
|
||||||
|
num_workers: 0
|
||||||
|
subsampling_factor: 1
|
||||||
|
num_encs: 1
|
||||||
|
|
||||||
decoding:
|
|
||||||
batch_size: 64
|
|
||||||
error_rate_type: wer
|
|
||||||
decoding_method: attention # 'attention', 'ctc_greedy_search', 'ctc_prefix_beam_search', 'attention_rescoring'
|
|
||||||
lang_model_path: data/lm/common_crawl_00.prune01111.trie.klm
|
|
||||||
alpha: 2.5
|
|
||||||
beta: 0.3
|
|
||||||
beam_size: 10
|
|
||||||
cutoff_prob: 1.0
|
|
||||||
cutoff_top_n: 0
|
|
||||||
num_proc_bsearch: 8
|
|
||||||
ctc_weight: 0.5 # ctc weight for attention rescoring decode mode.
|
|
||||||
decoding_chunk_size: -1 # decoding chunk size. Defaults to -1.
|
|
||||||
# <0: for decoding, use full chunk.
|
|
||||||
# >0: for decoding, use fixed chunk size as set.
|
|
||||||
# 0: used for training, it's prohibited here.
|
|
||||||
num_decoding_left_chunks: -1 # number of left chunks for decoding. Defaults to -1.
|
|
||||||
simulate_streaming: False # simulate streaming inference. Defaults to False.
|
|
||||||
|
|
||||||
|
###########################################
|
||||||
|
# Training #
|
||||||
|
###########################################
|
||||||
|
n_epoch: 5
|
||||||
|
accum_grad: 1
|
||||||
|
global_grad_clip: 5.0
|
||||||
|
optim: adam
|
||||||
|
optim_conf:
|
||||||
|
lr: 0.002
|
||||||
|
weight_decay: 1.0e-06
|
||||||
|
scheduler: warmuplr
|
||||||
|
scheduler_conf:
|
||||||
|
warmup_steps: 25000
|
||||||
|
lr_decay: 1.0
|
||||||
|
log_interval: 1
|
||||||
|
checkpoint:
|
||||||
|
kbest_n: 10
|
||||||
|
latest_n: 1
|
||||||
|
|
||||||
|
@ -0,0 +1,11 @@
|
|||||||
|
decode_batch_size: 8 #64
|
||||||
|
error_rate_type: wer
|
||||||
|
decoding_method: attention # 'attention', 'ctc_greedy_search', 'ctc_prefix_beam_search', 'attention_rescoring'
|
||||||
|
beam_size: 10
|
||||||
|
ctc_weight: 0.5 # ctc weight for attention rescoring decode mode.
|
||||||
|
decoding_chunk_size: -1 # decoding chunk size. Defaults to -1.
|
||||||
|
# <0: for decoding, use full chunk.
|
||||||
|
# >0: for decoding, use fixed chunk size as set.
|
||||||
|
# 0: used for training, it's prohibited here.
|
||||||
|
num_decoding_left_chunks: -1 # number of left chunks for decoding. Defaults to -1.
|
||||||
|
simulate_streaming: False # simulate streaming inference. Defaults to False.
|
@ -0,0 +1,11 @@
|
|||||||
|
decode_batch_size: 8 #64
|
||||||
|
error_rate_type: wer
|
||||||
|
decoding_method: attention # 'attention', 'ctc_greedy_search', 'ctc_prefix_beam_search', 'attention_rescoring'
|
||||||
|
beam_size: 10
|
||||||
|
ctc_weight: 0.5 # ctc weight for attention rescoring decode mode.
|
||||||
|
decoding_chunk_size: -1 # decoding chunk size. Defaults to -1.
|
||||||
|
# <0: for decoding, use full chunk.
|
||||||
|
# >0: for decoding, use fixed chunk size as set.
|
||||||
|
# 0: used for training, it's prohibited here.
|
||||||
|
num_decoding_left_chunks: -1 # number of left chunks for decoding. Defaults to -1.
|
||||||
|
simulate_streaming: False # simulate streaming inference. Defaults to False.
|
@ -1,111 +1,92 @@
|
|||||||
# network architecture
|
############################################
|
||||||
model:
|
# Network Architecture #
|
||||||
# encoder related
|
############################################
|
||||||
encoder: conformer
|
cmvn_file:
|
||||||
encoder_conf:
|
cmvn_file_type: "json"
|
||||||
output_size: 512 # dimension of attention
|
# encoder related
|
||||||
attention_heads: 8
|
encoder: conformer
|
||||||
linear_units: 2048 # the number of units of position-wise feed forward
|
encoder_conf:
|
||||||
num_blocks: 12 # the number of encoder blocks
|
output_size: 512 # dimension of attention
|
||||||
dropout_rate: 0.1
|
attention_heads: 8
|
||||||
positional_dropout_rate: 0.1
|
linear_units: 2048 # the number of units of position-wise feed forward
|
||||||
attention_dropout_rate: 0.0
|
num_blocks: 12 # the number of encoder blocks
|
||||||
input_layer: conv2d # encoder input type, you can chose conv2d, conv2d6 and conv2d8
|
dropout_rate: 0.1
|
||||||
normalize_before: True
|
positional_dropout_rate: 0.1
|
||||||
use_cnn_module: True
|
attention_dropout_rate: 0.0
|
||||||
cnn_module_kernel: 15
|
input_layer: conv2d # encoder input type, you can chose conv2d, conv2d6 and conv2d8
|
||||||
cnn_module_norm: layer_norm
|
normalize_before: True
|
||||||
activation_type: swish
|
use_cnn_module: True
|
||||||
pos_enc_layer_type: rel_pos
|
cnn_module_kernel: 15
|
||||||
selfattention_layer_type: rel_selfattn
|
cnn_module_norm: layer_norm
|
||||||
|
activation_type: swish
|
||||||
|
pos_enc_layer_type: rel_pos
|
||||||
|
selfattention_layer_type: rel_selfattn
|
||||||
|
|
||||||
# decoder related
|
# decoder related
|
||||||
decoder: transformer
|
decoder: transformer
|
||||||
decoder_conf:
|
decoder_conf:
|
||||||
attention_heads: 8
|
attention_heads: 8
|
||||||
linear_units: 2048
|
linear_units: 2048
|
||||||
num_blocks: 6
|
num_blocks: 6
|
||||||
dropout_rate: 0.1
|
dropout_rate: 0.1
|
||||||
positional_dropout_rate: 0.1
|
positional_dropout_rate: 0.1
|
||||||
self_attention_dropout_rate: 0.0
|
self_attention_dropout_rate: 0.0
|
||||||
src_attention_dropout_rate: 0.0
|
src_attention_dropout_rate: 0.0
|
||||||
|
|
||||||
# hybrid CTC/attention
|
# hybrid CTC/attention
|
||||||
model_conf:
|
model_conf:
|
||||||
ctc_weight: 0.3
|
ctc_weight: 0.3
|
||||||
lsm_weight: 0.1 # label smoothing option
|
lsm_weight: 0.1 # label smoothing option
|
||||||
length_normalized_loss: false
|
length_normalized_loss: false
|
||||||
|
|
||||||
# https://yaml.org/type/float.html
|
# https://yaml.org/type/float.html
|
||||||
data:
|
###########################################
|
||||||
train_manifest: data/manifest.train
|
# Data #
|
||||||
dev_manifest: data/manifest.dev
|
###########################################
|
||||||
test_manifest: data/manifest.test
|
train_manifest: data/manifest.train
|
||||||
min_input_len: 0.1 # second
|
dev_manifest: data/manifest.dev
|
||||||
max_input_len: 12.0 # second
|
test_manifest: data/manifest.test
|
||||||
min_output_len: 1.0
|
|
||||||
max_output_len: 400.0
|
|
||||||
min_output_input_ratio: 0.05
|
|
||||||
max_output_input_ratio: 10.0
|
|
||||||
|
|
||||||
collator:
|
###########################################
|
||||||
vocab_filepath: data/lang_char/vocab.txt
|
# Dataloader #
|
||||||
unit_type: 'char'
|
###########################################
|
||||||
spm_model_prefix: ''
|
vocab_filepath: data/lang_char/vocab.txt
|
||||||
augmentation_config: conf/preprocess.yaml
|
unit_type: 'char'
|
||||||
batch_size: 64
|
preprocess_config: conf/preprocess.yaml
|
||||||
raw_wav: True # use raw_wav or kaldi feature
|
spm_model_prefix: ''
|
||||||
spectrum_type: fbank #linear, mfcc, fbank
|
feat_dim: 80
|
||||||
feat_dim: 80
|
stride_ms: 10.0
|
||||||
delta_delta: False
|
window_ms: 25.0
|
||||||
dither: 1.0
|
sortagrad: 0 # Feed samples from shortest to longest ; -1: enabled for all epochs, 0: disabled, other: enabled for 'other' epochs
|
||||||
target_sample_rate: 16000
|
batch_size: 64
|
||||||
max_freq: None
|
maxlen_in: 512 # if input length > maxlen-in, batchsize is automatically reduced
|
||||||
n_fft: None
|
maxlen_out: 150 # if output length > maxlen-out, batchsize is automatically reduced
|
||||||
stride_ms: 10.0
|
minibatches: 0 # for debug
|
||||||
window_ms: 25.0
|
batch_count: auto
|
||||||
use_dB_normalization: True
|
batch_bins: 0
|
||||||
target_dB: -20
|
batch_frames_in: 0
|
||||||
random_seed: 0
|
batch_frames_out: 0
|
||||||
keep_transcription_text: False
|
batch_frames_inout: 0
|
||||||
sortagrad: True
|
num_workers: 0
|
||||||
shuffle_method: batch_shuffle
|
subsampling_factor: 1
|
||||||
num_workers: 2
|
num_encs: 1
|
||||||
|
|
||||||
|
|
||||||
training:
|
###########################################
|
||||||
n_epoch: 240
|
# Training #
|
||||||
accum_grad: 16
|
###########################################
|
||||||
global_grad_clip: 5.0
|
n_epoch: 240
|
||||||
log_interval: 100
|
accum_grad: 16
|
||||||
checkpoint:
|
global_grad_clip: 5.0
|
||||||
kbest_n: 50
|
log_interval: 100
|
||||||
latest_n: 5
|
checkpoint:
|
||||||
optim: adam
|
kbest_n: 50
|
||||||
optim_conf:
|
latest_n: 5
|
||||||
lr: 0.001
|
optim: adam
|
||||||
weight_decay: 1e-6
|
optim_conf:
|
||||||
scheduler: warmuplr
|
lr: 0.001
|
||||||
scheduler_conf:
|
weight_decay: 1.0e-6
|
||||||
warmup_steps: 5000
|
scheduler: warmuplr
|
||||||
lr_decay: 1.0
|
scheduler_conf:
|
||||||
|
warmup_steps: 5000
|
||||||
|
lr_decay: 1.0
|
||||||
decoding:
|
|
||||||
batch_size: 128
|
|
||||||
error_rate_type: cer
|
|
||||||
decoding_method: attention # 'attention', 'ctc_greedy_search', 'ctc_prefix_beam_search', 'attention_rescoring'
|
|
||||||
lang_model_path: data/lm/common_crawl_00.prune01111.trie.klm
|
|
||||||
alpha: 2.5
|
|
||||||
beta: 0.3
|
|
||||||
beam_size: 10
|
|
||||||
cutoff_prob: 1.0
|
|
||||||
cutoff_top_n: 0
|
|
||||||
num_proc_bsearch: 8
|
|
||||||
ctc_weight: 0.5 # ctc weight for attention rescoring decode mode.
|
|
||||||
decoding_chunk_size: -1 # decoding chunk size. Defaults to -1.
|
|
||||||
# <0: for decoding, use full chunk.
|
|
||||||
# >0: for decoding, use fixed chunk size as set.
|
|
||||||
# 0: used for training, it's prohibited here.
|
|
||||||
num_decoding_left_chunks: -1 # number of left chunks for decoding. Defaults to -1.
|
|
||||||
simulate_streaming: False # simulate streaming inference. Defaults to False.
|
|
||||||
|
@ -0,0 +1,11 @@
|
|||||||
|
decode_batch_size: 128
|
||||||
|
error_rate_type: cer
|
||||||
|
decoding_method: attention # 'attention', 'ctc_greedy_search', 'ctc_prefix_beam_search', 'attention_rescoring'
|
||||||
|
beam_size: 10
|
||||||
|
ctc_weight: 0.5 # ctc weight for attention rescoring decode mode.
|
||||||
|
decoding_chunk_size: -1 # decoding chunk size. Defaults to -1.
|
||||||
|
# <0: for decoding, use full chunk.
|
||||||
|
# >0: for decoding, use fixed chunk size as set.
|
||||||
|
# 0: used for training, it's prohibited here.
|
||||||
|
num_decoding_left_chunks: -1 # number of left chunks for decoding. Defaults to -1.
|
||||||
|
simulate_streaming: False # simulate streaming inference. Defaults to False.
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue