minor changes for correct path names && import module text2segments.py (#552)

* Update asr_datamodule.py

minor file names correction

* minor changes for correct path names && import module text2segments.py
This commit is contained in:
rickychanhoyin 2022-08-27 17:23:45 +08:00 committed by GitHub
parent 1e31fbcd7d
commit 2636a3dd58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 2 deletions

View File

@ -43,7 +43,7 @@ torch.set_num_interop_threads(1)
def compute_fbank_alimeeting(num_mel_bins: int = 80): def compute_fbank_alimeeting(num_mel_bins: int = 80):
src_dir = Path("data/manifests") src_dir = Path("data/manifests/alimeeting")
output_dir = Path("data/fbank") output_dir = Path("data/fbank")
num_jobs = min(15, os.cpu_count()) num_jobs = min(15, os.cpu_count())

View File

@ -30,9 +30,11 @@ with word segmenting:
import argparse import argparse
import paddle
import jieba import jieba
from tqdm import tqdm from tqdm import tqdm
paddle.enable_static()
jieba.enable_paddle() jieba.enable_paddle()

View File

@ -107,7 +107,7 @@ if [ $stage -le 6 ] && [ $stop_stage -ge 6 ]; then
# Prepare text. # Prepare text.
# Note: in Linux, you can install jq with the following command: # Note: in Linux, you can install jq with the following command:
# wget -O jq https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 # wget -O jq https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64
gunzip -c data/manifests/alimeeting/supervisions_train.jsonl.gz \ gunzip -c data/manifests/alimeeting/alimeeting_supervisions_train.jsonl.gz \
| jq ".text" | sed 's/"//g' \ | jq ".text" | sed 's/"//g' \
| ./local/text2token.py -t "char" > $lang_char_dir/text | ./local/text2token.py -t "char" > $lang_char_dir/text