Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
JinZr committed Mar 4, 2024
1 parent dcd947d commit 3d1a968
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
3 changes: 0 additions & 3 deletions egs/multi_zh_en/ASR/prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,6 @@ if [ $stage -le 4 ] && [ $stop_stage -ge 4 ]; then

cat ./data/lang_bpe_500/transcript_words.txt \
>> $lang_dir/text_words_segmentation

cat ./data/lang_char/text_words_segmentation \
>> $lang_dir/text_words_segmentation
fi

cat $lang_dir/text_words_segmentation | sed 's/ /\n/g' \
Expand Down
12 changes: 7 additions & 5 deletions icefall/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
from dataclasses import dataclass
from datetime import datetime
from pathlib import Path
from pypinyin import pinyin, lazy_pinyin
from pypinyin.contrib.tone_convert import to_initials, to_finals_tone, to_finals
from shutil import copyfile
from typing import Dict, Iterable, List, Optional, TextIO, Tuple, Union

Expand All @@ -40,6 +38,8 @@
import torch
import torch.distributed as dist
import torch.nn as nn
from pypinyin import lazy_pinyin, pinyin
from pypinyin.contrib.tone_convert import to_finals, to_finals_tone, to_initials
from torch.utils.tensorboard import SummaryWriter

from icefall.checkpoint import average_checkpoints
Expand Down Expand Up @@ -1081,9 +1081,11 @@ def write_surt_error_stats(
f"{cut_id}:\t"
+ " ".join(
(
ref_word
if ref_word == hyp_word
else f"({ref_word}->{hyp_word})"
(
ref_word
if ref_word == hyp_word
else f"({ref_word}->{hyp_word})"
)
for ref_word, hyp_word in ali
)
),
Expand Down

0 comments on commit 3d1a968

Please sign in to comment.