Skip to content

Commit

Permalink
[*]: fix typo error (wenet-e2e#1304)
Browse files Browse the repository at this point in the history
* [*]: fix typo error

* [doc] ignore clangd files
  • Loading branch information
mackong authored Jul 14, 2022
1 parent 3cf8360 commit 8694a73
Show file tree
Hide file tree
Showing 26 changed files with 40 additions and 36 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,7 @@ runtime/core/grpc/wenet.grpc.pb.cc
runtime/core/grpc/wenet.grpc.pb.h
runtime/core/grpc/wenet.pb.cc
runtime/core/grpc/wenet.pb.h

# Clangd files
.cache
compile_commands.json
4 changes: 2 additions & 2 deletions docs/tutorial_librispeech.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ ZZ 5000

``` sh
if [ ${stage} -le 3 ] && [ ${stop_stage} -ge 3 ]; then
# Prepare wenet requried data
echo "Prepare data, prepare requried format"
# Prepare wenet required data
echo "Prepare data, prepare required format"
for x in dev ${recog_set} $train_set ; do
tools/make_raw_list.py $wave_data/$x/wav.scp $wave_data/$x/text \
$wave_data/$x/data.list
Expand Down
2 changes: 1 addition & 1 deletion examples/aishell/rnnt/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ]; then
fi

if [ ${stage} -le 3 ] && [ ${stop_stage} -ge 3 ]; then
echo "Prepare data, prepare requried format"
echo "Prepare data, prepare required format"
for x in dev test ${train_set}; do
if [ $data_type == "shard" ]; then
tools/make_shard_list.py --num_utts_per_shard $num_utts_per_shard \
Expand Down
2 changes: 1 addition & 1 deletion examples/aishell/s0/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ]; then
fi

if [ ${stage} -le 3 ] && [ ${stop_stage} -ge 3 ]; then
echo "Prepare data, prepare requried format"
echo "Prepare data, prepare required format"
for x in dev test ${train_set}; do
if [ $data_type == "shard" ]; then
tools/make_shard_list.py --num_utts_per_shard $num_utts_per_shard \
Expand Down
4 changes: 2 additions & 2 deletions examples/aishell/s0_deprecated/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ fi

if [ ${stage} -le 3 ] && [ ${stop_stage} -ge 3 ]; then
nj=32
# Prepare wenet requried data
echo "Prepare data, prepare requried format"
# Prepare wenet required data
echo "Prepare data, prepare required format"
for x in dev test ${train_set}; do
tools/format_data.sh --nj ${nj} \
--feat-type wav --feat $feat_dir/$x/wav.scp \
Expand Down
4 changes: 2 additions & 2 deletions examples/aishell/s1/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ]; then
fi

if [ ${stage} -le 3 ] && [ ${stop_stage} -ge 3 ]; then
# Prepare wenet requried data
echo "Prepare data, prepare requried format"
# Prepare wenet required data
echo "Prepare data, prepare required format"
for x in dev test ${train_set}; do
tools/format_data.sh --nj ${nj} --feat $feat_dir/$x/feats.scp \
$feat_dir/$x ${dict} > $feat_dir/$x/format.data
Expand Down
4 changes: 2 additions & 2 deletions examples/aishell2/s0/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ]; then
fi

if [ ${stage} -le 3 ] && [ ${stop_stage} -ge 3 ]; then
# Prepare wenet requried data
echo "Prepare data, prepare requried format"
# Prepare wenet required data
echo "Prepare data, prepare required format"
for x in dev test ${train_set}; do
tools/make_raw_list.py data/$x/wav.scp data/$x/text data/$x/data.list
done
Expand Down
4 changes: 2 additions & 2 deletions examples/aishell4/s0/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ]; then
fi

if [ ${stage} -le 3 ] && [ ${stop_stage} -ge 3 ]; then
# Prepare wenet requried data
echo "Prepare data, prepare requried format"
# Prepare wenet required data
echo "Prepare data, prepare required format"
for x in $train_set ${test_sets}; do
tools/make_shard_list.py --num_utts_per_shard $num_utts_per_shard \
--num_threads 32 --segments data/$x/segments \
Expand Down
2 changes: 1 addition & 1 deletion examples/chime4/s0/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ if [ $end -ge 3 ] && [ $beg -le 3 ]; then
--train_config $train_config \
--in_scp $data_dir/train/wav.scp \
--out_cmvn $data_dir/train/global_cmvn
echo "Prepare data, prepare requried format"
echo "Prepare data, prepare required format"
for x in train dev; do
tools/make_raw_list.py $data_dir/$x/wav.scp $data_dir/$x/char \
$data_dir/$x/data.list
Expand Down
2 changes: 1 addition & 1 deletion examples/commonvoice/fr/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ fi


if [ ${stage} -le 3 ] && [ ${stop_stage} -ge 3 ]; then
echo "stage 3: Prepare data, prepare requried format"
echo "stage 3: Prepare data, prepare required format"
for x in dev test ${train_set}; do
if [ $data_type == "shard" ]; then
python tools/make_shard_list.py --num_utts_per_shard $num_utts_per_shard \
Expand Down
4 changes: 2 additions & 2 deletions examples/csj/s0/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ fi


if [ ${stage} -le 6 ] && [ ${stop_stage} -ge 6 ]; then
# Prepare wenet requried data
echo "Prepare data, prepare requried format"
# Prepare wenet required data
echo "Prepare data, prepare required format"
for x in $train_set ; do
python csj_tools/wn.4.make_raw_list.py $wave_data/$x/wav.scp_$minsec $wave_data/$x/text \
$wave_data/$x/data.list
Expand Down
4 changes: 2 additions & 2 deletions examples/hkust/s0/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ]; then
fi

if [ ${stage} -le 3 ] && [ ${stop_stage} -ge 3 ]; then
# Prepare wenet requried data
echo "Prepare data, prepare requried format"
# Prepare wenet required data
echo "Prepare data, prepare required format"
for x in ${dev_set} ${train_set} test; do
if [ $data_type == "shard" ]; then
tools/make_shard_list.py --num_utts_per_shard $num_utts_per_shard \
Expand Down
4 changes: 2 additions & 2 deletions examples/librispeech/s0/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ]; then
fi

if [ ${stage} -le 3 ] && [ ${stop_stage} -ge 3 ]; then
# Prepare wenet requried data
echo "Prepare data, prepare requried format"
# Prepare wenet required data
echo "Prepare data, prepare required format"
for x in $dev_set ${recog_set} $train_set ; do
tools/make_raw_list.py $wave_data/$x/wav.scp $wave_data/$x/text \
$wave_data/$x/data.list
Expand Down
4 changes: 2 additions & 2 deletions examples/librispeech/s1/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ]; then
fi

if [ ${stage} -le 3 ] && [ ${stop_stage} -ge 3 ]; then
# Prepare wenet requried data
echo "Prepare data, prepare requried format"
# Prepare wenet required data
echo "Prepare data, prepare required format"
for x in dev ${recog_set} ${train_set}; do
tools/format_data.sh --nj ${nj} --feat data/$x/feats.scp --bpecode ${bpemodel}.model \
data/$x ${dict} > data/$x/format.data.tmp
Expand Down
2 changes: 1 addition & 1 deletion examples/multi_cn/s0/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ if [ ${stage} -le 3 ] && [ ${stop_stage} -ge 3 ]; then
fi

if [ ${stage} -le 4 ] && [ ${stop_stage} -ge 4 ]; then
echo "Prepare data, prepare requried format"
echo "Prepare data, prepare required format"
feat_test_sets=""
for x in ${test_sets}; do
feat_test_sets=${feat_test_sets}" "test_${x}
Expand Down
2 changes: 1 addition & 1 deletion examples/openasr2021/s0/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ if [ ${stage} -le 3 ] && [ ${stop_stage} -ge 3 ]; then
fi

if [ ${stage} -le 4 ] && [ ${stop_stage} -ge 4 ]; then
echo "Prepare data, prepare requried format"
echo "Prepare data, prepare required format"
# For wav feature, just copy the data. mfcc/fbank extraction is done in training
for x in ${train_set} ${train_dev} ${recog_set}; do
if [ $data_type == "shard" ]; then
Expand Down
2 changes: 1 addition & 1 deletion examples/swbd/s0/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ fi


if [ ${stage} -le 3 ] && [ ${stop_stage} -ge 3 ]; then
echo "Prepare data, prepare requried format"
echo "Prepare data, prepare required format"
for x in ${train_set} train_dev eval2000; do
if [ ${data_type} == "shard" ]; then
tools/make_shard_list.py --num_utts_per_shard ${num_utts_per_shard} \
Expand Down
2 changes: 1 addition & 1 deletion examples/tedlium3/s0/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ fi


if [ ${stage} -le 3 ] && [ ${stop_stage} -ge 3 ]; then
echo "Prepare data, prepare requried format"
echo "Prepare data, prepare required format"
if [ ! -f $feat_dir/$train_set/segments ]; then
echo "$0: No such file segments" && exit 1;
else
Expand Down
2 changes: 1 addition & 1 deletion examples/timit/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ]; then
fi

if [ ${stage} -le 3 ] && [ ${stop_stage} -ge 3 ]; then
echo "stage 3: Prepare data, prepare requried format"
echo "stage 3: Prepare data, prepare required format"
for x in dev test ${train_set}; do
if [ $data_type == "shard" ]; then
tools/make_shard_list.py --num_utts_per_shard $num_utts_per_shard \
Expand Down
2 changes: 1 addition & 1 deletion examples/vkw2021/s0/local/run_finetune_5h.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ if [ ${stage} -le 1 ] && [ ${stop_stage} -ge 1 ]; then
fi

if [ ${stage} -le 3 ] && [ ${stop_stage} -ge 3 ]; then
echo "Prepare data, prepare requried format"
echo "Prepare data, prepare required format"
tools/make_raw_list.py --segments $data/$finetune2_set/segments \
$data/$finetune2_set/wav.scp $data/$finetune2_set/text $data/$finetune2_set/data.list
fi
Expand Down
2 changes: 1 addition & 1 deletion examples/vkw2021/s0/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ]; then
fi

if [ ${stage} -le 3 ] && [ ${stop_stage} -ge 3 ]; then
echo "Prepare data, prepare requried format"
echo "Prepare data, prepare required format"
for x in ${dev_set} ${train_set}; do
tools/make_raw_list.py --segments $data/$x/segments \
$data/$x/wav.scp $data/$x/text $data/$x/data.list
Expand Down
2 changes: 1 addition & 1 deletion examples/wsj/s0/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ]; then
fi

if [ ${stage} -le 3 ] && [ ${stop_stage} -ge 3 ]; then
echo "Prepare data, prepare requried format"
echo "Prepare data, prepare required format"
for x in ${valid_set} ${train_set}; do
if [ $data_type == "shard" ]; then
tools/make_shard_list.py --num_utts_per_shard $num_utts_per_shard \
Expand Down
4 changes: 2 additions & 2 deletions runtime/core/decoder/torch_asr_model.cc
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ void TorchAsrModel::ForwardEncoderFunc(
}

// 2. Encoder chunk forward
int requried_cache_size = chunk_size_ * num_left_chunks_;
int required_cache_size = chunk_size_ * num_left_chunks_;
torch::NoGradGuard no_grad;
std::vector<torch::jit::IValue> inputs = {feats, offset_, requried_cache_size,
std::vector<torch::jit::IValue> inputs = {feats, offset_, required_cache_size,
att_cache_, cnn_cache_};

// Refer interfaces in wenet/transformer/asr_model.py
Expand Down
4 changes: 2 additions & 2 deletions tools/alignment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ ali_result=$dir/ali

if [ ${stage} -le -1 ] && [ ${stop_stage} -ge -1 ]; then
nj=32
# Prepare requried data for ctc alignment
echo "Prepare data, prepare requried format"
# Prepare required data for ctc alignment
echo "Prepare data, prepare required format"
for x in $set; do
tools/format_data.sh --nj ${nj} \
--feat-type wav --feat $feat_dir/$x/wav.scp \
Expand Down
2 changes: 1 addition & 1 deletion wenet/transformer/convolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def forward(
assert (x.size(2) > self.lorder)
new_cache = x[:, :, -self.lorder:]
else:
# It's better we just return None if no cache is requried,
# It's better we just return None if no cache is required,
# However, for JIT export, here we just fake one tensor instead of
# None.
new_cache = torch.zeros((0, 0, 0), dtype=x.dtype, device=x.device)
Expand Down
2 changes: 1 addition & 1 deletion wenet/transformer/embedding.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def position_encoding(self, offset: Union[int, torch.Tensor], size: int,
Args:
offset (int or torch.tensor): start offset
size (int): requried size of position encoding
size (int): required size of position encoding
Returns:
torch.Tensor: Corresponding encoding
Expand Down

0 comments on commit 8694a73

Please sign in to comment.