minor updates

This commit is contained in:
jinzr 2023-09-07 15:12:38 +08:00
parent 14328f0995
commit 3aa5104dd0
2 changed files with 4 additions and 4 deletions

View File

@ -56,9 +56,9 @@ def main():
transcript_path = lang_dir / "transcript_chars.txt" transcript_path = lang_dir / "transcript_chars.txt"
with open(text, "r", encoding="utf-8") as fin: with open(text, "r", encoding="utf-8") as fin:
text_lines = fin.readlines() with open(transcript_path, "w+", encoding="utf-8") as fout:
with open(transcript_path, "w+", encoding="utf-8") as fout: for line in fin:
fout.writelines([f"{tokenize_by_CJK_char(line)}\n" for line in text_lines]) fout.write(tokenize_by_CJK_char(line) + "\n")
if __name__ == "__main__": if __name__ == "__main__":

View File

@ -353,7 +353,7 @@ if [ $stage -le 14 ] && [ $stop_stage -ge 14 ]; then
if [ -d ../../wenetspeech/ASR/data/lang_char/ ]; then if [ -d ../../wenetspeech/ASR/data/lang_char/ ]; then
cd data cd data
cp -r ../../../../wenetspeech/ASR/data/lm . ln -s ../../../../wenetspeech/ASR/data/lm .
cd .. cd ..
else else
log "Abort! Please run ../../wenetspeech/ASR/prepare.sh" log "Abort! Please run ../../wenetspeech/ASR/prepare.sh"